[v2 PATCH 1/1] Fix 64bit Maple Host Bridge 'reg' property

Benjamin Herrenschmidt benh at kernel.crashing.org
Fri May 1 15:02:21 EST 2009


On Tue, 2009-04-14 at 18:13 +0800, tiejun.china at gamil.com wrote:
> In the DTB tree created by firmware on some Maple 64bit targets, such as ATCA6101, 
> the "reg" property of host bridge node is incorrectly encoded as if #address-cells 
> and #size-cells were 1. So we have to provide one fixup function to fix that.
> 
> Signed-off-by: Tiejun Chen <tiejun.china at gmail.com>

Almost there :-)

> +	/*  FIXME: This may be used for more Maple targets not only ATCA6101. */
> +	node = call_prom("finddevice", 1, 1, ADDR("/"));
> +	model = prom_getprop(node, "model", prop, sizeof(prop));

Couldn't you use _prom->root above ?

> +	if (model != PROM_ERROR && (strcmp(prop, "Motorola,ATCA-6101") == 0))
> +                fixup_device_tree_atca6101();
>  
>  	name = "/ht at 0/isa at 4";
>  	isa = call_prom("finddevice", 1, 1, ADDR(name));

Cheers,
Ben.





More information about the Linuxppc-dev mailing list