diff options
author | rpaulo <rpaulo@FreeBSD.org> | 2012-09-08 01:26:52 +0000 |
---|---|---|
committer | rpaulo <rpaulo@FreeBSD.org> | 2012-09-08 01:26:52 +0000 |
commit | 7074fc29211bc931f396cf9991133680f9f4c9ea (patch) | |
tree | 7cf2cf0c4c7987a94e06308e5978f5b2aae4d657 /sys/powerpc | |
parent | 7f13a2e391382e79bee7801be5c2168a59009974 (diff) | |
download | FreeBSD-src-7074fc29211bc931f396cf9991133680f9f4c9ea.zip FreeBSD-src-7074fc29211bc931f396cf9991133680f9f4c9ea.tar.gz |
Add IRQ support to the resource list handling functions.
Diffstat (limited to 'sys/powerpc')
-rw-r--r-- | sys/powerpc/wii/wii_bus.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/powerpc/wii/wii_bus.c b/sys/powerpc/wii/wii_bus.c index 148da98..1107f7b 100644 --- a/sys/powerpc/wii/wii_bus.c +++ b/sys/powerpc/wii/wii_bus.c @@ -104,6 +104,7 @@ DRIVER_MODULE(wiibus, nexus, wiibus_driver, wiibus_devclass, 0, 0); static void wiibus_identify(driver_t *driver, device_t parent) { + if (strcmp(installed_platform(), "wii") != 0) return; @@ -115,7 +116,6 @@ wiibus_identify(driver_t *driver, device_t parent) static int wiibus_probe(device_t dev) { - /* Do not attach to any OF nodes that may be present */ device_set_desc(dev, "Nintendo Wii System Bus"); @@ -127,6 +127,7 @@ wiibus_init_device_resources(struct rman *rm, struct wiibus_devinfo *dinfo, unsigned int rid, uintptr_t addr, size_t len, unsigned int irq) { + if (!dinfo->di_init) { resource_list_init(&dinfo->di_resources); dinfo->di_init++; @@ -246,7 +247,9 @@ wiibus_alloc_resource(device_t bus, device_t child, int type, } rman_set_rid(rv, *rid); break; - /* XXX IRQ */ + case SYS_RES_IRQ: + return (resource_list_alloc(&dinfo->di_resources, bus, child, + type, rid, start, end, count, flags)); default: device_printf(bus, "unknown resource request from %s\n", device_get_nameunit(child)); @@ -280,7 +283,8 @@ wiibus_activate_resource(device_t bus, device_t child, int type, int rid, rman_set_bustag(res, &bs_be_tag); rman_set_bushandle(res, (unsigned long)p); break; - /* XXX IRQ */ + case SYS_RES_IRQ: + return (bus_activate_resource(bus, type, rid, res)); default: device_printf(bus, "unknown activate resource request from %s\n", |