diff options
author | Murali Karicheri <m-karicheri2@ti.com> | 2014-07-09 23:44:45 +0300 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2014-07-25 16:26:10 -0400 |
commit | 0bedbb81351193f1507ad127b6b26e19a93c2c42 (patch) | |
tree | 902fe31208b99ccbf9d860fde58424ba22d5e509 /board | |
parent | 3d315386255f6d944c0ccb4c7c8819ce604429ab (diff) | |
download | u-boot-imx-0bedbb81351193f1507ad127b6b26e19a93c2c42.zip u-boot-imx-0bedbb81351193f1507ad127b6b26e19a93c2c42.tar.gz u-boot-imx-0bedbb81351193f1507ad127b6b26e19a93c2c42.tar.bz2 |
keystone2: add env option to do unitrd dt fixup
With latest v3.13 kernel, unitrd dt fixup is not needed. However for
older kernel versions such as v3.8/v3.10, it is needed. So to work
with both, add a u-boot env variable that can be set to do dt fixup
for older kernels.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
Diffstat (limited to 'board')
-rw-r--r-- | board/ti/k2hk_evm/board.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/board/ti/k2hk_evm/board.c b/board/ti/k2hk_evm/board.c index 3333eb0..646ecb3 100644 --- a/board/ti/k2hk_evm/board.c +++ b/board/ti/k2hk_evm/board.c @@ -157,11 +157,14 @@ void ft_board_setup(void *blob, bd_t *bd) u64 size[2]; char name[32], *env, *endp; int lpae, nodeoffset; + int unitrd_fixup = 0; u32 ddr3a_size; int nbanks; env = getenv("mem_lpae"); lpae = env && simple_strtol(env, NULL, 0); + env = getenv("uinitrd_fixup"); + unitrd_fixup = env && simple_strtol(env, NULL, 0); ddr3a_size = 0; if (lpae) { @@ -204,10 +207,11 @@ void ft_board_setup(void *blob, bd_t *bd) fdt_fixup_memory_banks(blob, start, size, nbanks); /* Fix up the initrd */ - if (lpae) { + if (lpae && unitrd_fixup) { u64 initrd_start, initrd_end; u32 *prop1, *prop2; int err; + nodeoffset = fdt_path_offset(blob, "/chosen"); if (nodeoffset >= 0) { prop1 = (u32 *)fdt_getprop(blob, nodeoffset, |