summaryrefslogtreecommitdiffstats
path: root/sys/dev/ofw
diff options
context:
space:
mode:
authorgjb <gjb@FreeBSD.org>2015-05-06 11:50:30 +0000
committergjb <gjb@FreeBSD.org>2015-05-06 11:50:30 +0000
commite9b794a6dfdf28ce835f5730e5884b97bc62aa19 (patch)
tree759e7355bf352e43e4a156a773a28d3d9fdbcad7 /sys/dev/ofw
parent55e5b36d38ff95ded004ed97fe9ed303abb36184 (diff)
parent462d48d659bae28be32c0d488ddeeaaf99d87bae (diff)
downloadFreeBSD-src-e9b794a6dfdf28ce835f5730e5884b97bc62aa19.zip
FreeBSD-src-e9b794a6dfdf28ce835f5730e5884b97bc62aa19.tar.gz
MFH: r282315-r282534
Sponsored by: The FreeBSD Foundation
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