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/ppc | |
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/ppc')
-rw-r--r-- | arch/ppc/lib/ppclinux.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/ppc/lib/ppclinux.c b/arch/ppc/lib/ppclinux.c index 7c30ac3386..e25efecd43 100644 --- a/arch/ppc/lib/ppclinux.c +++ b/arch/ppc/lib/ppclinux.c @@ -47,9 +47,11 @@ static int do_bootm_linux(struct image_data *data) { void (*kernel)(void *, void *, unsigned long, unsigned long, unsigned long); + int ret; - if (!data->os_res) - return -EINVAL; + ret = bootm_load_os(data, data->os_address); + if (ret) + return ret; data->oftree = of_get_fixed_tree(data->of_root_node); if (!data->oftree) { |