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

From: Benjamin Herrenschmidt <[email-masked]>
Date: Fri, 01 May 2009 15:02:21 +1000

On Tue, 2009-04-14 at 18:13 +0800, [email-masked] 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 <[email-masked]>

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@0/isa@4";
>  	isa = call_prom("finddevice", 1, 1, ADDR(name));

Cheers,
Ben.