[PATCH RFC 03/20] cmd/mac: Don't build unless CONFIG_CMD_MAC is enabled
Lubomir Rintel
lkundrak at v3.sk
Tue Nov 17 22:00:01 CET 2020
This allows us to enable CONFIG_ID_EEPROM to add a hook to read ethaddr
off a ROM without having to implement do_mac().
Signed-off-by: Lubomir Rintel <lkundrak at v3.sk>
---
arch/arm/Kconfig | 19 +++++++++++++++++++
arch/powerpc/cpu/mpc85xx/Kconfig | 17 +++++++++++++++++
cmd/Kconfig | 3 +++
cmd/Makefile | 2 +-
4 files changed, 40 insertions(+), 1 deletion(-)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index b2f7fcbd6ec..884e6f11365 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1245,6 +1245,7 @@ config TARGET_LS1088AQDS
select BOARD_LATE_INIT
select SUPPORT_SPL
select FSL_DDR_INTERACTIVE if !SD_BOOT
+ select CMD_MAC
help
Support for NXP LS1088AQDS platform.
The LS1088A Development System (QDS) is a high-performance
@@ -1263,6 +1264,7 @@ config TARGET_LS2080AQDS
imply SCSI_AHCI
select FSL_DDR_BIST
select FSL_DDR_INTERACTIVE if !SPL
+ select CMD_MAC
help
Support for Freescale LS2080AQDS platform.
The LS2080A Development System (QDS) is a high-performance
@@ -1279,6 +1281,7 @@ config TARGET_LS2080ARDB
select SUPPORT_SPL
select FSL_DDR_BIST
select FSL_DDR_INTERACTIVE if !SPL
+ select CMD_MAC
imply SCSI
imply SCSI_AHCI
help
@@ -1294,6 +1297,7 @@ config TARGET_LS2081ARDB
select ARMV8_MULTIENTRY
select BOARD_LATE_INIT
select SUPPORT_SPL
+ select CMD_MAC
help
Support for Freescale LS2081ARDB platform.
The LS2081A Reference design board (RDB) is a high-performance
@@ -1307,6 +1311,7 @@ config TARGET_LX2160ARDB
select ARMV8_MULTIENTRY
select ARCH_SUPPORT_TFABOOT
select BOARD_LATE_INIT
+ select CMD_MAC
help
Support for NXP LX2160ARDB platform.
The lx2160ardb (LX2160A Reference design board (RDB)
@@ -1320,6 +1325,7 @@ config TARGET_LX2160AQDS
select ARMV8_MULTIENTRY
select ARCH_SUPPORT_TFABOOT
select BOARD_LATE_INIT
+ select CMD_MAC
help
Support for NXP LX2160AQDS platform.
The lx2160aqds (LX2160A QorIQ Development System (QDS)
@@ -1373,6 +1379,7 @@ config TARGET_LS1012AQDS
select ARM64
select ARCH_SUPPORT_TFABOOT
select BOARD_LATE_INIT
+ select CMD_MAC
help
Support for Freescale LS1012AQDS platform.
The LS1012A Development System (QDS) is a high-performance
@@ -1438,6 +1445,7 @@ config TARGET_LS1028AQDS
select ARMV8_MULTIENTRY
select ARCH_SUPPORT_TFABOOT
select BOARD_LATE_INIT
+ select CMD_MAC
help
Support for Freescale LS1028AQDS platform
The LS1028A Development System (QDS) is a high-performance
@@ -1451,6 +1459,7 @@ config TARGET_LS1028ARDB
select ARMV8_MULTIENTRY
select ARCH_SUPPORT_TFABOOT
select BOARD_LATE_INIT
+ select CMD_MAC
help
Support for Freescale LS1028ARDB platform
The LS1028A Development System (RDB) is a high-performance
@@ -1466,6 +1475,7 @@ config TARGET_LS1088ARDB
select BOARD_LATE_INIT
select SUPPORT_SPL
select FSL_DDR_INTERACTIVE if !SD_BOOT
+ select CMD_MAC
help
Support for NXP LS1088ARDB platform.
The LS1088A Reference design board (RDB) is a high-performance
@@ -1487,6 +1497,7 @@ config TARGET_LS1021AQDS
select FSL_DDR_INTERACTIVE
select DM_SPI_FLASH if FSL_DSPI || FSL_QSPI
select SPI_FLASH_DATAFLASH if FSL_DSPI || FSL_QSPI
+ select CMD_MAC
imply SCSI
config TARGET_LS1021ATWR
@@ -1501,6 +1512,7 @@ config TARGET_LS1021ATWR
select LS1_DEEP_SLEEP
select SUPPORT_SPL
select DM_SPI_FLASH if FSL_DSPI || FSL_QSPI
+ select CMD_MAC
imply SCSI
config TARGET_LS1021ATSN
@@ -1514,6 +1526,7 @@ config TARGET_LS1021ATSN
select CPU_V7_HAS_VIRT
select LS1_DEEP_SLEEP
select SUPPORT_SPL
+ select CMD_MAC
imply SCSI
config TARGET_LS1021AIOT
@@ -1526,6 +1539,7 @@ config TARGET_LS1021AIOT
select CPU_V7_HAS_VIRT
select SUPPORT_SPL
select DM_SPI_FLASH if FSL_DSPI || FSL_QSPI
+ select CMD_MAC
imply SCSI
help
Support for Freescale LS1021AIOT platform.
@@ -1545,6 +1559,7 @@ config TARGET_LS1043AQDS
select FSL_DDR_INTERACTIVE if !SPL
select FSL_DSPI if !SPL_NO_DSPI
select DM_SPI_FLASH if FSL_DSPI
+ select CMD_MAC
imply SCSI
imply SCSI_AHCI
help
@@ -1561,6 +1576,7 @@ config TARGET_LS1043ARDB
select SUPPORT_SPL
select FSL_DSPI if !SPL_NO_DSPI
select DM_SPI_FLASH if FSL_DSPI
+ select CMD_MAC
help
Support for Freescale LS1043ARDB platform.
@@ -1577,6 +1593,7 @@ config TARGET_LS1046AQDS
select FSL_DDR_BIST if !SPL
select FSL_DDR_INTERACTIVE if !SPL
select FSL_DDR_INTERACTIVE if !SPL
+ select CMD_MAC
imply SCSI
help
Support for Freescale LS1046AQDS platform.
@@ -1597,6 +1614,7 @@ config TARGET_LS1046ARDB
select SUPPORT_SPL
select FSL_DDR_BIST
select FSL_DDR_INTERACTIVE if !SPL
+ select CMD_MAC
imply SCSI
help
Support for Freescale LS1046ARDB platform.
@@ -1613,6 +1631,7 @@ config TARGET_LS1046AFRWY
select BOARD_EARLY_INIT_F
select BOARD_LATE_INIT
select DM_SPI_FLASH if DM_SPI
+ select CMD_MAC
imply SCSI
help
Support for Freescale LS1046AFRWY platform.
diff --git a/arch/powerpc/cpu/mpc85xx/Kconfig b/arch/powerpc/cpu/mpc85xx/Kconfig
index 54c7fd9522a..a1bbab64991 100644
--- a/arch/powerpc/cpu/mpc85xx/Kconfig
+++ b/arch/powerpc/cpu/mpc85xx/Kconfig
@@ -29,6 +29,7 @@ config TARGET_P3041DS
select PHYS_64BIT
select ARCH_P3041
select BOARD_LATE_INIT if CHAIN_OF_TRUST
+ select CMD_MAC
imply CMD_SATA
imply PANIC_HANG
@@ -37,6 +38,7 @@ config TARGET_P4080DS
select PHYS_64BIT
select ARCH_P4080
select BOARD_LATE_INIT if CHAIN_OF_TRUST
+ select CMD_MAC
imply CMD_SATA
imply PANIC_HANG
@@ -45,12 +47,14 @@ config TARGET_P5040DS
select PHYS_64BIT
select ARCH_P5040
select BOARD_LATE_INIT if CHAIN_OF_TRUST
+ select CMD_MAC
imply CMD_SATA
imply PANIC_HANG
config TARGET_MPC8541CDS
bool "Support MPC8541CDS"
select ARCH_MPC8541
+ select CMD_MAC
config TARGET_MPC8544DS
bool "Support MPC8544DS"
@@ -60,10 +64,12 @@ config TARGET_MPC8544DS
config TARGET_MPC8548CDS
bool "Support MPC8548CDS"
select ARCH_MPC8548
+ select CMD_MAC
config TARGET_MPC8555CDS
bool "Support MPC8555CDS"
select ARCH_MPC8555
+ select CMD_MAC
config TARGET_MPC8568MDS
bool "Support MPC8568MDS"
@@ -72,12 +78,14 @@ config TARGET_MPC8568MDS
config TARGET_MPC8569MDS
bool "Support MPC8569MDS"
select ARCH_MPC8569
+ select CMD_MAC
config TARGET_MPC8572DS
bool "Support MPC8572DS"
select ARCH_MPC8572
# Use DDR3 controller with DDR2 DIMMs on this board
select SYS_FSL_DDRC_GEN3
+ select CMD_MAC
imply SCSI
imply PANIC_HANG
@@ -97,6 +105,7 @@ config TARGET_P1010RDB_PB
select BOARD_LATE_INIT if CHAIN_OF_TRUST
select SUPPORT_SPL
select SUPPORT_TPL
+ select CMD_MAC
imply CMD_EEPROM
imply CMD_SATA
imply PANIC_HANG
@@ -133,6 +142,7 @@ config TARGET_P2041RDB
select ARCH_P2041
select BOARD_LATE_INIT if CHAIN_OF_TRUST
select PHYS_64BIT
+ select CMD_MAC
imply CMD_SATA
imply FSL_SATA
@@ -148,6 +158,7 @@ config TARGET_T1023RDB
select SUPPORT_SPL
select PHYS_64BIT
select FSL_DDR_INTERACTIVE
+ select CMD_MAC
imply CMD_EEPROM
imply PANIC_HANG
@@ -158,6 +169,7 @@ config TARGET_T1024RDB
select SUPPORT_SPL
select PHYS_64BIT
select FSL_DDR_INTERACTIVE
+ select CMD_MAC
imply CMD_EEPROM
imply PANIC_HANG
@@ -213,6 +225,7 @@ config TARGET_T2080QDS
select PHYS_64BIT
select FSL_DDR_FIRST_SLOT_QUAD_CAPABLE
select FSL_DDR_INTERACTIVE
+ select CMD_MAC
imply CMD_SATA
config TARGET_T2080RDB
@@ -221,6 +234,7 @@ config TARGET_T2080RDB
select BOARD_LATE_INIT if CHAIN_OF_TRUST
select SUPPORT_SPL
select PHYS_64BIT
+ select CMD_MAC
imply CMD_SATA
imply PANIC_HANG
@@ -231,6 +245,7 @@ config TARGET_T2081QDS
select PHYS_64BIT
select FSL_DDR_FIRST_SLOT_QUAD_CAPABLE
select FSL_DDR_INTERACTIVE
+ select CMD_MAC
config TARGET_T4160RDB
bool "Support T4160RDB"
@@ -280,12 +295,14 @@ config TARGET_CYRUS_P5020
bool "Support Varisys Cyrus P5020"
select ARCH_P5020
select PHYS_64BIT
+ select CMD_MAC
imply PANIC_HANG
config TARGET_CYRUS_P5040
bool "Support Varisys Cyrus P5040"
select ARCH_P5040
select PHYS_64BIT
+ select CMD_MAC
imply PANIC_HANG
endchoice
diff --git a/cmd/Kconfig b/cmd/Kconfig
index 1595de999b5..652e9cc4f88 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -1696,6 +1696,9 @@ config CMD_LED
with led on/off/togle/blink. Any LED drivers can be controlled with
this command, e.g. led_gpio.
+config CMD_MAC
+ bool
+
config CMD_DATE
bool "date"
default y if DM_RTC
diff --git a/cmd/Makefile b/cmd/Makefile
index dd86675bf2a..9d85217b544 100644
--- a/cmd/Makefile
+++ b/cmd/Makefile
@@ -88,7 +88,7 @@ obj-$(CONFIG_CMD_LICENSE) += license.o
obj-y += load.o
obj-$(CONFIG_CMD_LOG) += log.o
obj-$(CONFIG_CMD_LSBLK) += lsblk.o
-obj-$(CONFIG_ID_EEPROM) += mac.o
+obj-$(CONFIG_CMD_MAC) += mac.o
obj-$(CONFIG_CMD_MD5SUM) += md5sum.o
obj-$(CONFIG_CMD_MEMORY) += mem.o
obj-$(CONFIG_CMD_IO) += io.o
--
2.28.0
More information about the U-Boot
mailing list