No mixer with Snapper

Justin Hibbits jrh29 at alumni.cwru.edu
Sun Mar 1 13:43:56 PST 2009


On Sun, Mar 01, 2009 at 05:13:13PM +0100, Marco Trillo wrote:
> Hi,
> 
> Thanks! The problem is that an <i2c-address> property is used, while
> the OFW-I2C code only looks for <reg>.
> 
> The attached patch -- to apply in /usr/src/sys -- makes the OFW-I2C
> code also look for the <i2c-address> 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


More information about the freebsd-ppc mailing list