[U-Boot] [PATCH 2/2] Convert CONFIG_MAC_ADDR_IN_SPIFLASH et al to Kconfig
Adam Ford
aford173 at gmail.com
Fri Sep 8 22:01:18 UTC 2017
This converts the following to Kconfig:
CONFIG_MAC_ADDR_IN_SPIFLASH
CONFIG_MAC_ADDR_IN_EEPROM
Signed-off-by: Adam Ford <aford173 at gmail.com>
---
board/davinci/da8xxevm/Kconfig | 24 ++++++++++++++++++++++++
configs/da850_am18xxevm_defconfig | 3 ++-
configs/da850evm_defconfig | 1 -
configs/da850evm_direct_nor_defconfig | 2 +-
scripts/config_whitelist.txt | 2 --
5 files changed, 27 insertions(+), 5 deletions(-)
diff --git a/board/davinci/da8xxevm/Kconfig b/board/davinci/da8xxevm/Kconfig
index 0935abf..6e51ce4 100644
--- a/board/davinci/da8xxevm/Kconfig
+++ b/board/davinci/da8xxevm/Kconfig
@@ -9,6 +9,30 @@ config SYS_VENDOR
config SYS_CONFIG_NAME
default "da850evm"
+menuconfig DA850_MAC
+ bool "Use MAC Address"
+ default y
+
+if DA850_MAC
+config MAC_ADDR_IN_SPIFLASH
+ bool "MAC address in SPI Flash"
+ default y
+ help
+ The OMAP-L138 and AM1808 SoM are programmed with
+ their MAC address in SPI Flash from the factory
+ Enable this option to read the MAC from SPI Flash
+
+config MAC_ADDR_IN_EEPROM
+ bool "MAC address in EEPROM"
+ help
+ The DA850 EVM comes with SoM are programmed with
+ their MAC address in SPI Flash from the factory,
+ but the kit has an optional expansion board with
+ EEPROM available. Enable this option to read the
+ MAC from the EEPROM
+
+endif
+
endif
if TARGET_OMAPL138_LCDK
diff --git a/configs/da850_am18xxevm_defconfig b/configs/da850_am18xxevm_defconfig
index cb3726d..ad9c66c 100644
--- a/configs/da850_am18xxevm_defconfig
+++ b/configs/da850_am18xxevm_defconfig
@@ -1,12 +1,13 @@
CONFIG_ARM=y
CONFIG_ARCH_DAVINCI=y
CONFIG_TARGET_DA850EVM=y
+CONFIG_MAC_ADDR_IN_EEPROM=y
CONFIG_SPL_LIBCOMMON_SUPPORT=y
CONFIG_SPL_LIBGENERIC_SUPPORT=y
CONFIG_SPL_SERIAL_SUPPORT=y
CONFIG_SPL_SPI_FLASH_SUPPORT=y
CONFIG_SPL_SPI_SUPPORT=y
-CONFIG_SYS_EXTRA_OPTIONS="DA850_AM18X_EVM,MAC_ADDR_IN_EEPROM,SYS_I2C_EEPROM_ADDR_LEN=2,SYS_I2C_EEPROM_ADDR=0x50"
+CONFIG_SYS_EXTRA_OPTIONS="DA850_AM18X_EVM,SYS_I2C_EEPROM_ADDR_LEN=2,SYS_I2C_EEPROM_ADDR=0x50"
CONFIG_BOOTDELAY=3
CONFIG_USE_BOOTARGS=y
CONFIG_BOOTARGS="mem=32M console=ttyS2,115200n8 root=/dev/mtdblock2 rw noinitrd ip=dhcp"
diff --git a/configs/da850evm_defconfig b/configs/da850evm_defconfig
index ac54235..3193bbd 100644
--- a/configs/da850evm_defconfig
+++ b/configs/da850evm_defconfig
@@ -6,7 +6,6 @@ CONFIG_SPL_LIBGENERIC_SUPPORT=y
CONFIG_SPL_SERIAL_SUPPORT=y
CONFIG_SPL_SPI_FLASH_SUPPORT=y
CONFIG_SPL_SPI_SUPPORT=y
-CONFIG_SYS_EXTRA_OPTIONS="MAC_ADDR_IN_SPIFLASH"
CONFIG_BOOTDELAY=3
CONFIG_USE_BOOTARGS=y
CONFIG_BOOTARGS="mem=32M console=ttyS2,115200n8 root=/dev/mtdblock2 rw noinitrd ip=dhcp"
diff --git a/configs/da850evm_direct_nor_defconfig b/configs/da850evm_direct_nor_defconfig
index 9c1ae37..ec31e7c 100644
--- a/configs/da850evm_direct_nor_defconfig
+++ b/configs/da850evm_direct_nor_defconfig
@@ -1,7 +1,7 @@
CONFIG_ARM=y
CONFIG_ARCH_DAVINCI=y
CONFIG_TARGET_DA850EVM=y
-CONFIG_SYS_EXTRA_OPTIONS="MAC_ADDR_IN_SPIFLASH,USE_NOR,DIRECT_NOR_BOOT"
+CONFIG_SYS_EXTRA_OPTIONS="USE_NOR,DIRECT_NOR_BOOT"
CONFIG_BOOTDELAY=3
CONFIG_USE_BOOTARGS=y
CONFIG_BOOTARGS="mem=32M console=ttyS2,115200n8 root=/dev/mtdblock2 rw noinitrd ip=dhcp"
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index 9ce0c3f..5dc69ea 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -1360,8 +1360,6 @@ CONFIG_MACH_SPECIFIC
CONFIG_MACH_TYPE
CONFIG_MACH_TYPE_COMPAT_REV
CONFIG_MACRESET_TIMEOUT
-CONFIG_MAC_ADDR_IN_EEPROM
-CONFIG_MAC_ADDR_IN_SPIFLASH
CONFIG_MALLOC_F_ADDR
CONFIG_MALTA
CONFIG_MARCO_MEMSET
--
2.7.4
More information about the U-Boot
mailing list