Remove CONFIG_HAS_ETH0 et al symbols
authorTom Rini <trini@konsulko.com>
Fri, 11 Mar 2022 14:12:06 +0000 (09:12 -0500)
committerTom Rini <trini@konsulko.com>
Fri, 18 Mar 2022 16:48:17 +0000 (12:48 -0400)
This converts removes the following symbols:
   CONFIG_HAS_ETH0
   CONFIG_HAS_ETH1
   CONFIG_HAS_ETH2
   CONFIG_HAS_ETH3

This is because at this point, only the ids8313 platform was using the
code which was controlled by these symbols.  In turn, this code already
performs error checking on being able to perform the device tree fixup.
Rather than convert these to Kconfig for a single platform, update the
code to not need these checks and remove them from all the platforms
they were unused on.

Reviewed-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
16 files changed:
arch/powerpc/cpu/mpc83xx/fdt.c
include/configs/M5208EVBE.h
include/configs/M5275EVB.h
include/configs/M53017EVB.h
include/configs/MPC837XERDB.h
include/configs/MPC8548CDS.h
include/configs/P1010RDB.h
include/configs/gazerbeam.h
include/configs/ids8313.h
include/configs/imx8mp_rsb3720.h
include/configs/km/km-mpc8309.h
include/configs/km/km-mpc83xx.h
include/configs/ls1021aiot.h
include/configs/ls1021aqds.h
include/configs/p1_p2_rdb_pc.h
include/configs/socrates.h

index 3393ad5..33b2151 100644 (file)
@@ -51,9 +51,6 @@ void ft_cpu_setup(void *blob, struct bd_info *bd)
                 REVID_MAJOR(spridr) >= 2)
                fdt_fixup_crypto_node(blob, 0x0204);
 
-#if defined(CONFIG_HAS_ETH0) || defined(CONFIG_HAS_ETH1) ||\
-    defined(CONFIG_HAS_ETH2) || defined(CONFIG_HAS_ETH3) ||\
-    defined(CONFIG_HAS_ETH4) || defined(CONFIG_HAS_ETH5)
 #ifdef CONFIG_ARCH_MPC8313
        /*
        * mpc8313e erratum IPIC1 swapped TSEC interrupt ID numbers on rev. 1
@@ -66,7 +63,6 @@ void ft_cpu_setup(void *blob, struct bd_info *bd)
 
                nodeoffset = fdt_path_offset(blob, "/aliases");
                if (nodeoffset >= 0) {
-#if defined(CONFIG_HAS_ETH0)
                        prop = fdt_getprop(blob, nodeoffset, "ethernet0", NULL);
                        if (prop) {
                                u32 tmp[] = { 32, 0x8, 33, 0x8, 34, 0x8 };
@@ -78,8 +74,6 @@ void ft_cpu_setup(void *blob, struct bd_info *bd)
                                        fdt_setprop(blob, path, "interrupts",
                                                    &tmp, sizeof(tmp));
                        }
-#endif
-#if defined(CONFIG_HAS_ETH1)
                        prop = fdt_getprop(blob, nodeoffset, "ethernet1", NULL);
                        if (prop) {
                                u32 tmp[] = { 35, 0x8, 36, 0x8, 37, 0x8 };
@@ -91,11 +85,9 @@ void ft_cpu_setup(void *blob, struct bd_info *bd)
                                        fdt_setprop(blob, path, "interrupts",
                                                    &tmp, sizeof(tmp));
                        }
-#endif
                }
        }
 #endif
-#endif
 
        do_fixup_by_prop_u32(blob, "device_type", "cpu", 4,
                "timebase-frequency", (bd->bi_busfreq / 4), 1);
index e6f4255..76c85a7 100644 (file)
@@ -22,7 +22,6 @@
 #      define CONFIG_SYS_DISCOVER_PHY
 #      define CONFIG_SYS_RX_ETH_BUFFER 8
 #      define CONFIG_SYS_FAULT_ECHO_LINK_DOWN
-#      define CONFIG_HAS_ETH1
 /* If CONFIG_SYS_DISCOVER_PHY is not defined - hardcoded */
 #      ifndef CONFIG_SYS_DISCOVER_PHY
 #              define FECDUPLEX        FULL
index d95dd8c..e9057ff 100644 (file)
@@ -40,7 +40,6 @@
 #define CONFIG_SYS_DISCOVER_PHY
 #define CONFIG_SYS_RX_ETH_BUFFER       8
 #define CONFIG_SYS_FAULT_ECHO_LINK_DOWN
-#define CONFIG_HAS_ETH1
 /* If CONFIG_SYS_DISCOVER_PHY is not defined - hardcoded */
 #ifndef CONFIG_SYS_DISCOVER_PHY
 #define FECDUPLEX              FULL
index ec70186..06eb03b 100644 (file)
@@ -31,7 +31,6 @@
 #      define CONFIG_SYS_TX_ETH_BUFFER 8
 #      define CONFIG_SYS_FEC_BUF_USE_SRAM
 #      define CONFIG_SYS_FAULT_ECHO_LINK_DOWN
-#      define CONFIG_HAS_ETH1
 
 /* If CONFIG_SYS_DISCOVER_PHY is not defined - hardcoded */
 #      ifndef CONFIG_SYS_DISCOVER_PHY
index 8bbc5f4..39c1e84 100644 (file)
 #define CONFIG_TSEC1
 
 #ifdef CONFIG_TSEC1
-#define CONFIG_HAS_ETH0
 #define CONFIG_TSEC1_NAME              "TSEC0"
 #define CONFIG_SYS_TSEC1_OFFSET                0x24000
 #define TSEC1_PHY_ADDR                 2
 #endif
 
 #ifdef CONFIG_TSEC2
-#define CONFIG_HAS_ETH1
 #define CONFIG_TSEC2_NAME              "TSEC1"
 #define CONFIG_SYS_TSEC2_OFFSET                0x25000
 #define TSEC2_PHY_ADDR                 0x1c
index 093061b..e91f9c2 100644 (file)
 /*
  * Environment Configuration
  */
-#if defined(CONFIG_TSEC_ENET)
-#define CONFIG_HAS_ETH0
-#define CONFIG_HAS_ETH1
-#define CONFIG_HAS_ETH2
-#define CONFIG_HAS_ETH3
-#endif
 
 #define CONFIG_IPADDR   192.168.1.253
 
index 8fd9eb7..d36c1c1 100644 (file)
@@ -598,12 +598,6 @@ extern unsigned long get_sdram_size(void);
  * Environment Configuration
  */
 
-#if defined(CONFIG_TSEC_ENET)
-#define CONFIG_HAS_ETH0
-#define CONFIG_HAS_ETH1
-#define CONFIG_HAS_ETH2
-#endif
-
 #define CONFIG_ROOTPATH                "/opt/nfsroot"
 #define CONFIG_UBOOTPATH       u-boot.bin/* U-Boot image on TFTP server */
 
index 7a08c33..f5d49d2 100644 (file)
@@ -77,9 +77,6 @@
  * Environment Configuration
  */
 
-#define CONFIG_HAS_ETH0
-#define CONFIG_HAS_ETH1
-
 /* TODO: Turn into string option and migrate to Kconfig */
 #define CONFIG_HOSTNAME                "gazerbeam"
 #define CONFIG_ROOTPATH                "/opt/nfsroot"
index 48d2efb..7e90b1f 100644 (file)
  * Ethernet setup
  */
 #ifdef CONFIG_TSEC1
-#define CONFIG_HAS_ETH0
 #define CONFIG_TSEC1_NAME              "TSEC0"
 #define CONFIG_SYS_TSEC1_OFFSET        0x24000
 #define TSEC1_PHY_ADDR                 0x1
 #endif
 
 #ifdef CONFIG_TSEC2
-#define CONFIG_HAS_ETH1
 #define CONFIG_TSEC2_NAME              "TSEC1"
 #define CONFIG_SYS_TSEC2_OFFSET        0x25000
 #define TSEC2_PHY_ADDR                 0x3
index b899775..9d732c5 100644 (file)
@@ -12,8 +12,6 @@
 #include <asm/arch/imx-regs.h>
 #include <config_distro_bootcmd.h>
 
-#define CONFIG_HAS_ETH1
-
 #define CONFIG_SYS_BOOTM_LEN           (32 * SZ_1M)
 
 #define CONFIG_SPL_MAX_SIZE            (152 * 1024)
index 98204bd..ab629be 100644 (file)
 /* EEprom support */
 
 /* ethernet port connected to piggy (UEC2) */
-#define CONFIG_HAS_ETH1
 #define CONFIG_UEC_ETH2
 #define CONFIG_SYS_UEC2_UCC_NUM                2       /* UCC3 */
 #define CONFIG_SYS_UEC2_RX_CLK         QE_CLK_NONE /* not used in RMII Mode */
index 7c979c5..9bf91a9 100644 (file)
        "unlock=yes\0"                                                   \
        ""
 
-#if defined(CONFIG_UEC_ETH)
-#define CONFIG_HAS_ETH0
-#endif
-
 /*
  * QE UEC ethernet configuration
  */
index 810eee8..0bbab81 100644 (file)
 #define TSEC2_PHYIDX                   0
 
 #define CONFIG_ETHPRIME                        "eTSEC2"
-
-#define CONFIG_HAS_ETH0
-#define CONFIG_HAS_ETH1
-#define CONFIG_HAS_ETH2
 #endif
 
 /* PCIe */
index 27a074c..20560ee 100644 (file)
 
 #define CONFIG_ETHPRIME                        "eTSEC1"
 
-#define CONFIG_HAS_ETH0
-#define CONFIG_HAS_ETH1
-#define CONFIG_HAS_ETH2
-
 #define CONFIG_FSL_SGMII_RISER         1
 #define SGMII_RISER_PHY_OFFSET         0x1b
 
index 9263189..33f99fd 100644 (file)
 #define TSEC3_PHYIDX   0
 
 #define CONFIG_ETHPRIME        "eTSEC1"
-
-#define CONFIG_HAS_ETH0
-#define CONFIG_HAS_ETH1
-#define CONFIG_HAS_ETH2
 #endif /* CONFIG_TSEC_ENET */
 
 /*
index 4d562d4..8ac98ee 100644 (file)
 /* Options are: TSEC[0,1] */
 #define CONFIG_ETHPRIME                "TSEC0"
 
-#define CONFIG_HAS_ETH0
-#define CONFIG_HAS_ETH1
-
 /*
  * Environment
  */