diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2014-01-09 09:59:59 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2014-01-10 11:53:18 +0100 |
commit | 9bd67f5e6184ecd03b8e052706218f2a741027c3 (patch) | |
tree | 51a5ac95bbc796e0acd756d1fa8df9b4a65f90fb /arch/blackfin/lib | |
parent | f1025bbf3292c8c199e23e618c062ec1e9f2f055 (diff) | |
download | barebox-9bd67f5e6184ecd03b8e052706218f2a741027c3.tar.gz barebox-9bd67f5e6184ecd03b8e052706218f2a741027c3.tar.xz |
bootm: introduce bootm_load_os helper
The common bootm code used to load uImage contents to SDRAM
before calling into the handlers if possible. This makes the
handlers complicated since they have to handle many cases. Instead,
introduce a helper to load the os after the handlers have figured
out a good load address.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/blackfin/lib')
-rw-r--r-- | arch/blackfin/lib/blackfin_linux.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/blackfin/lib/blackfin_linux.c b/arch/blackfin/lib/blackfin_linux.c index bb3c7745ea..2561a7e152 100644 --- a/arch/blackfin/lib/blackfin_linux.c +++ b/arch/blackfin/lib/blackfin_linux.c @@ -41,9 +41,11 @@ static int do_bootm_linux(struct image_data *idata) int (*appl)(char *cmdline); const char *cmdline = linux_bootargs_get(); char *cmdlinedest = (char *) CMD_LINE_ADDR; + int ret; - if (!idata->os_res) - return -EINVAL; + ret = bootm_load_os(idata, idata->os_address); + if (ret) + return ret; appl = (void *)(idata->os_address + idata->os_entry); printf("Starting Kernel at 0x%p\n", appl); |