From: Lothar Waßmann Date: Fri, 21 Jul 2017 11:33:21 +0000 (+0200) Subject: karo: tx6: prevent DTB from either being out of reach of kernel or overwritten during... X-Git-Tag: KARO-TX6QP-2017-07-21~1 X-Git-Url: https://git.kernelconcepts.de/?p=karo-tx-uboot.git;a=commitdiff_plain;h=9b5066ccc91ccab1887fb8c2182db2092880e5d1;ds=sidebyside karo: tx6: prevent DTB from either being out of reach of kernel or overwritten during uncompress The current setting of fdtaddr and fdt_high has proven to be inappropriate in that either the FDT may be out of reach of the kernel or may be overwritten by the uncompressing Linux kernel. Set fdt_high to an offset of 256MiB from SDRAM start, so that it is valid for any board regardless of memory size while preventing the described problems. --- diff --git a/include/configs/tx6.h b/include/configs/tx6.h index 146f22040b..a5bab22582 100644 --- a/include/configs/tx6.h +++ b/include/configs/tx6.h @@ -99,10 +99,10 @@ #define PHYS_SDRAM_1_SIZE (UL(CONFIG_SYS_SDRAM_CHIP_SIZE) * \ SZ_1M / 32 * \ CONFIG_SYS_SDRAM_BUS_WIDTH) -#if PHYS_SDRAM_1_SIZE > SZ_1G -#define FDT_HIGH_STR "fdt_high=ffffffff\0" +#ifndef CONFIG_BOARD_TX6UL +#define FDT_HIGH_ADDR_STR "20000000" #else -#define FDT_HIGH_STR "" +#define FDT_HIGH_ADDR_STR "90000000" #endif #ifdef CONFIG_SOC_MX6Q @@ -237,8 +237,8 @@ EMMC_BOOT_PART_STR \ EMMC_BOOT_ACK_STR \ "fdtaddr=" xstr(CONFIG_FDTADDR) "\0" \ - FDT_HIGH_STR \ FDTSAVE_CMD_STR \ + "fdt_high=" FDT_HIGH_ADDR_STR "\0" \ "mtdids=" MTDIDS_DEFAULT "\0" \ "mtdparts=" MTDPARTS_DEFAULT "\0" \ "nfsroot=/tftpboot/rootfs\0" \