diff --git a/patch/u-boot/u-boot-sunxi/emac-gmac-fixes.patch b/patch/u-boot/u-boot-sunxi/emac-gmac-fixes.patch new file mode 100644 index 0000000000..322c696536 --- /dev/null +++ b/patch/u-boot/u-boot-sunxi/emac-gmac-fixes.patch @@ -0,0 +1,74 @@ +diff --git a/arch/arm/include/asm/arch-sunxi/sys_proto.h b/arch/arm/include/asm/arch-sunxi/sys_proto.h +index a373319a2b..096510b787 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_GMAC + 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..34a2786f30 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_GMAC) += 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/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 64a190059a..3e789c5bf0 100644 +--- a/include/configs/sunxi-common.h ++++ b/include/configs/sunxi-common.h +@@ -285,13 +285,13 @@ extern int soft_i2c_gpio_scl; + #endif /* CONFIG_VIDEO */ + + /* Ethernet support */ +-#ifdef CONFIG_SUNXI_EMAC ++#ifdef CONFIG_SUN4I_EMAC + #define CONFIG_PHY_ADDR 1 + #define CONFIG_MII /* MII PHY management */ + #define CONFIG_PHYLIB + #endif + +-#ifdef CONFIG_SUNXI_GMAC ++#ifdef CONFIG_SUN7I_GMAC + #define CONFIG_PHY_GIGE /* GMAC can use gigabit PHY */ + #define CONFIG_PHY_ADDR 1 + #define CONFIG_MII /* MII PHY management */ +diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt +index ed349b9e6b..4fc89ca8eb 100644 +--- a/scripts/config_whitelist.txt ++++ b/scripts/config_whitelist.txt +@@ -2797,8 +2797,8 @@ CONFIG_STV0991_HZ + CONFIG_STV0991_HZ_CLOCK + CONFIG_ST_SMI + CONFIG_SUNXI_AHCI +-CONFIG_SUNXI_EMAC +-CONFIG_SUNXI_GMAC ++CONFIG_SUN4I_EMAC ++CONFIG_SUN7I_GMAC + CONFIG_SUNXI_GPIO + CONFIG_SUNXI_MAX_FB_SIZE + CONFIG_SUNXI_USB_PHYS