Skip to contentSkip to conversation

ARM: omapl138_lcdk: Remove dead code

PATCH New Adam Ford 2 participants 8 messages Sep 2, 2019 – Sep 14, 2019

Subsystems (3)
lore
Share & tools
lore

Adam Ford

author
#0 lore raw

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.

---
V2: No Change

include/configs/omapl138_lcdk.h +0 -39
index 33155f0114..d34a5fcb37 100644
@@ -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
Signature · 1 line
2.17.1
author
#1 lore raw

PATCH v2 2/4 ARM: omapl138_lcdk: Disable SPL_DM_USB

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.

---
V2: No Change

configs/omapl138_lcdk_defconfig +1 -0
index 7e470bf73e..6813a8b2ae 100644
@@ -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
Signature · 1 line
2.17.1
#2 lore raw

PATCH v2 2/4 ARM: omapl138_lcdk: Disable SPL_DM_USB

Quoted 5 lines · Adam Ford

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.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190914/b69b0928/attachment.sig>
author
#3 lore raw

PATCH v2 3/4 ARM: omapl138_lcdk: Enable DM_GPIO and DM and GPIO Commands

In reply to Adam Ford

The da8xx GPIO driver is available with DM_GPIO support. This patch enables the CMD_GPIO, CMD_DM, and DM_GPIO and DA8XX_GPIO.

---
V2: Fix GPIO redefinition warning by making the max number of GPIOS's be consistent

arch/arm/mach-davinci/include/mach/gpio.h +0 -4
index 3dca50f776..c150240962 100644
@@ -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);
configs/omapl138_lcdk_defconfig +3 -1
index 6813a8b2ae..c74d78b547 100644
@@ -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
Signature · 1 line
2.17.1
#4 lore raw

PATCH v2 3/4 ARM: omapl138_lcdk: Enable DM_GPIO and DM and GPIO Commands

Quoted 4 lines · Adam Ford

The da8xx GPIO driver is available with DM_GPIO support. This patch enables the CMD_GPIO, CMD_DM, and DM_GPIO and DA8XX_GPIO.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190914/3b371c43/attachment.sig>
author
#5 lore raw

PATCH v2 4/4 ARM: omapl138_lcdk: Enable Pinctrl

In reply to Adam Ford

The single pinctrl supports the da8xx, so this patch enables pinctrl in U-Boot.

---
V2: No change

configs/omapl138_lcdk_defconfig +3 -0
index c74d78b547..266f2c251c 100644
@@ -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
Signature · 1 line
2.17.1
#6 lore raw

PATCH v2 4/4 ARM: omapl138_lcdk: Enable Pinctrl

Quoted 4 lines · Adam Ford

The single pinctrl supports the da8xx, so this patch enables pinctrl in U-Boot.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190914/3a478d03/attachment.sig>
#7 lore raw

PATCH v2 1/4 ARM: omapl138_lcdk: Remove dead code

In reply to Adam Ford
Quoted 6 lines · Adam Ford

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.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190914/9cf8164d/attachment.sig>