[PATCH] of: Search for /memory node by type, if it is not found by name

Sascha Hauer s.hauer at pengutronix.de
Thu May 11 01:38:20 PDT 2017


On Wed, May 10, 2017 at 08:51:17PM +0300, Andrey Panov wrote:
> Update of Rockchip dts featured changes of simple "/memory" node
> to "/memory at 6000000". Support this change.
> 
> Signed-off-by: Andrey Panov <rockford at yandex.ru>

Applied, thanks

Sascha

> ---
>  drivers/of/base.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/of/base.c b/drivers/of/base.c
> index c9bdd9181..33f61622a 100644
> --- a/drivers/of/base.c
> +++ b/drivers/of/base.c
> @@ -1910,6 +1910,8 @@ int of_probe(void)
>  		barebox_set_model(of_model);
>  
>  	memory = of_find_node_by_path("/memory");
> +	if (!memory)
> +		memory = of_find_node_by_type(root_node, "memory");
>  	if (memory)
>  		of_add_memory(memory, false);
>  
> -- 
> 2.11.0
> 
> 
> _______________________________________________
> barebox mailing list
> barebox at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list