summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2016-01-14 12:32:45 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2016-01-22 08:15:15 +0100
commit80f6d5db3041f2ae1109f3f811cf48e4f25142e4 (patch)
treec579feac72acdc0fca0818c1dd1918cc187e5413 /arch
parent0a37e22d638acf1b2c7c6e6ab83b6a3272b0a11c (diff)
downloadbarebox-80f6d5db3041f2ae1109f3f811cf48e4f25142e4.tar.gz
barebox-80f6d5db3041f2ae1109f3f811cf48e4f25142e4.tar.xz
ARM: bootm: Use kernel handler to start barebox image
barebox can be called with the kernel calling convention, so we can reuse the handler instead of creating a barebox specific handler. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/lib/bootm.c30
1 files changed, 1 insertions, 29 deletions
diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
index 0855907aec..010b668e68 100644
--- a/arch/arm/lib/bootm.c
+++ b/arch/arm/lib/bootm.c
@@ -355,37 +355,9 @@ static struct image_handler zimage_handler = {
.filetype = filetype_arm_zimage,
};
-static int do_bootm_barebox(struct image_data *data)
-{
- void *barebox;
-
- barebox = read_file(data->os_file, NULL);
- if (!barebox)
- return -EINVAL;
-
- if (IS_ENABLED(CONFIG_OFTREE) && data->of_root_node) {
- data->oftree = of_get_fixed_tree(data->of_root_node);
- fdt_add_reserve_map(data->oftree);
- of_print_cmdline(data->of_root_node);
- if (bootm_verbose(data) > 1)
- of_print_nodes(data->of_root_node, 0);
- }
-
- if (bootm_verbose(data)) {
- printf("\nStarting barebox at 0x%p", barebox);
- if (data->oftree)
- printf(", oftree at 0x%p", data->oftree);
- printf("...\n");
- }
-
- start_linux(barebox, 0, 0, 0, data->oftree);
-
- restart_machine();
-}
-
static struct image_handler barebox_handler = {
.name = "ARM barebox",
- .bootm = do_bootm_barebox,
+ .bootm = do_bootm_linux,
.filetype = filetype_arm_barebox,
};