From owner-svn-src-all@FreeBSD.ORG Sat Sep 8 01:26:52 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C3470106564A; Sat, 8 Sep 2012 01:26:52 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AEA358FC16; Sat, 8 Sep 2012 01:26:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q881Qq72096947; Sat, 8 Sep 2012 01:26:52 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q881QqVd096945; Sat, 8 Sep 2012 01:26:52 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201209080126.q881QqVd096945@svn.freebsd.org> From: Rui Paulo Date: Sat, 8 Sep 2012 01:26:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240224 - head/sys/powerpc/wii X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Sep 2012 01:26:52 -0000 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",