From owner-svn-src-head@FreeBSD.ORG Sun Jan 27 00:39:03 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 9AAC4451; Sun, 27 Jan 2013 00:39:03 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 5DDA27F4; Sun, 27 Jan 2013 00:39:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0R0d3p3014772; Sun, 27 Jan 2013 00:39:03 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0R0d3C1014770; Sun, 27 Jan 2013 00:39:03 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201301270039.r0R0d3C1014770@svn.freebsd.org> From: Ian Lepore Date: Sun, 27 Jan 2013 00:39:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245954 - in head/sys/arm: conf mv mv/kirkwood X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Jan 2013 00:39:03 -0000 Author: ian Date: Sun Jan 27 00:39:02 2013 New Revision: 245954 URL: http://svnweb.freebsd.org/changeset/base/245954 Log: Add a default do-nothing implementation of fdt_pci_devmap() using a weak alias, so that we don't need an empty implementation of it for every Marvell platform that has no PCI. This allows the removal of the SheevaPlug-specific stub and config files, and eliminates the need to add similar stubs for future models. Marvell platforms that do expose PCI are compiled with 'device pci' which causes the real (non-weak) implementation in dev/fdt/fdt_pci.c to be used. Approved by: cognet (mentor) Deleted: head/sys/arm/mv/kirkwood/files.sheevaplug head/sys/arm/mv/kirkwood/sheevaplug.c head/sys/arm/mv/kirkwood/std.sheevaplug Modified: head/sys/arm/conf/SHEEVAPLUG head/sys/arm/mv/mv_machdep.c Modified: head/sys/arm/conf/SHEEVAPLUG ============================================================================== --- head/sys/arm/conf/SHEEVAPLUG Sun Jan 27 00:16:36 2013 (r245953) +++ head/sys/arm/conf/SHEEVAPLUG Sun Jan 27 00:39:02 2013 (r245954) @@ -5,7 +5,7 @@ # ident SHEEVAPLUG -include "../mv/kirkwood/std.sheevaplug" +include "../mv/kirkwood/std.db88f6xxx" options SOC_MV_KIRKWOOD makeoptions MODULES_OVERRIDE="" Modified: head/sys/arm/mv/mv_machdep.c ============================================================================== --- head/sys/arm/mv/mv_machdep.c Sun Jan 27 00:16:36 2013 (r245953) +++ head/sys/arm/mv/mv_machdep.c Sun Jan 27 00:39:02 2013 (r245954) @@ -279,6 +279,25 @@ out: } /* + * Supply a default do-nothing implementation of fdt_pci_devmap() via a weak + * alias. Many Marvell platforms don't support a PCI interface, but to support + * those that do, we end up with a reference to this function below, in + * platform_devmap_init(). If "device pci" appears in the kernel config, the + * real implementation of this function in dev/fdt/fdt_pci.c overrides the weak + * alias defined here. + */ +int mv_default_fdt_pci_devmap(phandle_t node, struct pmap_devmap *devmap, + vm_offset_t io_va, vm_offset_t mem_va); +int +mv_default_fdt_pci_devmap(phandle_t node, struct pmap_devmap *devmap, + vm_offset_t io_va, vm_offset_t mem_va) +{ + + return (0); +} +__weak_reference(mv_default_fdt_pci_devmap, fdt_pci_devmap); + +/* * XXX: When device entry in devmap has pd_size smaller than section size, * system will freeze during initialization */