summaryrefslogtreecommitdiffstats
path: root/sys/dev/ofw
diff options
context:
space:
mode:
authorandrew <andrew@FreeBSD.org>2015-05-05 11:13:16 +0000
committerandrew <andrew@FreeBSD.org>2015-05-05 11:13:16 +0000
commit7b66fb359f33762374c6cd77283448fc2b8a6b6c (patch)
tree118de89877dc8a73499cb5a7a433a6cd65c3ca0f /sys/dev/ofw
parent24dc56b9a2df5b3841070c249ac02f351d22837a (diff)
downloadFreeBSD-src-7b66fb359f33762374c6cd77283448fc2b8a6b6c.zip
FreeBSD-src-7b66fb359f33762374c6cd77283448fc2b8a6b6c.tar.gz
Move the point we attach the ofw driver on arm64 to nexus.c. This will
allow us to have a single place to decide to use ofw or acpi.
Diffstat (limited to 'sys/dev/ofw')
-rw-r--r--sys/dev/ofw/ofwbus.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/dev/ofw/ofwbus.c b/sys/dev/ofw/ofwbus.c
index 6a81b6e..670abff 100644
--- a/sys/dev/ofw/ofwbus.c
+++ b/sys/dev/ofw/ofwbus.c
@@ -69,7 +69,9 @@ struct ofwbus_softc {
struct rman sc_mem_rman;
};
+#ifndef __aarch64__
static device_identify_t ofwbus_identify;
+#endif
static device_probe_t ofwbus_probe;
static device_attach_t ofwbus_attach;
static bus_alloc_resource_t ofwbus_alloc_resource;
@@ -78,7 +80,9 @@ static bus_release_resource_t ofwbus_release_resource;
static device_method_t ofwbus_methods[] = {
/* Device interface */
+#ifndef __aarch64__
DEVMETHOD(device_identify, ofwbus_identify),
+#endif
DEVMETHOD(device_probe, ofwbus_probe),
DEVMETHOD(device_attach, ofwbus_attach),
@@ -97,6 +101,7 @@ EARLY_DRIVER_MODULE(ofwbus, nexus, ofwbus_driver, ofwbus_devclass, 0, 0,
BUS_PASS_BUS + BUS_PASS_ORDER_MIDDLE);
MODULE_VERSION(ofwbus, 1);
+#ifndef __aarch64__
static void
ofwbus_identify(driver_t *driver, device_t parent)
{
@@ -108,11 +113,17 @@ ofwbus_identify(driver_t *driver, device_t parent)
if (device_find_child(parent, "ofwbus", -1) == NULL)
BUS_ADD_CHILD(parent, 0, "ofwbus", -1);
}
+#endif
static int
ofwbus_probe(device_t dev)
{
+#ifdef __aarch64__
+ if (OF_peer(0) == 0)
+ return (ENXIO);
+#endif
+
device_set_desc(dev, "Open Firmware Device Tree");
return (BUS_PROBE_NOWILDCARD);
}
OpenPOWER on IntegriCloud