Date: Sat, 8 Sep 2012 01:26:52 +0000 (UTC) From: Rui Paulo <rpaulo@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r240224 - head/sys/powerpc/wii Message-ID: <201209080126.q881QqVd096945@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: rpaulo Date: Sat Sep 8 01:26:52 2012 New Revision: 240224 URL: http://svn.freebsd.org/changeset/base/240224 Log: Add IRQ support to the resource list handling functions. Modified: head/sys/powerpc/wii/wii_bus.c Modified: head/sys/powerpc/wii/wii_bus.c ============================================================================== --- head/sys/powerpc/wii/wii_bus.c Sat Sep 8 01:14:13 2012 (r240223) +++ head/sys/powerpc/wii/wii_bus.c Sat Sep 8 01:26:52 2012 (r240224) @@ -104,6 +104,7 @@ DRIVER_MODULE(wiibus, nexus, wiibus_driv 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 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 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, devi } 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, d 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",
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201209080126.q881QqVd096945>