From owner-freebsd-ppc@FreeBSD.ORG Sun Mar 1 21:43:54 2009 Return-Path: Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 630211065733 for ; Sun, 1 Mar 2009 21:43:54 +0000 (UTC) (envelope-from jrh29@alumni.cwru.edu) Received: from beta.eecs.cwru.edu (beta.EECS.CWRU.Edu [129.22.150.110]) by mx1.freebsd.org (Postfix) with ESMTP id 13B6B8FC15 for ; Sun, 1 Mar 2009 21:43:53 +0000 (UTC) (envelope-from jrh29@alumni.cwru.edu) Received: from narn.knownspace ([::ffff:69.250.50.210]) (AUTH: PLAIN jrh29, TLS: TLSv1/SSLv3,168bits,DES-CBC3-SHA) by beta.eecs.cwru.edu with esmtp; Sun, 01 Mar 2009 16:43:39 -0500 id 0000A867.49AB018B.00000BA5 Date: Sun, 1 Mar 2009 16:44:12 -0500 From: Justin Hibbits To: Marco Trillo Message-ID: <20090301214412.GA1055@narn.knownspace> References: <20090228165533.GA1166@narn.knownspace> <20090301142432.GC1166@narn.knownspace> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.19 (2009-01-05) Cc: freebsd-ppc@freebsd.org Subject: Re: No mixer with Snapper X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2009 21:43:56 -0000 On Sun, Mar 01, 2009 at 05:13:13PM +0100, Marco Trillo wrote: > Hi, > > Thanks! The problem is that an property is used, while > the OFW-I2C code only looks for . > > The attached patch -- to apply in /usr/src/sys -- makes the OFW-I2C > code also look for the property. With the patch, the > mixer should attach and work fine. > > Regards > Marco > --- dev/ofw/ofw_iicbus.c.orig 2009-03-01 16:41:57.000000000 +0100 > +++ dev/ofw/ofw_iicbus.c 2009-03-01 16:45:50.000000000 +0100 > @@ -118,7 +118,8 @@ > node = ofw_bus_get_node(dev); > > for (child = OF_child(node); child != 0; child = OF_peer(child)) { > - if (OF_getprop(child, "reg", &addr, sizeof(addr)) == -1) > + if (OF_getprop(child, "reg", &addr, sizeof(addr)) == -1 && > + OF_getprop(child, "i2c-address", &addr, sizeof(addr)) == -1) > continue; > > /* Marco, The patch worked perfectly, thanks. - Justin