[U-Boot] [PATCHv6 06/28] net: sunxi: Restore sunxi_[eg]mac behavior

Olliver Schinagl oliver at schinagl.nl
Mon May 15 08:02:22 UTC 2017


Commit 4d43d065db326 ("sunxi: Move SUNXI_GMAC to Kconfig") renamed
SUNXI_[EG]MAC but did not update include/configs/sunxi-common.h where
based on these two symbols other config symbols where being set, such
as CONFIG_PHY_REALTEK for SUNXI_GMAC boards and the CONFIG_PHY_ADDR
being set to a safe default.

This patch restores that behavior by adding the PHY_REALTEK to the
defconfigs, where they belong and by setting the address based on the
new config symbols.

Additionally, we use the new renamed symbol in the Makefiles to
actually compile the drivers.

Signed-off-by: Olliver Schinagl <oliver at schinagl.nl>
---
 arch/arm/include/asm/arch-sunxi/sys_proto.h | 2 +-
 board/sunxi/Makefile                        | 2 +-
 configs/A20-OLinuXino-Lime2_defconfig       | 1 +
 configs/A20-OLinuXino-Lime_defconfig        | 1 +
 configs/A20-OLinuXino_MICRO_defconfig       | 1 +
 configs/A20-Olimex-SOM-EVB_defconfig        | 1 +
 configs/Bananapi_defconfig                  | 1 +
 configs/Bananapro_defconfig                 | 1 +
 configs/CSQ_CS908_defconfig                 | 1 +
 configs/Colombus_defconfig                  | 1 +
 configs/Cubieboard2_defconfig               | 1 +
 configs/Cubietruck_defconfig                | 1 +
 configs/Hummingbird_A31_defconfig           | 1 +
 configs/Itead_Ibox_A20_defconfig            | 1 +
 configs/Lamobo_R1_defconfig                 | 1 +
 configs/Linksprite_pcDuino3_Nano_defconfig  | 1 +
 configs/Linksprite_pcDuino3_defconfig       | 1 +
 configs/Mele_A1000G_quad_defconfig          | 1 +
 configs/Mele_I7_defconfig                   | 1 +
 configs/Mele_M3_defconfig                   | 1 +
 configs/Mele_M5_defconfig                   | 1 +
 configs/Mele_M9_defconfig                   | 1 +
 configs/Orangepi_defconfig                  | 1 +
 configs/Orangepi_mini_defconfig             | 1 +
 configs/Sinlinx_SinA31s_defconfig           | 1 +
 configs/Sinovoip_BPI_M2_defconfig           | 1 +
 configs/Wits_Pro_A20_DKT_defconfig          | 1 +
 configs/i12-tvbox_defconfig                 | 1 +
 configs/icnova-a20-swac_defconfig           | 1 +
 configs/mixtile_loftq_defconfig             | 1 +
 drivers/net/Kconfig                         | 5 +++++
 drivers/net/Makefile                        | 2 +-
 include/configs/sunxi-common.h              | 9 +++------
 scripts/config_whitelist.txt                | 2 --
 34 files changed, 39 insertions(+), 11 deletions(-)

diff --git a/arch/arm/include/asm/arch-sunxi/sys_proto.h b/arch/arm/include/asm/arch-sunxi/sys_proto.h
index a373319a2b..850236ed42 100644
--- a/arch/arm/include/asm/arch-sunxi/sys_proto.h
+++ b/arch/arm/include/asm/arch-sunxi/sys_proto.h
@@ -24,7 +24,7 @@ void sdelay(unsigned long);
 void return_to_fel(uint32_t lr, uint32_t sp);
 
 /* Board / SoC level designware gmac init */
-#if !defined CONFIG_SPL_BUILD && defined CONFIG_SUNXI_GMAC
+#if !defined CONFIG_SPL_BUILD && defined CONFIG_SUN7I_MAC
 void eth_init_board(void);
 #else
 static inline void eth_init_board(void) {}
diff --git a/board/sunxi/Makefile b/board/sunxi/Makefile
index 43766e0ef4..b4768b9b9b 100644
--- a/board/sunxi/Makefile
+++ b/board/sunxi/Makefile
@@ -9,7 +9,7 @@
 # SPDX-License-Identifier:	GPL-2.0+
 #
 obj-y	+= board.o
-obj-$(CONFIG_SUNXI_GMAC)	+= gmac.o
+obj-$(CONFIG_SUN7I_MAC)		+= gmac.o
 obj-$(CONFIG_SUNXI_AHCI)	+= ahci.o
 obj-$(CONFIG_MACH_SUN4I)	+= dram_sun4i_auto.o
 obj-$(CONFIG_MACH_SUN5I)	+= dram_sun5i_auto.o
diff --git a/configs/A20-OLinuXino-Lime2_defconfig b/configs/A20-OLinuXino-Lime2_defconfig
index 14d1159ead..14a51ef3f9 100644
--- a/configs/A20-OLinuXino-Lime2_defconfig
+++ b/configs/A20-OLinuXino-Lime2_defconfig
@@ -22,6 +22,7 @@ CONFIG_CMD_USB_MASS_STORAGE=y
 # CONFIG_SPL_PARTITION_UUIDS is not set
 CONFIG_DFU_RAM=y
 CONFIG_SUN7I_GMAC=y
+CONFIG_PHY_REALTEK=y
 CONFIG_RTL8211X_PHY_FORCE_MASTER=y
 CONFIG_AXP_ALDO3_VOLT=2800
 CONFIG_AXP_ALDO4_VOLT=2800
diff --git a/configs/A20-OLinuXino-Lime_defconfig b/configs/A20-OLinuXino-Lime_defconfig
index b4b2f66ccb..3fdf7c64aa 100644
--- a/configs/A20-OLinuXino-Lime_defconfig
+++ b/configs/A20-OLinuXino-Lime_defconfig
@@ -17,6 +17,7 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_SUN7I_EMAC=y
+CONFIG_PHY_REALTEK=y
 CONFIG_AXP_ALDO3_VOLT=2800
 CONFIG_AXP_ALDO4_VOLT=2800
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/A20-OLinuXino_MICRO_defconfig b/configs/A20-OLinuXino_MICRO_defconfig
index d59a480e8d..ea7bc73dda 100644
--- a/configs/A20-OLinuXino_MICRO_defconfig
+++ b/configs/A20-OLinuXino_MICRO_defconfig
@@ -20,6 +20,7 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_SUN7I_EMAC=y
+CONFIG_PHY_REALTEK=y
 CONFIG_AXP_ALDO3_VOLT=2800
 CONFIG_AXP_ALDO4_VOLT=2800
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/A20-Olimex-SOM-EVB_defconfig b/configs/A20-Olimex-SOM-EVB_defconfig
index 59388ba7f4..8a2dfad526 100644
--- a/configs/A20-Olimex-SOM-EVB_defconfig
+++ b/configs/A20-Olimex-SOM-EVB_defconfig
@@ -21,6 +21,7 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_SUN7I_GMAC=y
+CONFIG_PHY_REALTEK=y
 CONFIG_RTL8211X_PHY_FORCE_MASTER=y
 CONFIG_AXP_ALDO3_VOLT=2800
 CONFIG_AXP_ALDO4_VOLT=2800
diff --git a/configs/Bananapi_defconfig b/configs/Bananapi_defconfig
index 5a45506571..eac3175f2d 100644
--- a/configs/Bananapi_defconfig
+++ b/configs/Bananapi_defconfig
@@ -18,4 +18,5 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_NETCONSOLE=y
 CONFIG_SUN7I_GMAC=y
+CONFIG_PHY_REALTEK=y
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/Bananapro_defconfig b/configs/Bananapro_defconfig
index 1503c41d3e..ef1ff21a39 100644
--- a/configs/Bananapro_defconfig
+++ b/configs/Bananapro_defconfig
@@ -20,5 +20,6 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_NETCONSOLE=y
 CONFIG_SUN7I_GMAC=y
+CONFIG_PHY_REALTEK=y
 CONFIG_AXP_ALDO4_VOLT=2500
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/CSQ_CS908_defconfig b/configs/CSQ_CS908_defconfig
index cac210c1e8..b771ab068d 100644
--- a/configs/CSQ_CS908_defconfig
+++ b/configs/CSQ_CS908_defconfig
@@ -14,6 +14,7 @@ CONFIG_SPL=y
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_SUN7I_EMAC=y
+CONFIG_PHY_REALTEK=y
 CONFIG_AXP_ALDO1_VOLT=3300
 CONFIG_AXP_DLDO1_VOLT=3300
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/Colombus_defconfig b/configs/Colombus_defconfig
index 7ce5d5ae2b..dd4eefb98a 100644
--- a/configs/Colombus_defconfig
+++ b/configs/Colombus_defconfig
@@ -24,5 +24,6 @@ CONFIG_SPL=y
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_SUN7I_GMAC=y
+CONFIG_PHY_REALTEK=y
 CONFIG_AXP_ALDO1_VOLT=3300
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/Cubieboard2_defconfig b/configs/Cubieboard2_defconfig
index 09b423104e..072ac047a6 100644
--- a/configs/Cubieboard2_defconfig
+++ b/configs/Cubieboard2_defconfig
@@ -16,4 +16,5 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_SUN7I_EMAC=y
+CONFIG_PHY_REALTEK=y
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/Cubietruck_defconfig b/configs/Cubietruck_defconfig
index 44082ccd30..fe15fea717 100644
--- a/configs/Cubietruck_defconfig
+++ b/configs/Cubietruck_defconfig
@@ -24,6 +24,7 @@ CONFIG_CMD_USB_MASS_STORAGE=y
 # CONFIG_SPL_PARTITION_UUIDS is not set
 CONFIG_DFU_RAM=y
 CONFIG_SUN7I_GMAC=y
+CONFIG_PHY_REALTEK=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_MUSB_GADGET=y
 CONFIG_USB_GADGET=y
diff --git a/configs/Hummingbird_A31_defconfig b/configs/Hummingbird_A31_defconfig
index c25bccc3f5..245b33d6dc 100644
--- a/configs/Hummingbird_A31_defconfig
+++ b/configs/Hummingbird_A31_defconfig
@@ -16,5 +16,6 @@ CONFIG_SPL=y
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_SUN7I_GMAC=y
+CONFIG_PHY_REALTEK=y
 CONFIG_AXP_ALDO1_VOLT=3300
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/Itead_Ibox_A20_defconfig b/configs/Itead_Ibox_A20_defconfig
index 2179306666..496b860954 100644
--- a/configs/Itead_Ibox_A20_defconfig
+++ b/configs/Itead_Ibox_A20_defconfig
@@ -16,4 +16,5 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_SUN7I_EMAC=y
+CONFIG_PHY_REALTEK=y
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/Lamobo_R1_defconfig b/configs/Lamobo_R1_defconfig
index e7b9ad7920..7979f4da21 100644
--- a/configs/Lamobo_R1_defconfig
+++ b/configs/Lamobo_R1_defconfig
@@ -18,4 +18,5 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_SUN7I_GMAC=y
+CONFIG_PHY_REALTEK=y
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/Linksprite_pcDuino3_Nano_defconfig b/configs/Linksprite_pcDuino3_Nano_defconfig
index 74789ca56e..6586c2168f 100644
--- a/configs/Linksprite_pcDuino3_Nano_defconfig
+++ b/configs/Linksprite_pcDuino3_Nano_defconfig
@@ -18,4 +18,5 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_SUN7I_GMAC=y
+CONFIG_PHY_REALTEK=y
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/Linksprite_pcDuino3_defconfig b/configs/Linksprite_pcDuino3_defconfig
index 1aa253abcb..f0290d82dd 100644
--- a/configs/Linksprite_pcDuino3_defconfig
+++ b/configs/Linksprite_pcDuino3_defconfig
@@ -16,4 +16,5 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_SUN7I_EMAC=y
+CONFIG_PHY_REALTEK=y
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/Mele_A1000G_quad_defconfig b/configs/Mele_A1000G_quad_defconfig
index 0152b21303..798745d40b 100644
--- a/configs/Mele_A1000G_quad_defconfig
+++ b/configs/Mele_A1000G_quad_defconfig
@@ -15,6 +15,7 @@ CONFIG_SPL=y
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_SUN7I_EMAC=y
+CONFIG_PHY_REALTEK=y
 CONFIG_AXP_DCDC1_VOLT=3300
 CONFIG_AXP_ALDO1_VOLT=3300
 CONFIG_AXP_DLDO1_VOLT=3300
diff --git a/configs/Mele_I7_defconfig b/configs/Mele_I7_defconfig
index 12f0c1a83c..8ccc93bb86 100644
--- a/configs/Mele_I7_defconfig
+++ b/configs/Mele_I7_defconfig
@@ -14,6 +14,7 @@ CONFIG_SPL=y
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_SUN7I_EMAC=y
+CONFIG_PHY_REALTEK=y
 CONFIG_AXP_DCDC1_VOLT=3300
 CONFIG_AXP_ALDO1_VOLT=3300
 CONFIG_AXP_DLDO1_VOLT=3300
diff --git a/configs/Mele_M3_defconfig b/configs/Mele_M3_defconfig
index 382c45b800..e5fcdd34cf 100644
--- a/configs/Mele_M3_defconfig
+++ b/configs/Mele_M3_defconfig
@@ -17,4 +17,5 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_SUN7I_EMAC=y
+CONFIG_PHY_REALTEK=y
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/Mele_M5_defconfig b/configs/Mele_M5_defconfig
index 594b230ff1..45c0d26791 100644
--- a/configs/Mele_M5_defconfig
+++ b/configs/Mele_M5_defconfig
@@ -17,4 +17,5 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_SUN7I_EMAC=y
+CONFIG_PHY_REALTEK=y
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/Mele_M9_defconfig b/configs/Mele_M9_defconfig
index 64a111ec6a..efa52f92f8 100644
--- a/configs/Mele_M9_defconfig
+++ b/configs/Mele_M9_defconfig
@@ -14,6 +14,7 @@ CONFIG_SPL=y
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_SUN7I_EMAC=y
+CONFIG_PHY_REALTEK=y
 CONFIG_AXP_DCDC1_VOLT=3300
 CONFIG_AXP_ALDO1_VOLT=3300
 CONFIG_AXP_DLDO1_VOLT=3300
diff --git a/configs/Orangepi_defconfig b/configs/Orangepi_defconfig
index 34eeb92fa6..2fe3f5978d 100644
--- a/configs/Orangepi_defconfig
+++ b/configs/Orangepi_defconfig
@@ -20,4 +20,5 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_SUN7I_GMAC=y
+CONFIG_PHY_REALTEK=y
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/Orangepi_mini_defconfig b/configs/Orangepi_mini_defconfig
index 2609c54bc2..71a93b58a5 100644
--- a/configs/Orangepi_mini_defconfig
+++ b/configs/Orangepi_mini_defconfig
@@ -22,4 +22,5 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_SUN7I_GMAC=y
+CONFIG_PHY_REALTEK=y
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/Sinlinx_SinA31s_defconfig b/configs/Sinlinx_SinA31s_defconfig
index bdf6ebe9f5..c6f98e4572 100644
--- a/configs/Sinlinx_SinA31s_defconfig
+++ b/configs/Sinlinx_SinA31s_defconfig
@@ -18,5 +18,6 @@ CONFIG_SPL=y
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_SUN7I_EMAC=y
+CONFIG_PHY_REALTEK=y
 CONFIG_AXP_DLDO1_VOLT=3300
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/Sinovoip_BPI_M2_defconfig b/configs/Sinovoip_BPI_M2_defconfig
index 78afc6d668..fe5845e670 100644
--- a/configs/Sinovoip_BPI_M2_defconfig
+++ b/configs/Sinovoip_BPI_M2_defconfig
@@ -14,6 +14,7 @@ CONFIG_SPL=y
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_SUN7I_GMAC=y
+CONFIG_PHY_REALTEK=y
 CONFIG_AXP_ALDO1_VOLT=3300
 CONFIG_AXP_ALDO2_VOLT=1800
 CONFIG_AXP_DLDO1_VOLT=3000
diff --git a/configs/Wits_Pro_A20_DKT_defconfig b/configs/Wits_Pro_A20_DKT_defconfig
index 979c6a6ae8..57298f1ea4 100644
--- a/configs/Wits_Pro_A20_DKT_defconfig
+++ b/configs/Wits_Pro_A20_DKT_defconfig
@@ -20,4 +20,5 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_SUN7I_GMAC=y
+CONFIG_PHY_REALTEK=y
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/i12-tvbox_defconfig b/configs/i12-tvbox_defconfig
index b609514de8..f423e57867 100644
--- a/configs/i12-tvbox_defconfig
+++ b/configs/i12-tvbox_defconfig
@@ -15,4 +15,5 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_SUN7I_EMAC=y
+CONFIG_PHY_REALTEK=y
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/icnova-a20-swac_defconfig b/configs/icnova-a20-swac_defconfig
index 63bbd37f97..f158220225 100644
--- a/configs/icnova-a20-swac_defconfig
+++ b/configs/icnova-a20-swac_defconfig
@@ -22,4 +22,5 @@ CONFIG_CMD_UNZIP=y
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_SUN7I_EMAC=y
+CONFIG_PHY_REALTEK=y
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/mixtile_loftq_defconfig b/configs/mixtile_loftq_defconfig
index 47289c6616..4c81b3d7b3 100644
--- a/configs/mixtile_loftq_defconfig
+++ b/configs/mixtile_loftq_defconfig
@@ -16,5 +16,6 @@ CONFIG_SPL=y
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_SUN7I_GMAC=y
+CONFIG_PHY_REALTEK=y
 CONFIG_AXP_ALDO1_VOLT=3300
 CONFIG_USB_EHCI_HCD=y
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index c0d141754f..04e8cf39c8 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -182,6 +182,9 @@ config SUN4I_EMAC
 	  sun4i hardware. Newer hardware supports the SUN7I_EMAC driver,
 	  which also works with 100 Megabit PHY's.
 
+config SUN7I_MAC
+	bool
+
 choice
 	prompt "Allwinner Sun7i GMAC support"
 	help
@@ -196,6 +199,7 @@ config SUN7I_NONE
 config SUN7I_EMAC
 	bool "MII"
 	select ETH_DESIGNWARE
+	select SUN7I_MAC
 	select PHYLIB
 	select MII
 	help
@@ -205,6 +209,7 @@ config SUN7I_EMAC
 config SUN7I_GMAC
 	bool "RGMII"
 	select ETH_DESIGNWARE
+	select SUN7I_MAC
 	select PHYLIB
 	select RGMII
 	select PHY_GIGE
diff --git a/drivers/net/Makefile b/drivers/net/Makefile
index aedb2cc90d..c5dd52bee2 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -22,7 +22,7 @@ obj-$(CONFIG_DNET) += dnet.o
 obj-$(CONFIG_E1000) += e1000.o
 obj-$(CONFIG_E1000_SPI) += e1000_spi.o
 obj-$(CONFIG_EEPRO100) += eepro100.o
-obj-$(CONFIG_SUNXI_EMAC) += sunxi_emac.o
+obj-$(CONFIG_SUN4I_EMAC) += sunxi_emac.o
 obj-$(CONFIG_SUN8I_EMAC) += sun8i_emac.o
 obj-$(CONFIG_ENC28J60) += enc28j60.o
 obj-$(CONFIG_EP93XX) += ep93xx_eth.o
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index 8f97b80619..5d2c5b9040 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -287,15 +287,12 @@ extern int soft_i2c_gpio_scl;
 #endif /* CONFIG_VIDEO */
 
 /* Ethernet support */
-#ifdef CONFIG_SUNXI_EMAC
+#if defined(CONFIG_SUN4I_EMAC) || \
+    defined(CONFIG_SUN7I_EMAC) || \
+    defined(CONFIG_SUN7I_GMAC)
 #define CONFIG_PHY_ADDR		1
 #endif
 
-#ifdef CONFIG_SUNXI_GMAC
-#define CONFIG_PHY_ADDR		1
-#define CONFIG_PHY_REALTEK
-#endif
-
 #ifdef CONFIG_USB_EHCI_HCD
 #define CONFIG_USB_OHCI_NEW
 #define CONFIG_USB_OHCI_SUNXI
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index cd0165f934..1e2bf24d5a 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -2796,8 +2796,6 @@ CONFIG_STV0991_HZ
 CONFIG_STV0991_HZ_CLOCK
 CONFIG_ST_SMI
 CONFIG_SUNXI_AHCI
-CONFIG_SUNXI_EMAC
-CONFIG_SUNXI_GMAC
 CONFIG_SUNXI_GPIO
 CONFIG_SUNXI_MAX_FB_SIZE
 CONFIG_SUNXI_USB_PHYS
-- 
2.11.0



More information about the U-Boot mailing list