summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorLokesh Vutla <lokeshvutla@ti.com>2016-06-01 10:28:31 +0530
committerKlaus Goger <klaus.goger@theobroma-systems.com>2016-09-18 20:22:04 +0200
commitf0f52c92c4732367589c13fe88d30537a45b4343 (patch)
tree89bfddec2debd01bb0117b00463625a06ddb6dfe /common
parente72c68614e9c77e0d46b18d7ec24cbda07b34c5a (diff)
spl: fit: Fix load address of fit header
When loading fit header, it should be loaded to a previous address aligned to ARCH_DMA_MINALIGN and not 8. Fixing the same. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Diffstat (limited to 'common')
-rw-r--r--common/spl/spl_fit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c
index a828f72da8..c9eb020bbc 100644
--- a/common/spl/spl_fit.c
+++ b/common/spl/spl_fit.c
@@ -156,8 +156,8 @@ int spl_load_simple_fit(struct spl_load_info *info, ulong sector, void *fit)
* In fact the FIT has its own load address, but we assume it cannot
* be before CONFIG_SYS_TEXT_BASE.
*/
- fit = (void *)(CONFIG_SYS_TEXT_BASE - size - info->bl_len);
- fit = (void *)ALIGN((ulong)fit, 8);
+ fit = (void *)((CONFIG_SYS_TEXT_BASE - size - info->bl_len -
+ align_len) & ~align_len);
sectors = get_aligned_image_size(info, size, 0);
count = info->read(info, sector, sectors, fit);
debug("fit read sector %lx, sectors=%d, dst=%p, count=%lu\n",