summaryrefslogtreecommitdiffstats
path: root/sys/dev/cfi
diff options
context:
space:
mode:
authorian <ian@FreeBSD.org>2014-05-13 17:12:07 +0000
committerian <ian@FreeBSD.org>2014-05-13 17:12:07 +0000
commit42a63a26cfe02dc91a47c8dba60ca2aae1fa1e2a (patch)
tree96994974626d0b161a11247118a5976f448b97df /sys/dev/cfi
parent3d20d204d8598105e6dd4fb0d595e33d2461a02b (diff)
downloadFreeBSD-src-42a63a26cfe02dc91a47c8dba60ca2aae1fa1e2a.zip
FreeBSD-src-42a63a26cfe02dc91a47c8dba60ca2aae1fa1e2a.tar.gz
MFC r256870, r256898, r256899, r256900 (by nwhitehorn):
Standards-conformance and code deduplication: - Use bus reference phandles in place of FDT offsets as IRQ domain keys - Unify the identical macio/fdt/mambo OpenPIC drivers into one - Be more forgiving (following ePAPR) about what we need from the device tree to identify an OpenPIC - Correctly map all IRQs into an interrupt domain - Set IRQ_*_CONFORM for interrupts on an unknown PIC type instead of failing attachment for that device. Allow lots of interrupts (useful on multi-domain platforms) and do not set device_quiet() on all devices attached under nexus(4).
Diffstat (limited to 'sys/dev/cfi')
-rw-r--r--sys/dev/cfi/cfi_bus_nexus.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/sys/dev/cfi/cfi_bus_nexus.c b/sys/dev/cfi/cfi_bus_nexus.c
index 4e1fa4e..a87ee14 100644
--- a/sys/dev/cfi/cfi_bus_nexus.c
+++ b/sys/dev/cfi/cfi_bus_nexus.c
@@ -50,14 +50,25 @@ __FBSDID("$FreeBSD$");
static int
cfi_nexus_probe(device_t dev)
{
+ return (BUS_PROBE_NOWILDCARD);
+}
+
+static int
+cfi_nexus_attach(device_t dev)
+{
+ int error;
+
+ error = cfi_probe(dev);
+ if (error != 0)
+ return (error);
- return cfi_probe(dev);
+ return cfi_attach(dev);
}
static device_method_t cfi_nexus_methods[] = {
/* device interface */
DEVMETHOD(device_probe, cfi_nexus_probe),
- DEVMETHOD(device_attach, cfi_attach),
+ DEVMETHOD(device_attach, cfi_nexus_attach),
DEVMETHOD(device_detach, cfi_detach),
{0, 0}
OpenPOWER on IntegriCloud