bootm: Setting fdt_high at the end of board_init

We set 'fdt_high' inside 'bootipq' command.
While booting initramfs image using bootm,
fdt_high is not set causing fdt being loaded
at some random address that could be reserved
from kernel causing boot failure.

Change-Id: I769367dda8cbdf1b1b95233af52780f6d674f50f
Signed-off-by: Gokul Sriram Palanisamy <gokulsri@codeaurora.org>
This commit is contained in:
Gokul Sriram Palanisamy 2018-07-10 15:21:14 +05:30
parent 84705ce4b0
commit c2382fa2fd
3 changed files with 11 additions and 2 deletions

View file

@ -29,6 +29,9 @@
#include <asm/arch-ipq806x/clock.h>
#endif
#define XMK_STR(x)#x
#define MK_STR(x)XMK_STR(x)
struct ipq_i2c_platdata {
int type;
};

View file

@ -13,6 +13,7 @@
#include <common.h>
#include <environment.h>
#include <asm/arch-qca-common/qca_common.h>
#include <asm/arch-qca-common/smem.h>
#include <asm/arch-qca-common/uart.h>
#include <asm/arch-qca-common/gpio.h>
@ -332,6 +333,12 @@ int board_late_init(void)
}
#endif
set_ethmac_addr();
/*
* set fdt_high parameter so that u-boot will not
* load dtb above CONFIG_IPQ_FDT_HIGH region.
*/
run_command("setenv fdt_high " MK_STR(CONFIG_IPQ_FDT_HIGH) "\n", 0);
return 0;
}

View file

@ -29,11 +29,10 @@
#include <spi_flash.h>
#include <spi.h>
#include <asm/arch-qca-common/iomap.h>
#include <asm/arch-qca-common/qca_common.h>
#include <asm/io.h>
#define DLOAD_MAGIC_COOKIE 0x10
#define XMK_STR(x)#x
#define MK_STR(x)XMK_STR(x)
#define MAX_TFTP_SIZE 0x40000000
static int debug = 0;