[U-Boot] [PATCH V2 1/4] ARM: omapl138_lcdk: Remove dead code

The header it littered with #ifdefs and #defines and that appear to be legacy associations to the older da850-evm and in some cases obsolete with either Kconfig or DM migrations. This patch removes these legacy references.
Signed-off-by: Adam Ford aford173@gmail.com --- V2: No Change
diff --git a/include/configs/omapl138_lcdk.h b/include/configs/omapl138_lcdk.h index 33155f0114..d34a5fcb37 100644 --- a/include/configs/omapl138_lcdk.h +++ b/include/configs/omapl138_lcdk.h @@ -13,8 +13,6 @@ /* * Board */ -#undef CONFIG_USE_SPIFLASH -#undef CONFIG_SYS_USE_NOR
/* * SoC Configuration @@ -103,21 +101,10 @@ * Serial Driver info */ #define CONFIG_SYS_NS16550_CLK clk_get(DAVINCI_UART2_CLKID) -#if !defined(CONFIG_DM_SERIAL) -#define CONFIG_SYS_NS16550_SERIAL -#define CONFIG_SYS_NS16550_REG_SIZE -4 /* NS16550 register size */ -#define CONFIG_SYS_NS16550_COM1 DAVINCI_UART2_BASE /* Base address of UART2 */ -#define CONFIG_SYS_NS16550_CLK clk_get(DAVINCI_UART2_CLKID) -#define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 } -#endif
#define CONFIG_SYS_SPI_BASE DAVINCI_SPI1_BASE #define CONFIG_SYS_SPI_CLK clk_get(DAVINCI_SPI1_CLKID)
-#ifdef CONFIG_USE_SPIFLASH -#define CONFIG_SYS_SPI_U_BOOT_SIZE 0x30000 -#endif - /* * I2C Configuration */ @@ -167,24 +154,6 @@ #define CONFIG_SPL_NAND_LOAD #endif
-#ifdef CONFIG_SYS_USE_NOR -#define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max number of flash banks */ -#define CONFIG_SYS_FLASH_SECT_SZ (128 << 10) /* 128KB */ -#define CONFIG_ENV_OFFSET (CONFIG_SYS_FLASH_SECT_SZ * 3) -#define CONFIG_ENV_SIZE (128 << 10) -#define CONFIG_SYS_FLASH_BASE DAVINCI_ASYNC_EMIF_DATA_CE2_BASE -#define PHYS_FLASH_SIZE (8 << 20) /* Flash size 8MB */ -#define CONFIG_SYS_MAX_FLASH_SECT ((PHYS_FLASH_SIZE/CONFIG_SYS_FLASH_SECT_SZ)\ - + 3) -#define CONFIG_ENV_SECT_SIZE CONFIG_SYS_FLASH_SECT_SZ -#endif - -#ifdef CONFIG_USE_SPIFLASH -#define CONFIG_ENV_SIZE (64 << 10) -#define CONFIG_ENV_OFFSET (256 << 10) -#define CONFIG_ENV_SECT_SIZE (64 << 10) -#endif - /* * Network & Ethernet Configuration */ @@ -243,12 +212,6 @@ #define CONFIG_CLOCKS #endif
-#if !defined(CONFIG_NAND) && \ - !defined(CONFIG_SYS_USE_NOR) && \ - !defined(CONFIG_USE_SPIFLASH) -#define CONFIG_ENV_SIZE (16 << 10) -#endif - /* SD/MMC */
#ifdef CONFIG_ENV_IS_IN_MMC @@ -258,7 +221,6 @@ #define CONFIG_ENV_OFFSET (51 << 9) /* Sector 51 */ #endif
-#ifndef CONFIG_DIRECT_NOR_BOOT /* defines for SPL */ #define CONFIG_SYS_SPL_MALLOC_START (CONFIG_SYS_TEXT_BASE - \ CONFIG_SYS_MALLOC_LEN) @@ -266,7 +228,6 @@ #define CONFIG_SPL_STACK 0x8001ff00 #define CONFIG_SPL_MAX_FOOTPRINT 32768 #define CONFIG_SPL_PAD_TO 32768 -#endif
/* additions for new relocation code, must added to all boards */ #define CONFIG_SYS_SDRAM_BASE 0xc0000000

The USB was just recently enabled, so it is unlikely anyone is using it in SPL, so this patch removes it from SPL to further reduce the SPL code size.
Signed-off-by: Adam Ford aford173@gmail.com --- V2: No Change
diff --git a/configs/omapl138_lcdk_defconfig b/configs/omapl138_lcdk_defconfig index 7e470bf73e..6813a8b2ae 100644 --- a/configs/omapl138_lcdk_defconfig +++ b/configs/omapl138_lcdk_defconfig @@ -67,6 +67,7 @@ CONFIG_DM_SERIAL=y CONFIG_SYS_NS16550=y CONFIG_USB=y CONFIG_DM_USB=y +# CONFIG_SPL_DM_USB is not set CONFIG_USB_OHCI_HCD=y CONFIG_USB_OHCI_DA8XX=y CONFIG_USB_MUSB_HOST=y

On Mon, Sep 02, 2019 at 06:52:02AM -0500, Adam Ford wrote:
The USB was just recently enabled, so it is unlikely anyone is using it in SPL, so this patch removes it from SPL to further reduce the SPL code size.
Signed-off-by: Adam Ford aford173@gmail.com
Applied to u-boot/master, thanks!

The da8xx GPIO driver is available with DM_GPIO support. This patch enables the CMD_GPIO, CMD_DM, and DM_GPIO and DA8XX_GPIO.
Signed-off-by: Adam Ford aford173@gmail.com --- V2: Fix GPIO redefinition warning by making the max number of GPIOS's be consistent
diff --git a/arch/arm/mach-davinci/include/mach/gpio.h b/arch/arm/mach-davinci/include/mach/gpio.h index 3dca50f776..c150240962 100644 --- a/arch/arm/mach-davinci/include/mach/gpio.h +++ b/arch/arm/mach-davinci/include/mach/gpio.h @@ -22,11 +22,7 @@ #define gpio_status() gpio_info() #endif #define GPIO_NAME_SIZE 20 -#if !defined(CONFIG_SOC_DA850) -#define MAX_NUM_GPIOS 128 -#else #define MAX_NUM_GPIOS 144 -#endif #define GPIO_BANK(gp) (davinci_gpio_bank01 + ((gp) >> 5))
void gpio_info(void); diff --git a/configs/omapl138_lcdk_defconfig b/configs/omapl138_lcdk_defconfig index 6813a8b2ae..c74d78b547 100644 --- a/configs/omapl138_lcdk_defconfig +++ b/configs/omapl138_lcdk_defconfig @@ -29,8 +29,8 @@ CONFIG_HUSH_PARSER=y CONFIG_CRC32_VERIFY=y # CONFIG_CMD_EEPROM is not set CONFIG_MX_CYCLIC=y +CONFIG_CMD_DM=y # CONFIG_CMD_FLASH is not set -# CONFIG_CMD_GPIO is not set CONFIG_CMD_NAND=y # CONFIG_CMD_SETEXPR is not set CONFIG_CMD_MTDPARTS=y @@ -46,6 +46,8 @@ CONFIG_ENV_IS_IN_NAND=y CONFIG_NET_RANDOM_ETHADDR=y CONFIG_DM=y CONFIG_SPL_DM=y +CONFIG_DM_GPIO=y +CONFIG_DA8XX_GPIO=y CONFIG_DM_I2C=y CONFIG_SYS_I2C_DAVINCI=y CONFIG_DM_MMC=y

On Mon, Sep 02, 2019 at 06:52:03AM -0500, Adam Ford wrote:
The da8xx GPIO driver is available with DM_GPIO support. This patch enables the CMD_GPIO, CMD_DM, and DM_GPIO and DA8XX_GPIO.
Signed-off-by: Adam Ford aford173@gmail.com
Applied to u-boot/master, thanks!

The single pinctrl supports the da8xx, so this patch enables pinctrl in U-Boot.
Signed-off-by: Adam Ford aford173@gmail.com --- V2: No change
diff --git a/configs/omapl138_lcdk_defconfig b/configs/omapl138_lcdk_defconfig index c74d78b547..266f2c251c 100644 --- a/configs/omapl138_lcdk_defconfig +++ b/configs/omapl138_lcdk_defconfig @@ -32,6 +32,7 @@ CONFIG_MX_CYCLIC=y CONFIG_CMD_DM=y # CONFIG_CMD_FLASH is not set CONFIG_CMD_NAND=y +# CONFIG_CMD_PINMUX is not set # CONFIG_CMD_SETEXPR is not set CONFIG_CMD_MTDPARTS=y CONFIG_MTDIDS_DEFAULT="nand0=nand256" @@ -64,6 +65,8 @@ CONFIG_MII=y CONFIG_DRIVER_TI_EMAC=y CONFIG_PHY=y CONFIG_PHY_DA8XX_USB=y +CONFIG_PINCTRL=y +CONFIG_PINCTRL_SINGLE=y CONFIG_SPECIFY_CONSOLE_INDEX=y CONFIG_DM_SERIAL=y CONFIG_SYS_NS16550=y

On Mon, Sep 02, 2019 at 06:52:04AM -0500, Adam Ford wrote:
The single pinctrl supports the da8xx, so this patch enables pinctrl in U-Boot.
Signed-off-by: Adam Ford aford173@gmail.com
Applied to u-boot/master, thanks!

On Mon, Sep 02, 2019 at 06:52:01AM -0500, Adam Ford wrote:
The header it littered with #ifdefs and #defines and that appear to be legacy associations to the older da850-evm and in some cases obsolete with either Kconfig or DM migrations. This patch removes these legacy references.
Signed-off-by: Adam Ford aford173@gmail.com
Applied to u-boot/master, thanks!
participants (2)
-
Adam Ford
-
Tom Rini