karo: tx28: change FDT addr to be in low memory
authorLothar Waßmann <LW@KARO-electronics.de>
Wed, 3 Sep 2014 07:48:18 +0000 (09:48 +0200)
committerLothar Waßmann <LW@KARO-electronics.de>
Wed, 3 Sep 2014 08:20:48 +0000 (10:20 +0200)
put the FDT in lower memory, to keep more space for download on TX28S

board/karo/common/fdt.c
include/configs/tx28.h

index 997239a..c6f4dcc 100644 (file)
@@ -51,7 +51,11 @@ static void karo_set_fdtsize(void *fdt)
 static void *karo_fdt_load_dtb(void)
 {
        int ret;
-       void *fdt = (void *)getenv_ulong("fdtaddr", 16, CONFIG_SYS_FDT_ADDR);
+       void *fdt;
+
+       if (getenv("fdtaddr") == NULL)
+               setenv_hex("fdtaddr", CONFIG_SYS_FDT_ADDR);
+       fdt = (void *)getenv_ulong("fdtaddr", 16, CONFIG_SYS_FDT_ADDR);
 
        if (had_ctrlc()) {
                printf("aborting DTB load\n");
index acaa986..2d521c5 100644 (file)
@@ -85,7 +85,6 @@
 #ifdef CONFIG_OF_LIBFDT
 #define CONFIG_FDT_FIXUP_PARTITIONS
 #define CONFIG_OF_BOARD_SETUP
-#define CONFIG_SYS_FDT_ADDR            (PHYS_SDRAM_1 + SZ_16M)
 #endif
 
 /*
 #define CONFIG_BOOTARGS                        "console=ttyAMA0,115200 ro debug panic=1"
 #define CONFIG_BOOTCOMMAND             "run bootcmd_nand"
 #define CONFIG_LOADADDR                        43000000
+#define CONFIG_FDTADDR                 40001000
 #define CONFIG_SYS_LOAD_ADDR           _pfx(0x, CONFIG_LOADADDR)
+#define CONFIG_SYS_FDT_ADDR            _pfx(0x, CONFIG_FDTADDR)
 #define CONFIG_U_BOOT_IMG_SIZE         SZ_1M
 
 /*
        "bootm_cmd=bootm ${loadaddr} - ${fdtaddr}\0"                    \
        "default_bootargs=set bootargs " CONFIG_BOOTARGS                \
        " ${append_bootargs}\0"                                         \
-       "fdtaddr=41000000\0"                                            \
+       "fdtaddr=" xstr(CONFIG_FDTADDR) "\0"                            \
        "fdtsave=fdt resize;nand erase.part dtb"                        \
        ";nand write ${fdtaddr} dtb ${fdtsize}\0"                       \
        "mtdids=" MTDIDS_DEFAULT "\0"                                   \