svn commit: r245954 - in head/sys/arm: conf mv mv/kirkwood

Ian Lepore ian at FreeBSD.org
Sun Jan 27 00:39:03 UTC 2013


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
  */


More information about the svn-src-head mailing list