summaryrefslogtreecommitdiff
path: root/common/spl/spl_ubi.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/spl/spl_ubi.c')
-rw-r--r--common/spl/spl_ubi.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/common/spl/spl_ubi.c b/common/spl/spl_ubi.c
index a7939e9030..67e5fadd7c 100644
--- a/common/spl/spl_ubi.c
+++ b/common/spl/spl_ubi.c
@@ -61,8 +61,7 @@ int spl_ubi_load_image(struct spl_image_info *spl_image,
puts("Loading Linux failed, falling back to U-Boot.\n");
}
#endif
- header = (struct image_header *)
- (CONFIG_SYS_TEXT_BASE - sizeof(struct image_header));
+ header = spl_get_load_buffer(-sizeof(*header), sizeof(header));
volumes[0].vol_id = CONFIG_SPL_UBI_LOAD_MONITOR_ID;
volumes[0].load_addr = (void *)header;