omap3: igep0x00: Fix boot failure and modernize the boards support
cover omap3: igep0x00: Fix boot failure and modernize the boards support
Hello,
I noticed that the IGEPv2 board did not boot anymore with mainline U-Boot. This was caused by a driver change to allocate its platform data before relocation and U-Boot not having enough pre-relocation heap size for this.
This series fixes this issue and also makes the board support more modern, by enabling DM for SPL and migrating the IGEP boards to use upstream DTBs.
It is a resend because previous emails were blocked on moderator approval due not being subscribed in the mailing list. Hopefully this time makes it through, sorry for the spam to folks Cc'ed.
Best regards,
Javier
Javier Martinez Canillas (4):
omap3: igep00x0: Increase malloc() pool size
omap3: igep0x00: Drop unused SPI support
omap3: igep0x00: Update for DM SPL support
omap3: igep0x00: Migrate to use upstream DT
arch/arm/dts/Makefile | 3 - arch/arm/dts/omap3-igep.dtsi | 247 ---------------------- arch/arm/dts/omap3-igep0020-common.dtsi | 261 ------------------------ arch/arm/dts/omap3-igep0020-u-boot.dtsi | 14 +- arch/arm/dts/omap3-igep0020.dts | 47 ----- board/isee/igep00x0/igep00x0.c | 12 -- configs/igep00x0_defconfig | 26 ++- 7 files changed, 14 insertions(+), 596 deletions(-) delete mode 100644 arch/arm/dts/omap3-igep.dtsi delete mode 100644 arch/arm/dts/omap3-igep0020-common.dtsi delete mode 100644 arch/arm/dts/omap3-igep0020.dts
Signature · 1 line
2.45.0
PATCH RESEND 1/4 omap3: igep00x0: Increase malloc() pool size
The IGEPv2 board boot started to fail since the commit afd4f15a39de ("spi:omap3_spi: Read platform data in ofdata_to_platdata()"). Because this made the OMAP3 SPI controller driver to allocate its platform data before doing a relocation, but the igep0x00 config sets this pool size to just 1 KiB.
Increase the pre-relocation malloc heap size to 16 KiB, as is set by other OMAP3 boards. This not only restores booting but also makes it consistent.
Leave the SPL pool size to the previous 1 KiB size since 16 KiB may not be a possible size in that constrained environment and is also the value that is set by other OMAP3 boards.
---
configs/igep00x0_defconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
configs/igep00x0_defconfig +2 -1
@@ -1,6 +1,6 @@ CONFIG_ARM=y CONFIG_ARCH_OMAP2PLUS=y -CONFIG_SYS_MALLOC_F_LEN=0x400 +CONFIG_SYS_MALLOC_F_LEN=0x4000 CONFIG_TI_COMMON_CMD_OPTIONS=y CONFIG_NR_DRAM_BANKS=2 CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
@@ -10,6 +10,7 @@ CONFIG_DEFAULT_DEVICE_TREE="omap3-igep0020" CONFIG_SPL_TEXT_BASE=0x40200000 CONFIG_TARGET_OMAP3_IGEP00X0=y CONFIG_SYS_MONITOR_LEN=262144 +CONFIG_SPL_SYS_MALLOC_F_LEN=0x400 CONFIG_SPL=y CONFIG_DISTRO_DEFAULTS=y CONFIG_BOOTDELAY=3
Signature · 1 line
2.45.0
PATCH RESEND 2/4 omap3: igep0x00: Drop unused SPI support
In reply to Javier Martinez CanillasThere are no SPI peripherals in neither the IGEPv2 board nor the IGEP COM Module, so there's no reason to have this enabled in the boards defconfig.
---
configs/igep00x0_defconfig | 3 --- 1 file changed, 3 deletions(-)
configs/igep00x0_defconfig +0 -3
@@ -82,7 +82,4 @@ CONFIG_SYS_NAND_OOBSIZE=0x40 CONFIG_SYS_NAND_BUSWIDTH_16BIT=y CONFIG_MTD_UBI_FASTMAP=y CONFIG_CONS_INDEX=3 -CONFIG_SPI=y -CONFIG_DM_SPI=y -CONFIG_OMAP3_SPI=y CONFIG_BCH=y
Signature · 1 line
2.45.0
PATCH RESEND 3/4 omap3: igep0x00: Update for DM SPL support
In reply to Javier Martinez CanillasThis change is heavily based on commit e0cc7df9fdf2 ("omap3_beagle: Update for DM SPL support"), that did the same update for the OMAP3 Beagle board.
---
arch/arm/dts/omap3-igep0020-u-boot.dtsi | 14 ++------------ board/isee/igep00x0/igep00x0.c | 12 ------------ configs/igep00x0_defconfig | 17 ++++++++--------- 3 files changed, 10 insertions(+), 33 deletions(-)
arch/arm/dts/omap3-igep0020-u-boot.dtsi +2 -12
@@ -5,20 +5,10 @@ * (C) Copyright 2017 Derald D. Woods <[email protected]> */ +#include "omap3-u-boot.dtsi" + / { chosen { stdout-path = &uart3; }; }; - -&uart1 { - reg-shift = <2>; -}; - -&uart2 { - reg-shift = <2>; -}; - -&uart3 { - reg-shift = <2>; -};
board/isee/igep00x0/igep00x0.c +0 -12
@@ -29,18 +29,6 @@#include <fdt_support.h> #include "igep00x0.h" -static const struct ns16550_plat igep_serial = { - .base =OMAP34XX_UART3 , - .reg_shift =2 , - .clock =V_NS16550_CLK , - .fcr =UART_FCR_DEFVAL , -}; - -U_BOOT_DRVINFO (igep_uart) = { -"ns16550_serial" , - &igep_serial -}; -/* * Routine: get_board_revision * Description: GPIO_28 and GPIO_129 are used to read board and revision from
configs/igep00x0_defconfig +8 -9
@@ -1,4 +1,6 @@ CONFIG_ARM=y +# CONFIG_SPL_USE_ARCH_MEMCPY is not set +# CONFIG_SPL_USE_ARCH_MEMSET is not set CONFIG_ARCH_OMAP2PLUS=y CONFIG_SYS_MALLOC_F_LEN=0x4000 CONFIG_TI_COMMON_CMD_OPTIONS=y
@@ -40,16 +42,7 @@ CONFIG_SPL_UBI_LEB_START=2048 CONFIG_SPL_UBI_INFO_ADDR=0x88080000 CONFIG_SPL_UBI_VOL_IDS=8 CONFIG_SPL_UBI_LOAD_MONITOR_ID=0 -CONFIG_SPL_UBI_LOAD_KERNEL_ID=3 -CONFIG_SPL_UBI_LOAD_ARGS_ID=4 CONFIG_SPL_ONENAND_SUPPORT=y -CONFIG_SPL_OS_BOOT=y -CONFIG_SPL_PAYLOAD_ARGS_ADDR=0x84000000 -CONFIG_SYS_NAND_SPL_KERNEL_OFFS=0x280000 -CONFIG_SPL_FALCON_BOOT_MMCSD=y -CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR=0x1700 -CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR=0x1500 -CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS=0x200 CONFIG_CMD_SPL=y CONFIG_CMD_NAND=y CONFIG_CMD_ONENAND=y
@@ -59,7 +52,11 @@ CONFIG_CMD_CACHE=y CONFIG_CMD_MTDPARTS=y CONFIG_CMD_UBI=y # CONFIG_CMD_UBIFS is not set +# CONFIG_SPL_EFI_PARTITION is not set +CONFIG_SPL_PARTITION_UUIDS=y CONFIG_OF_CONTROL=y +CONFIG_SPL_OF_CONTROL=y +CONFIG_OF_SPL_REMOVE_PROPS="clocks clock-names interrupt-parent" CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_UBI=y CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
@@ -69,6 +66,7 @@ CONFIG_ENV_UBI_VOLUME_REDUND="config_r" CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_VERSION_VARIABLE=y # CONFIG_NET is not set +CONFIG_SPL_DM=y CONFIG_SYS_I2C_LEGACY=y CONFIG_SPL_SYS_I2C_LEGACY=y CONFIG_MMC_OMAP_HS=y
@@ -81,5 +79,6 @@ CONFIG_SYS_NAND_PAGE_SIZE=0x800 CONFIG_SYS_NAND_OOBSIZE=0x40 CONFIG_SYS_NAND_BUSWIDTH_16BIT=y CONFIG_MTD_UBI_FASTMAP=y +CONFIG_SPECIFY_CONSOLE_INDEX=y CONFIG_CONS_INDEX=3 CONFIG_BCH=y
Signature · 1 line
2.45.0
PATCH RESEND 4/4 omap3: igep0x00: Migrate to use upstream DT
In reply to Javier Martinez CanillasEnable OF_UPSTREAM to use upstream DT and add a ti/omap/ prefix to the DEFAULT_DEVICE_TREE config option.
That way, a DTS from the upstream dts/upstream/src/ directory is used instead of the arch/$(ARCH)/dts/ directory. These in turn are removed.
---
arch/arm/dts/Makefile | 3 - arch/arm/dts/omap3-igep.dtsi | 247 ---------------------- arch/arm/dts/omap3-igep0020-common.dtsi | 261 ------------------------ arch/arm/dts/omap3-igep0020.dts | 47 ----- configs/igep00x0_defconfig | 3 +- 5 files changed, 2 insertions(+), 559 deletions(-) delete mode 100644 arch/arm/dts/omap3-igep.dtsi delete mode 100644 arch/arm/dts/omap3-igep0020-common.dtsi delete mode 100644 arch/arm/dts/omap3-igep0020.dts
arch/arm/dts/Makefile +0 -3
@@ -1030,9 +1030,6 @@ dtb-$(CONFIG_TARGET_OMAP3_BEAGLE) += \ dtb-$(CONFIG_TARGET_DEVKIT8000) += omap3-devkit8000.dtb -dtb-$(CONFIG_TARGET_OMAP3_IGEP00X0) += \ - omap3-igep0020.dtb - dtb-$(CONFIG_TARGET_OMAP4_PANDA) += \ omap4-panda.dtb \ omap4-panda-es.dtb
arch/arm/dts/omap3-igep.dtsi deleted +0 -247
247 lines not on this page · raw message
arch/arm/dts/omap3-igep0020-common.dtsi deleted +0 -261
261 lines not on this page · raw message
arch/arm/dts/omap3-igep0020.dts deleted +0 -47
47 lines not on this page · raw message
configs/igep00x0_defconfig +2 -1
@@ -8,7 +8,7 @@ CONFIG_NR_DRAM_BANKS=2 CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x4020ff00 CONFIG_ENV_SIZE=0x8000 -CONFIG_DEFAULT_DEVICE_TREE="omap3-igep0020" +CONFIG_DEFAULT_DEVICE_TREE="ti/omap/omap3-igep0020" CONFIG_SPL_TEXT_BASE=0x40200000 CONFIG_TARGET_OMAP3_IGEP00X0=y CONFIG_SYS_MONITOR_LEN=262144
@@ -56,6 +56,7 @@ CONFIG_CMD_UBI=y CONFIG_SPL_PARTITION_UUIDS=y CONFIG_OF_CONTROL=y CONFIG_SPL_OF_CONTROL=y +CONFIG_OF_UPSTREAM=y CONFIG_OF_SPL_REMOVE_PROPS="clocks clock-names interrupt-parent" CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_UBI=y
Signature · 1 line
2.45.0