From f27ffe4177a7cc09614e2f87012234c1e260c8f2 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Tue, 18 Aug 2020 07:43:50 -0400 Subject: arm: mx6: Make all i.MX6 SoCs user-selectable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We have a number of platforms that are a combination of a carrier board and System-on-Module (SoM) that in turn allows for the board to have different SoCs on it. In some cases, this is handled via board-specific Kconfig options. In other cases we make use of CONFIG_SYS_EXTRA_OPTIONS. This latter case however can lead to invalid configurations as we will not in turn get options that in Kconfig are selected by or depend on that setting. To resolve this, make the SoC option a choice in Kconfig and make boards depend on what they can support. This change opens us up for further clean-ups in the cases where a single CONFIG_TARGET_xxx can support different SoCs and today they do not, or do not cleanly do so. Reported-by: Matt Porter Cc: Stefano Babic Cc: Fabio Estevam Cc: "NXP i.MX U-Boot Team" Cc: Soeren Moch Cc: Markus Niebel Cc: Igor Opaniuk Cc: Heiko Schocher Cc: Hannes Schmelzer Cc: Otavio Salvador Cc: Nikita Kiryanov Cc: Andreas Geisreiter Cc: Ludwig Zenz Cc: Lukasz Majewski Cc: Akshay Bhat Cc: Ken Lin Cc: Ian Ray Cc: Tim Harvey Cc: Jagan Teki Cc: Raffaele RECALCATI Cc: Simone CIANNI Cc: Adam Ford Cc: Marcin Niestroj Cc: "Eric Bénard" Cc: Baruch Siach Cc: Jason Liu Cc: Ye Li Cc: Eric Nelson Cc: Troy Kisky Cc: Peng Fan Cc: Parthiban Nallathambi Cc: Marek Vasut Cc: "Sébastien Szymanski" Cc: Christian Gmeiner Cc: Niel Fourie Cc: Martyn Welch Cc: Richard Hu Cc: Stefan Roese Cc: Boris Brezillon Cc: Arkadiusz Karas Cc: Breno Lima Cc: Francesco Montefoschi Cc: Silvio Fricke Tested-by: Matt Porter [colibri_imx6] Signed-off-by: Tom Rini Reviewed-by: Marcin Niestroj --- include/configs/titanium.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'include') diff --git a/include/configs/titanium.h b/include/configs/titanium.h index 7678f69ded..895c79f1a9 100644 --- a/include/configs/titanium.h +++ b/include/configs/titanium.h @@ -14,8 +14,6 @@ #include "mx6_common.h" -#define CONFIG_MX6Q - /* Provide the MACH_TYPE value that the vendor kernel requires. */ #define CONFIG_MACH_TYPE 3769 -- cgit From 74d8f9d56266773784be2cecb5f52a573b1d060c Mon Sep 17 00:00:00 2001 From: Adam Ford Date: Thu, 20 Aug 2020 08:56:49 -0500 Subject: ARM: imx6q_logic: Fix broken booting by moving fdt_addr_r address The loading address is too close to the kernel address, so newer kernels may overlap memory space, so loading the device tree may corrupt zImage. This patch moves the fdt_addr_r to 0x14000000 which is also consistent with guidance that the kernel be allocated 32MB. This places it in the same place as the ramdisk, so this patch moves the ramdisk address 512KB after the fdt. Signed-off-by: Adam Ford Reviewed-by: Tom Rini Reviewed-by: Fabio Estevam --- include/configs/imx6_logic.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/configs/imx6_logic.h b/include/configs/imx6_logic.h index 63662dd18d..6b992f9ab8 100644 --- a/include/configs/imx6_logic.h +++ b/include/configs/imx6_logic.h @@ -34,8 +34,8 @@ "script=boot.scr\0" \ "image=zImage\0" \ "bootm_size=0x10000000\0" \ - "fdt_addr_r=0x13000000\0" \ - "ramdisk_addr_r=0x14000000\0" \ + "fdt_addr_r=0x14000000\0" \ + "ramdisk_addr_r=0x14080000\0" \ "kernel_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \ "ramdisk_file=rootfs.cpio.uboot\0" \ "boot_fdt=try\0" \ -- cgit From acbc1d86f16cc8372cccb7b862a0b9dc242f8fe5 Mon Sep 17 00:00:00 2001 From: Grygorii Tertychnyi Date: Fri, 21 Aug 2020 15:39:43 +0200 Subject: imx8m: config: convert to bootm_size Restrict the memory range available for image processing in the "bootm" to 256 MiB so the kernel can access it and FDT or initrd are not overwritten on ARM64. Signed-off-by: Grygorii Tertychnyi Cc: Peng Fan Cc: Marek Vasut Cc: Andrey Zhizhikin Reviewed-by: Tom Rini --- include/configs/imx8mm_evk.h | 3 +-- include/configs/imx8mn_evk.h | 3 +-- include/configs/imx8mp_evk.h | 3 +-- include/configs/imx8mq_evk.h | 4 +--- 4 files changed, 4 insertions(+), 9 deletions(-) (limited to 'include') diff --git a/include/configs/imx8mm_evk.h b/include/configs/imx8mm_evk.h index 57971ca714..83521ad401 100644 --- a/include/configs/imx8mm_evk.h +++ b/include/configs/imx8mm_evk.h @@ -38,11 +38,10 @@ "image=Image\0" \ "console=ttymxc1,115200\0" \ "fdt_addr=0x43000000\0" \ - "fdt_high=0xffffffffffffffff\0" \ "boot_fit=no\0" \ "fdt_file=imx8mm-evk.dtb\0" \ "initrd_addr=0x43800000\0" \ - "initrd_high=0xffffffffffffffff\0" \ + "bootm_size=0x10000000\0" \ "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \ "mmcpart=" __stringify(CONFIG_SYS_MMC_IMG_LOAD_PART) "\0" \ "mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \ diff --git a/include/configs/imx8mn_evk.h b/include/configs/imx8mn_evk.h index d819266f99..a6333085fe 100644 --- a/include/configs/imx8mn_evk.h +++ b/include/configs/imx8mn_evk.h @@ -42,11 +42,10 @@ "image=Image.itb\0" \ "console=ttymxc1,115200\0" \ "fdt_addr=0x43000000\0" \ - "fdt_high=0xffffffffffffffff\0" \ "boot_fit=try\0" \ "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \ "initrd_addr=0x43800000\0" \ - "initrd_high=0xffffffffffffffff\0" \ + "bootm_size=0x10000000\0" \ "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \ "mmcpart=" __stringify(CONFIG_SYS_MMC_IMG_LOAD_PART) "\0" \ "mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \ diff --git a/include/configs/imx8mp_evk.h b/include/configs/imx8mp_evk.h index ded0717ddb..8253c6aa2f 100644 --- a/include/configs/imx8mp_evk.h +++ b/include/configs/imx8mp_evk.h @@ -50,11 +50,10 @@ "image=Image\0" \ "console=ttymxc1,115200 earlycon=ec_imx6q,0x30890000,115200\0" \ "fdt_addr=0x43000000\0" \ - "fdt_high=0xffffffffffffffff\0" \ "boot_fdt=try\0" \ "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \ "initrd_addr=0x43800000\0" \ - "initrd_high=0xffffffffffffffff\0" \ + "bootm_size=0x10000000\0" \ "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \ "mmcpart=" __stringify(CONFIG_SYS_MMC_IMG_LOAD_PART) "\0" \ "mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \ diff --git a/include/configs/imx8mq_evk.h b/include/configs/imx8mq_evk.h index d98f9263ca..3f9a3bc100 100644 --- a/include/configs/imx8mq_evk.h +++ b/include/configs/imx8mq_evk.h @@ -83,7 +83,6 @@ "clk_ignore_unused "\ "\0" \ "initrd_addr=0x43800000\0" \ - "initrd_high=0xffffffff\0" \ "bootcmd_mfg=run mfgtool_args;booti ${loadaddr} ${initrd_addr} ${fdt_addr};\0" \ /* Initial environment variables */ #define CONFIG_EXTRA_ENV_SETTINGS \ @@ -92,11 +91,10 @@ "image=Image\0" \ "console=ttymxc0,115200\0" \ "fdt_addr=0x43000000\0" \ - "fdt_high=0xffffffffffffffff\0" \ "boot_fdt=try\0" \ "fdt_file=imx8mq-evk.dtb\0" \ "initrd_addr=0x43800000\0" \ - "initrd_high=0xffffffffffffffff\0" \ + "bootm_size=0x10000000\0" \ "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \ "mmcpart=" __stringify(CONFIG_SYS_MMC_IMG_LOAD_PART) "\0" \ "mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \ -- cgit