From 1fae23899c7d6a7f44dec6a963d6c74ce5fe5c19 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Mon, 2 Dec 2019 20:40:28 -0300 Subject: warp7: Fix U-Boot corruption after saving the environment U-Boot binary has grown in such a way that it goes beyond the reserved area for the environment variables. Running "saveenv" followed by a "reset" causes U-Boot to hang because of this overlap. Fix this problem by increasing the CONFIG_ENV_OFFSET size. Also, in order to prevent this same problem in the future, use CONFIG_BOARD_SIZE_LIMIT, which will detect the overlap in build-time. CONFIG_BOARD_SIZE_LIMIT does not accept math expressions, so declare CONFIG_ENV_OFFSET with its direct value instead. Signed-off-by: Fabio Estevam Acked-by: Pierre-Jean Texier Tested-by: Pierre-Jean Texier Acked-by: Joris Offouga Tested-by: Joris Offouga --- include/configs/warp7.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'include') diff --git a/include/configs/warp7.h b/include/configs/warp7.h index 9a82581c5f..da894ec0ca 100644 --- a/include/configs/warp7.h +++ b/include/configs/warp7.h @@ -125,6 +125,19 @@ #define CONFIG_SYS_INIT_SP_ADDR \ (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) +/* + * Environment starts at CONFIG_ENV_OFFSET= 0xC0000 = 768k = 768*1024 = 786432 + * + * Detect overlap between U-Boot image and environment area in build-time + * + * CONFIG_BOARD_SIZE_LIMIT = CONFIG_ENV_OFFSET - u-boot.imx offset + * CONFIG_BOARD_SIZE_LIMIT = 768k - 1k = 767k = 785408 + * + * Currently CONFIG_BOARD_SIZE_LIMIT does not handle expressions, so + * write the direct value here + */ +#define CONFIG_BOARD_SIZE_LIMIT 785408 + /* I2C configs */ #define CONFIG_SYS_I2C_MXC #define CONFIG_SYS_I2C_SPEED 100000 -- cgit From 949b5a969d107613b61a1e5eaf9e43c75a97f42c Mon Sep 17 00:00:00 2001 From: Igor Opaniuk Date: Tue, 3 Dec 2019 14:04:46 +0200 Subject: common: fdt_support: add support for setting usable memory Add support for setting linux,usable-memory property in the memory node of device tree for the kernel [1]. This property holds a base address and size, describing a limited region in which memory may be considered available for use by the kernel. Memory outside of this range is not available for use. [1] https://www.kernel.org/doc/Documentation/devicetree/bindings/chosen.txt Signed-off-by: Igor Opaniuk Signed-off-by: Sanchayan Maity Signed-off-by: Stefan Agner Reviewed-by: Oleksandr Suvorov --- include/fdt_support.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/fdt_support.h b/include/fdt_support.h index cefb2b2cce..2286ea7793 100644 --- a/include/fdt_support.h +++ b/include/fdt_support.h @@ -94,6 +94,7 @@ int fdt_fixup_memory(void *blob, u64 start, u64 size); */ #ifdef CONFIG_ARCH_FIXUP_FDT_MEMORY int fdt_fixup_memory_banks(void *blob, u64 start[], u64 size[], int banks); +int fdt_set_usable_memory(void *blob, u64 start[], u64 size[], int banks); #else static inline int fdt_fixup_memory_banks(void *blob, u64 start[], u64 size[], int banks) -- cgit From 7d84f4469f1e3956e8adf4c201df1b5fec435916 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Tue, 26 Nov 2019 09:39:08 +0100 Subject: ARM: imx: vining2000: Convert to SPL framework In preparation for use of DDR DRAM fine-tuning upon boot, convert the board to SPL framework instead of using DCD tables to bring up DRAM and pinmux. Signed-off-by: Marek Vasut Cc: Fabio Estevam Cc: Silvio Fricke Cc: Stefano Babic --- include/configs/vining_2000.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/configs/vining_2000.h b/include/configs/vining_2000.h index 54c8c2f62e..377406f842 100644 --- a/include/configs/vining_2000.h +++ b/include/configs/vining_2000.h @@ -91,4 +91,8 @@ #define CONFIG_SYS_MMC_ENV_PART 1 /* boot0 */ #endif +#ifdef CONFIG_SPL_BUILD +#define CONFIG_MXC_UART_BASE UART1_BASE +#endif + #endif /* __CONFIG_H */ -- cgit From 26822fd23cb1cf5eebe88547d879c01756228748 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Tue, 26 Nov 2019 09:39:10 +0100 Subject: ARM: imx: vining2000: Convert to ethernet DM Convert the board to ethernet DM support. Adjust board file accordingly, as the board_eth_init() contains custom clock configuration required for this board to work. Furthermore, enable FEC1 clock to make FEC1 work as well. Signed-off-by: Marek Vasut Cc: Fabio Estevam Cc: Silvio Fricke Cc: Stefano Babic --- include/configs/vining_2000.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'include') diff --git a/include/configs/vining_2000.h b/include/configs/vining_2000.h index 377406f842..0c0baf2738 100644 --- a/include/configs/vining_2000.h +++ b/include/configs/vining_2000.h @@ -58,8 +58,6 @@ #define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08 /* Network */ -#define CONFIG_FEC_MXC - #define IMX_FEC_BASE ENET_BASE_ADDR #define CONFIG_FEC_MXC_PHYADDR 0x0 -- cgit From 5c1c7c1ef81503ccae531704ac9dbd8cb41e5b49 Mon Sep 17 00:00:00 2001 From: Anatolij Gustschin Date: Mon, 21 Oct 2019 17:31:53 +0200 Subject: imx: imx8qxp_mek: increase buffer sizes and args number The default value of CONFIG_SYS_CBSIZE is too small when we need to input long commands or when using long kernel command line. The default value of CONFIG_SYS_MAXARGS is too small to add a long command line, and the kernel might not boot as intended without the complete bootargs. Increase argument buffer sizes and the number of arguments. Signed-off-by: Anatolij Gustschin Reviewed-by: Peng Fan --- include/configs/imx8qxp_mek.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/configs/imx8qxp_mek.h b/include/configs/imx8qxp_mek.h index cb39bcdebf..81ac4b52f3 100644 --- a/include/configs/imx8qxp_mek.h +++ b/include/configs/imx8qxp_mek.h @@ -196,4 +196,9 @@ #define CONFIG_FEC_XCV_TYPE RGMII #define FEC_QUIRK_ENET_MAC +/* Misc configuration */ +#define CONFIG_SYS_CBSIZE 2048 +#define CONFIG_SYS_MAXARGS 64 +#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE + #endif /* __IMX8QXP_MEK_H */ -- cgit