From 4dee9d16c01cec6f290f9ff25cda72416c8d2d3f Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Fri, 25 Sep 2020 11:09:59 +0200 Subject: of: Add common device tree register function The different architectures duplicate some code around unflattening and registering the device tree. Add common functions to reduce this duplication. Signed-off-by: Sascha Hauer --- arch/mips/boot/dtb.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'arch/mips') diff --git a/arch/mips/boot/dtb.c b/arch/mips/boot/dtb.c index 5e316270f6..2aff4adbe7 100644 --- a/arch/mips/boot/dtb.c +++ b/arch/mips/boot/dtb.c @@ -42,13 +42,7 @@ static int of_mips_init(void) if (!fdt) fdt = __dtb_start; - root = of_unflatten_dtb(fdt); - if (!IS_ERR(root)) { - pr_debug("using internal DTB\n"); - of_set_root_node(root); - if (IS_ENABLED(CONFIG_OFDEVICE)) - of_probe(); - } + barebox_register_fdt(fdt); return 0; } -- cgit v1.2.3