From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 01:54:57 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F0E77106566B; Tue, 6 Jan 2009 01:54:57 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DDF788FC0C; Tue, 6 Jan 2009 01:54:57 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n061svxj018268; Tue, 6 Jan 2009 01:54:57 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n061svIc018267; Tue, 6 Jan 2009 01:54:57 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <200901060154.n061svIc018267@svn.freebsd.org> From: Nathan Whitehorn Date: Tue, 6 Jan 2009 01:54:57 +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: r186805 - head/sys/powerpc/powermac 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: Tue, 06 Jan 2009 01:54:58 -0000 Author: nwhitehorn Date: Tue Jan 6 01:54:57 2009 New Revision: 186805 URL: http://svn.freebsd.org/changeset/base/186805 Log: Add a new quirk type so that the MacIO driver will assign memory resources belonging to a devices children, in analogy to the way we handle interrupts for SCC serial devices. This is required to counteract overly deep nesting on onboard audio devices. Submitted by: Marco Trillo Modified: head/sys/powerpc/powermac/macio.c Modified: head/sys/powerpc/powermac/macio.c ============================================================================== --- head/sys/powerpc/powermac/macio.c Tue Jan 6 01:36:36 2009 (r186804) +++ head/sys/powerpc/powermac/macio.c Tue Jan 6 01:54:57 2009 (r186805) @@ -152,6 +152,7 @@ static struct macio_pci_dev { */ #define MACIO_QUIRK_IGNORE 0x00000001 #define MACIO_QUIRK_CHILD_HAS_INTR 0x00000002 +#define MACIO_QUIRK_USE_CHILD_REG 0x00000004 struct macio_quirk_entry { const char *mq_name; @@ -162,7 +163,9 @@ static struct macio_quirk_entry macio_qu { "escc-legacy", MACIO_QUIRK_IGNORE }, { "timer", MACIO_QUIRK_IGNORE }, { "escc", MACIO_QUIRK_CHILD_HAS_INTR }, - { NULL, 0 } + { "i2s", MACIO_QUIRK_CHILD_HAS_INTR | + MACIO_QUIRK_USE_CHILD_REG }, + { NULL, 0 } }; static int @@ -318,7 +321,10 @@ macio_attach(device_t dev) resource_list_init(&dinfo->mdi_resources); dinfo->mdi_ninterrupts = 0; macio_add_intr(child, dinfo); - macio_add_reg(child, dinfo); + if ((quirks & MACIO_QUIRK_USE_CHILD_REG) != 0) + macio_add_reg(OF_child(child), dinfo); + else + macio_add_reg(child, dinfo); if ((quirks & MACIO_QUIRK_CHILD_HAS_INTR) != 0) for (subchild = OF_child(child); subchild != 0; subchild = OF_peer(subchild))