]> git.baikalelectronics.ru Git - uboot.git/commitdiff
Convert CONFIG_SYS_DISCOVER_PHY to Kconfig
authorTom Rini <trini@konsulko.com>
Sat, 25 Jun 2022 15:02:36 +0000 (11:02 -0400)
committerTom Rini <trini@konsulko.com>
Thu, 7 Jul 2022 13:29:08 +0000 (09:29 -0400)
This converts the following to Kconfig:
   CONFIG_SYS_DISCOVER_PHY

Signed-off-by: Tom Rini <trini@konsulko.com>
15 files changed:
drivers/net/Kconfig
drivers/net/fsl_mcdmafec.c
drivers/net/mcffec.c
include/configs/M5208EVBE.h
include/configs/M5235EVB.h
include/configs/M5272C3.h
include/configs/M5275EVB.h
include/configs/M5282EVB.h
include/configs/M53017EVB.h
include/configs/M5329EVB.h
include/configs/M5373EVB.h
include/configs/MCR3000.h
include/configs/cobra5272.h
include/configs/eb_cpu5282.h
include/configs/stmark2.h

index cb891f5dbedeabfd63683d48a181abd9ae3db886..b671e72580e2ba3f9087ea733495e53fdd550bc4 100644 (file)
@@ -400,11 +400,14 @@ config FTGMAC100
          offers high-priority transmit queue for QoS and CoS
          applications.
 
+config SYS_DISCOVER_PHY
+       bool
 
 config MCFFEC
        bool "ColdFire Ethernet Support"
        depends on DM_ETH
        select PHYLIB
+       select SYS_DISCOVER_PHY
        help
          This driver supports the network interface units in the
          ColdFire family.
@@ -417,6 +420,7 @@ config FSLDMAFEC
         bool "ColdFire DMA Ethernet Support"
        depends on DM_ETH
        select PHYLIB
+       select SYS_DISCOVER_PHY
        help
          This driver supports the network interface units in the
          ColdFire family.
@@ -732,6 +736,7 @@ config MPC8XX_FEC
        bool "Fast Ethernet Controller on MPC8XX"
        depends on MPC8xx
        select MII
+       select SYS_DISCOVER_PHY
        help
          This driver implements support for the Fast Ethernet Controller
          on MPC8XX
index e103f79305e788e2effc5fe29e7bc2eb77e262b1..6825f9e27c06b830a3c139ed5a50ddbd1506aee2 100644 (file)
@@ -243,16 +243,8 @@ static int fec_init(struct udevice *dev)
        fecpin_setclear(info, 1);
        fec_halt(dev);
 
-#if defined(CONFIG_CMD_MII) || defined (CONFIG_MII) || \
-       defined (CONFIG_SYS_DISCOVER_PHY)
-
        mii_init();
        set_fec_duplex_speed(fecp, info->dup_spd);
-#else
-#ifndef CONFIG_SYS_DISCOVER_PHY
-       set_fec_duplex_speed(fecp, (FECDUPLEX << 16) | FECSPEED);
-#endif                         /* ifndef CONFIG_SYS_DISCOVER_PHY */
-#endif                         /* CONFIG_CMD_MII || CONFIG_MII */
 
        /* We use strictly polling mode only */
        fecp->eimr = 0;
index cef9eecac2145f0cdc9975032d658ae0d48ba635..4dd848932b961ce61cc4fda742d96febffc70556 100644 (file)
@@ -278,17 +278,9 @@ int mcffec_init(struct udevice *dev)
        fecpin_setclear(info, 1);
        fec_reset(info);
 
-#if defined(CONFIG_CMD_MII) || defined (CONFIG_MII) || \
-       defined (CONFIG_SYS_DISCOVER_PHY)
-
        mii_init();
 
        set_fec_duplex_speed(fecp, info->dup_spd);
-#else
-#ifndef CONFIG_SYS_DISCOVER_PHY
-       set_fec_duplex_speed(fecp, (FECDUPLEX << 16) | FECSPEED);
-#endif /* ifndef CONFIG_SYS_DISCOVER_PHY */
-#endif /* CONFIG_CMD_MII || CONFIG_MII */
 
        /* We use strictly polling mode only */
        fecp->eimr = 0;
index fec73ba3426a060bd78bc43a31e037f61dd8dc4e..14b35d7ef507888f2dd44a9660745c5be43bba17 100644 (file)
 
 #define CONFIG_WATCHDOG_TIMEOUT                5000
 
-#ifdef CONFIG_MCFFEC
-#      define CONFIG_SYS_DISCOVER_PHY
-/* If CONFIG_SYS_DISCOVER_PHY is not defined - hardcoded */
-#      ifndef CONFIG_SYS_DISCOVER_PHY
-#              define FECDUPLEX        FULL
-#              define FECSPEED         _100BASET
-#      endif                   /* CONFIG_SYS_DISCOVER_PHY */
-#endif
-
 /* I2C */
 
 #ifdef CONFIG_MCFFEC
index ea89b03c66e346598827452805acd20cc9094da3..762d1dd94b1c3cd0edc1d76ad6a48cf48e055ee7 100644 (file)
 
 #define CONFIG_WATCHDOG_TIMEOUT        5000    /* timeout in milliseconds, max timeout is 6.71sec */
 
-#ifdef CONFIG_MCFFEC
-#      define CONFIG_SYS_DISCOVER_PHY
-/* If CONFIG_SYS_DISCOVER_PHY is not defined - hardcoded */
-#      ifndef CONFIG_SYS_DISCOVER_PHY
-#              define FECDUPLEX        FULL
-#              define FECSPEED         _100BASET
-#      endif                   /* CONFIG_SYS_DISCOVER_PHY */
-#endif
-
 /* I2C */
 #define CONFIG_SYS_I2C_PINMUX_REG      (gpio->par_qspi)
 #define CONFIG_SYS_I2C_PINMUX_CLR      ~(GPIO_PAR_FECI2C_SCL_MASK | GPIO_PAR_FECI2C_SDA_MASK)
index 4a2b37653e08fab39a63f684e5db6f43e2f62381..2fa1e4356e3ec76af94eecd4ac0a64a3133b879f 100644 (file)
        . = DEFINED(env_offset) ? env_offset : .; \
        env/embedded.o(.text);
 
-#ifdef CONFIG_MCFFEC
-#      define CONFIG_SYS_DISCOVER_PHY
-/* If CONFIG_SYS_DISCOVER_PHY is not defined - hardcoded */
-#      ifndef CONFIG_SYS_DISCOVER_PHY
-#              define FECDUPLEX        FULL
-#              define FECSPEED         _100BASET
-#      endif                   /* CONFIG_SYS_DISCOVER_PHY */
-#endif
-
 #ifdef CONFIG_MCFFEC
 #      define CONFIG_IPADDR    192.162.1.2
 #      define CONFIG_NETMASK   255.255.255.0
index 5e6d0856246e5dc02909e0c116a346d0656af7ba..4f6fc6d8cb9fc857ce3660b45c830bd77051d28c 100644 (file)
 
 /* Available command configuration */
 
-#ifdef CONFIG_MCFFEC
-#define CONFIG_SYS_DISCOVER_PHY
-/* If CONFIG_SYS_DISCOVER_PHY is not defined - hardcoded */
-#ifndef CONFIG_SYS_DISCOVER_PHY
-#define FECDUPLEX              FULL
-#define FECSPEED               _100BASET
-#endif
-#endif
-
 /* I2C */
 #define CONFIG_SYS_I2C_PINMUX_REG      (gpio_reg->par_feci2c)
 #define CONFIG_SYS_I2C_PINMUX_CLR      (0xFFF0)
index bb6fbac68769a2a0919b25e08eb83075543abd22..9f06f41ce11b7b9cc64c790252f82e9bdae352d4 100644 (file)
        . = DEFINED(env_offset) ? env_offset : .; \
        env/embedded.o(.text*);
 
-#ifdef CONFIG_MCFFEC
-#      define CONFIG_SYS_DISCOVER_PHY
-/* If CONFIG_SYS_DISCOVER_PHY is not defined - hardcoded */
-#      ifndef CONFIG_SYS_DISCOVER_PHY
-#              define FECDUPLEX        FULL
-#              define FECSPEED         _100BASET
-#      endif                   /* CONFIG_SYS_DISCOVER_PHY */
-#endif
-
 #ifdef CONFIG_MCFFEC
 #      define CONFIG_IPADDR    192.162.1.2
 #      define CONFIG_NETMASK   255.255.255.0
index fd6aee127d874de153e19722ac4647d1787052f6..90b0d41078ad981200ac612746243b5222a019ea 100644 (file)
 #define CONFIG_WATCHDOG_TIMEOUT                5000
 
 #ifdef CONFIG_MCFFEC
-#      define CONFIG_SYS_DISCOVER_PHY
 #      define CONFIG_SYS_TX_ETH_BUFFER 8
 #      define CONFIG_SYS_FEC_BUF_USE_SRAM
-
-/* If CONFIG_SYS_DISCOVER_PHY is not defined - hardcoded */
-#      ifndef CONFIG_SYS_DISCOVER_PHY
-#              define FECDUPLEX        FULL
-#              define FECSPEED         _100BASET
-#      endif                   /* CONFIG_SYS_DISCOVER_PHY */
 #endif
 
 #define CONFIG_SYS_RTC_CNT             (0x8000)
index b7ccdd08ac4f9824189730dfb10ec55af909d6cc..6eaa660e11fb6fb628949374e3cdf8e835b7ac57 100644 (file)
 
 #define CONFIG_WATCHDOG_TIMEOUT        5000    /* timeout in milliseconds, max timeout is 6.71sec */
 
-#ifdef CONFIG_MCFFEC
-#      define CONFIG_SYS_DISCOVER_PHY
-/* If CONFIG_SYS_DISCOVER_PHY is not defined - hardcoded */
-#      ifndef CONFIG_SYS_DISCOVER_PHY
-#              define FECDUPLEX        FULL
-#              define FECSPEED         _100BASET
-#      endif                   /* CONFIG_SYS_DISCOVER_PHY */
-#endif
-
 /* I2C */
 
 #ifdef CONFIG_MCFFEC
index 06ee0748b9309a1fb9b0a5cc935d344abf700e36..2e3988f6c723e178ab5b8bef39b987ad40720bf4 100644 (file)
 
 #define CONFIG_WATCHDOG_TIMEOUT        3360    /* timeout in ms, max is 3.36 sec */
 
-#ifdef CONFIG_MCFFEC
-#      define CONFIG_SYS_DISCOVER_PHY
-/* If CONFIG_SYS_DISCOVER_PHY is not defined - hardcoded */
-#      ifndef CONFIG_SYS_DISCOVER_PHY
-#              define FECDUPLEX        FULL
-#              define FECSPEED         _100BASET
-#      endif                   /* CONFIG_SYS_DISCOVER_PHY */
-#endif
-
 /* I2C */
 
 #ifdef CONFIG_MCFFEC
index 01b33c77a88e9e0de9a10762402cc74dfb7aa93d..41ab860850833710142aa3220ce94a8bd8c40858 100644 (file)
@@ -86,7 +86,6 @@
 /* environment is in FLASH */
 
 /* Ethernet configuration part */
-#define CONFIG_SYS_DISCOVER_PHY                1
 
 /* NAND configuration part */
 #define CONFIG_SYS_MAX_NAND_DEVICE     1
index c926e6ac8ca2bc23761e93de14ed37a6158ee00f..dd7b6c08730cc838254f78f313da45ee15bb3e5c 100644 (file)
        . = DEFINED(env_offset) ? env_offset : .; \
        env/embedded.o(.text);
 
-#ifdef CONFIG_MCFFEC
-#      define CONFIG_SYS_DISCOVER_PHY
-/* If CONFIG_SYS_DISCOVER_PHY is not defined - hardcoded */
-#      ifndef CONFIG_SYS_DISCOVER_PHY
-#              define FECDUPLEX        FULL
-#              define FECSPEED         _100BASET
-#      endif                   /* CONFIG_SYS_DISCOVER_PHY */
-#endif
-
 /*
  *-----------------------------------------------------------------------------
  * Define user parameters that have to be customized most likely
@@ -157,7 +148,6 @@ enter a valid image address in flash */
  * ---
  */
 
-#define CONFIG_SYS_DISCOVER_PHY
 #define CONFIG_SYS_ENET_BD_BASE        0x780000
 
 /*-----------------------------------------------------------------------
index 615715750816b5323f1876f47ac1db6f10bc20cf..6e444c478922c9261a2adcdc6629da88ded6d3cb 100644 (file)
@@ -47,7 +47,6 @@
  *----------------------------------------------------------------------*/
 
 #ifdef CONFIG_MCFFEC
-#define CONFIG_SYS_DISCOVER_PHY
 #define CONFIG_OVERWRITE_ETHADDR_ONCE
 #endif
 
index 797d9bbb4af16db0f0866f85ce6e8527a89b1811..d8a334868f311dd1ffa08fc6cbb26c827989c2b9 100644 (file)
 #define CACR_STATUS                    (CONFIG_SYS_INIT_RAM_ADDR + \
                                        CONFIG_SYS_INIT_RAM_SIZE - 12)
 
-#ifdef CONFIG_MCFFEC
-#define CONFIG_SYS_DISCOVER_PHY
-/* If CONFIG_SYS_DISCOVER_PHY is not defined - hardcoded */
-#ifndef CONFIG_SYS_DISCOVER_PHY
-#define FECDUPLEX                      FULL
-#define FECSPEED                       _100BASET
-#endif /* CONFIG_SYS_DISCOVER_PHY */
-#endif
 #endif /* __STMARK2_CONFIG_H */