From c160a9544743e80e8889edb2275538e7764ce334 Mon Sep 17 00:00:00 2001 From: Kumar Gala Date: Fri, 15 Aug 2008 08:24:36 -0500 Subject: bootm: refactor entry point code Move entry point code out of each arch and into common code. Keep the entry point in the bootm_headers_t images struct. Signed-off-by: Kumar Gala --- lib_sparc/bootm.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'lib_sparc') diff --git a/lib_sparc/bootm.c b/lib_sparc/bootm.c index b1a3d98c1..ac15396f6 100644 --- a/lib_sparc/bootm.c +++ b/lib_sparc/bootm.c @@ -87,7 +87,7 @@ void do_bootm_linux(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[], bootm_headers_t * images) { char *bootargs; - ulong ep, load; + ulong load; ulong initrd_start, initrd_end; ulong rd_data_start, rd_data_end, rd_len; unsigned int data, len, checksum; @@ -97,17 +97,9 @@ void do_bootm_linux(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[], int ret; if (images->legacy_hdr_valid) { - ep = image_get_ep(images->legacy_hdr_os); load = image_get_load(images->legacy_hdr_os); #if defined(CONFIG_FIT) } else if (images->fit_uname_os) { - int ret = fit_image_get_entry(images->fit_hdr_os, - images->fit_noffset_os, &ep); - if (ret) { - puts("Can't get entry point property!\n"); - goto error; - } - ret = fit_image_get_load(images->fit_hdr_os, images->fit_noffset_os, &load); if (ret) { @@ -124,7 +116,7 @@ void do_bootm_linux(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[], linux_hdr = (void *)load; /* */ - kernel = (void (*)(struct linux_romvec *, void *))ep; + kernel = (void (*)(struct linux_romvec *, void *))images->ep; /* check for a SPARC kernel */ if ((linux_hdr->hdr[0] != 'H') || -- cgit v1.2.3