uboot-sunxi: Backport fix for stale CONFIG_SUNXIG_GMAC references
[openwrt/staging/wigyori.git] / package / boot / uboot-sunxi / patches / 302-sunxi-Fix-CONFIG_SUNXI_GMAC-references.patch
1 From 6ff005cf19363382fc867d7876a75fd8a386e894 Mon Sep 17 00:00:00 2001
2 From: Dave Prue <dave@prue.com>
3 Date: Thu, 31 Aug 2017 19:21:01 +0200
4 Subject: [PATCH] sunxi: Fix CONFIG_SUNXI_GMAC references
5
6 SUNXI_GMAC was still used to configure the code where as the
7 same has been renamed and moved to Kconfig in below commit
8 "sunxi: Move SUNXI_GMAC to Kconfig"
9 (sha1: 4d43d065db3262f9a9918ba72457bf36dfb8e0bb)
10
11 Signed-off-by: Dave Prue <dave@prue.com>
12 Reviewed-by: Simon Glass <sjg@chromium.org>
13 Reviewed-by: Jagan Teki <jagan@openedev.com>
14 Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
15 Tested-by: Mark Kettenis <kettenis@openbsd.org>
16 [Tweek commit message, config_whitelist.txt, build-whitelist.sh]
17 Signed-off-by: Jagan Teki <jagan@openedev.com>
18 ---
19 arch/arm/include/asm/arch-sunxi/sys_proto.h | 2 +-
20 board/sunxi/Makefile | 2 +-
21 include/configs/sunxi-common.h | 2 +-
22 scripts/build-whitelist.sh | 4 ++--
23 scripts/config_whitelist.txt | 1 -
24 5 files changed, 5 insertions(+), 6 deletions(-)
25
26 --- a/arch/arm/include/asm/arch-sunxi/sys_proto.h
27 +++ b/arch/arm/include/asm/arch-sunxi/sys_proto.h
28 @@ -24,7 +24,7 @@ void sdelay(unsigned long);
29 void return_to_fel(uint32_t lr, uint32_t sp);
30
31 /* Board / SoC level designware gmac init */
32 -#if !defined CONFIG_SPL_BUILD && defined CONFIG_SUNXI_GMAC
33 +#if !defined CONFIG_SPL_BUILD && defined CONFIG_SUN7I_GMAC
34 void eth_init_board(void);
35 #else
36 static inline void eth_init_board(void) {}
37 --- a/board/sunxi/Makefile
38 +++ b/board/sunxi/Makefile
39 @@ -9,7 +9,7 @@
40 # SPDX-License-Identifier: GPL-2.0+
41 #
42 obj-y += board.o
43 -obj-$(CONFIG_SUNXI_GMAC) += gmac.o
44 +obj-$(CONFIG_SUN7I_GMAC) += gmac.o
45 obj-$(CONFIG_SUNXI_AHCI) += ahci.o
46 obj-$(CONFIG_MACH_SUN4I) += dram_sun4i_auto.o
47 obj-$(CONFIG_MACH_SUN5I) += dram_sun5i_auto.o
48 --- a/include/configs/sunxi-common.h
49 +++ b/include/configs/sunxi-common.h
50 @@ -302,7 +302,7 @@ extern int soft_i2c_gpio_scl;
51 #define CONFIG_PHYLIB
52 #endif
53
54 -#ifdef CONFIG_SUNXI_GMAC
55 +#ifdef CONFIG_SUN7I_GMAC
56 #define CONFIG_PHY_GIGE /* GMAC can use gigabit PHY */
57 #define CONFIG_PHY_ADDR 1
58 #define CONFIG_MII /* MII PHY management */
59 --- a/scripts/build-whitelist.sh
60 +++ b/scripts/build-whitelist.sh
61 @@ -13,10 +13,10 @@ export LC_ALL=C LC_COLLATE=C
62 # There are two independent greps. The first pulls out the component parts
63 # of CONFIG_SYS_EXTRA_OPTIONS. An example is:
64 #
65 -# SUNXI_GMAC,AHCI,SATAPWR=SUNXI_GPB(8)
66 +# SUN7I_GMAC,AHCI,SATAPWR=SUNXI_GPB(8)
67 #
68 # We want this to produce:
69 -# CONFIG_SUNXI_GMAC
70 +# CONFIG_SUN7I_GMAC
71 # CONFIG_AHCI
72 # CONFIG_SATAPWR
73 #
74 --- a/scripts/config_whitelist.txt
75 +++ b/scripts/config_whitelist.txt
76 @@ -2371,7 +2371,6 @@ CONFIG_STV0991_HZ_CLOCK
77 CONFIG_ST_SMI
78 CONFIG_SUNXI_AHCI
79 CONFIG_SUNXI_EMAC
80 -CONFIG_SUNXI_GMAC
81 CONFIG_SUNXI_GPIO
82 CONFIG_SUNXI_MAX_FB_SIZE
83 CONFIG_SUNXI_USB_PHYS