summaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2020-09-25 11:09:59 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2020-10-12 16:30:17 +0200
commit4dee9d16c01cec6f290f9ff25cda72416c8d2d3f (patch)
tree6ca40f110dfad0658f0f0749b2cd09d81d20f493 /arch/arm
parent9ddd7b037101828457867f21f54745f2f93a5406 (diff)
downloadbarebox-4dee9d16c01cec6f290f9ff25cda72416c8d2d3f.tar.gz
barebox-4dee9d16c01cec6f290f9ff25cda72416c8d2d3f.tar.xz
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 <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/cpu/dtb.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/arch/arm/cpu/dtb.c b/arch/arm/cpu/dtb.c
index 8094eebf07..35f251d99a 100644
--- a/arch/arm/cpu/dtb.c
+++ b/arch/arm/cpu/dtb.c
@@ -26,13 +26,7 @@ static int of_arm_init(void)
return 0;
}
- root = of_unflatten_dtb(fdt);
- if (!IS_ERR(root)) {
- of_set_root_node(root);
- of_fix_tree(root);
- if (IS_ENABLED(CONFIG_OFDEVICE))
- of_probe();
- }
+ barebox_register_fdt(fdt);
return 0;
}