On Tue, 2009-04-14 at 18:13 +0800, [email protected] 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 protected]>
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 = "/h...@0/i...@4";
> isa = call_prom("finddevice", 1, 1, ADDR(name));
Cheers,
Ben.
_______________________________________________
Linuxppc-dev mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-dev