summaryrefslogtreecommitdiffstats
path: root/sys/arm/mv/mv_machdep.c
diff options
context:
space:
mode:
authorian <ian@FreeBSD.org>2013-01-27 00:39:02 +0000
committerian <ian@FreeBSD.org>2013-01-27 00:39:02 +0000
commit60d7652a68f6e9688f7117ffdd2584fdb79b6d43 (patch)
tree02b58046be8003c189904e5ed6e030896e79a3aa /sys/arm/mv/mv_machdep.c
parentac1b6656c3b6deb472065703a5c1311d5f39c15e (diff)
downloadFreeBSD-src-60d7652a68f6e9688f7117ffdd2584fdb79b6d43.zip
FreeBSD-src-60d7652a68f6e9688f7117ffdd2584fdb79b6d43.tar.gz
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)
Diffstat (limited to 'sys/arm/mv/mv_machdep.c')
-rw-r--r--sys/arm/mv/mv_machdep.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/sys/arm/mv/mv_machdep.c b/sys/arm/mv/mv_machdep.c
index ae74fa3..fba222d 100644
--- a/sys/arm/mv/mv_machdep.c
+++ b/sys/arm/mv/mv_machdep.c
@@ -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
*/
OpenPOWER on IntegriCloud