u-boot.lists.denx.de archive mirror
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2 0/7] sunxi: Kconfig consolidation and cleanup
@ 2014-10-24 20:20 Ian Campbell
  2014-10-24 20:20 ` [U-Boot] [PATCH v2 1/7] sunxi: kconfig: Add top-level ARCH_SUNXI Ian Campbell
                   ` (6 more replies)
  0 siblings, 7 replies; 9+ messages in thread
From: Ian Campbell @ 2014-10-24 20:20 UTC (permalink / raw)
  To: u-boot

This series consolidates some Kconfig options and makes SPL_FEL a first
class .config member instead of putting it in CONFIG_SYS_EXTRA_OPTIONS.

This means it is possible to do a FEL build for any board with:
        make <board>_config
        echo CONFIG_SPL_FEL=y >> .config
        echo CONFIG_SPL_FEL=y >> spl/.config
or better
        make <board>_config
        sed -i -e 's/\# CONFIG_SPL_FEL is not set/CONFIG_SPL_FEL=y/g' .config spl/.config
which is still one more step than I would like but still preferable IMHO
to:
        sed -i -e 's/^CONFIG_SYS_EXTRA_OPTIONS="[^"]*/&,SPL_FEL/g' .config spl/.config

Near the end I've added a patch which adds <BOARD>_felconfig to automate
this, not sure how folks will feel about this, so I've deliberately made
it last so it can easily be ignored...

I've been using a little hack (below, updated to use felconfig) to
MAKEALL to help build test all this.

Since v1:
      * Rebased to current u-boot-sunxi#next
      * Hans' equivalent of my first patch has been applied to
        u-boot-sunxi#next, so my patch is dropped
      * Toplevel option is now CONFIG_ARCH_SUNXI
      * Per-SoC options are now CONFIG_MACH_SUN[45678]I
      * Board selection has been pulled out of CONFIG_SYS_EXTRA_OPTIONS
        into Kconfig, as CONFIG_TARGET_<BOARD>
      * The <BOARD>_FEL_defconfig files are now removed

Ian.

My MAKEALL hack, surely not upstreamable ;-)

diff --git a/MAKEALL b/MAKEALL
index 7c16319..3a8d1d0 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -660,6 +660,11 @@ build_target() {
        echo "Building ${target} board..."
        ${MAKE} -s ${target}_defconfig >/dev/null
 
+       if [ -n "$SUNXI_FORCE_FEL" ] ; then
+           sed -i -e 's/\# CONFIG_SPL_FEL is not set/CONFIG_SPL_FEL=y/g' \
+               .config spl/.config
+       fi
+
        ${MAKE} ${JOBS} ${CHECK} all \
                >${LOG_DIR}/$target.MAKELOG 2> ${LOG_DIR}/$target.ERR
 

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH v2 1/7] sunxi: kconfig: Add top-level ARCH_SUNXI
  2014-10-24 20:20 [U-Boot] [PATCH v2 0/7] sunxi: Kconfig consolidation and cleanup Ian Campbell
@ 2014-10-24 20:20 ` Ian Campbell
  2014-10-24 20:20 ` [U-Boot] [PATCH v2 2/7] sunxi: kconfig: Rename TARGET_SUN[45678]I to MACH_SUN[45678]I Ian Campbell
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Ian Campbell @ 2014-10-24 20:20 UTC (permalink / raw)
  To: u-boot

And make TARGET_SUN[45678]I a choice variable under this.

configs updated with:
    sed -i -e 's/^\(\+S:\)\?CONFIG_TARGET_SUN.I=y/\1CONFIG_ARCH_SUNXI=y\n&/g' configs/*

Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
---
v2: Rebased.
    Handle new sun6i & sun8i.
    Use ARCH_SUNXI rather than TARGET_SUNXI.
    Mention Allwinner SoCs in the toplevel ARCH_SUNXI name.
    Mention the SoC name (A10, A20 etc) in the individual options.
---
 arch/arm/Kconfig                      | 16 ++--------------
 board/sunxi/Kconfig                   | 22 +++++++++++++++++++++-
 configs/A10-OLinuXino-Lime_defconfig  |  1 +
 configs/A10s-OLinuXino-M_defconfig    |  1 +
 configs/A13-OLinuXinoM_defconfig      |  1 +
 configs/A13-OLinuXino_defconfig       |  1 +
 configs/A20-OLinuXino-Lime2_defconfig |  1 +
 configs/A20-OLinuXino-Lime_defconfig  |  1 +
 configs/A20-OLinuXino_MICRO_defconfig |  1 +
 configs/Auxtek-T004_defconfig         |  1 +
 configs/Bananapi_defconfig            |  1 +
 configs/Colombus_defconfig            |  1 +
 configs/Cubieboard2_FEL_defconfig     |  1 +
 configs/Cubieboard2_defconfig         |  1 +
 configs/Cubieboard_defconfig          |  1 +
 configs/Cubietruck_FEL_defconfig      |  1 +
 configs/Cubietruck_defconfig          |  1 +
 configs/Ippo_q8h_v5_defconfig         |  1 +
 configs/Linksprite_pcDuino3_defconfig |  1 +
 configs/Mele_A1000G_defconfig         |  1 +
 configs/Mele_A1000_defconfig          |  1 +
 configs/Mele_M3_defconfig             |  1 +
 configs/Mini-X-1Gb_defconfig          |  1 +
 configs/Mini-X_defconfig              |  1 +
 configs/ba10_tv_box_defconfig         |  1 +
 configs/i12-tvbox_defconfig           |  1 +
 configs/qt840a_defconfig              |  1 +
 configs/r7-tv-dongle_defconfig        |  1 +
 28 files changed, 49 insertions(+), 15 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 8f910f3..524d856 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -444,20 +444,8 @@ config TARGET_CM_FX6
 config TARGET_SOCFPGA_CYCLONE5
 	bool "Support socfpga_cyclone5"
 
-config TARGET_SUN4I
-	bool "Support sun4i"
-
-config TARGET_SUN5I
-	bool "Support sun5i"
-
-config TARGET_SUN6I
-	bool "Support sun6i"
-
-config TARGET_SUN7I
-	bool "Support sun7i"
-
-config TARGET_SUN8I
-	bool "Support sun8i"
+config ARCH_SUNXI
+	bool "Support sunxi (Allwinner) SoCs"
 
 config TARGET_SNOWBALL
 	bool "Support snowball"
diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig
index 31a1503..b13dccd 100644
--- a/board/sunxi/Kconfig
+++ b/board/sunxi/Kconfig
@@ -1,4 +1,24 @@
-if TARGET_SUN4I || TARGET_SUN5I || TARGET_SUN6I || TARGET_SUN7I || TARGET_SUN8I
+if ARCH_SUNXI
+
+choice
+	prompt "Sunxi SoC Variant"
+
+config TARGET_SUN4I
+	bool "sun4i (Allwinner A10)"
+
+config TARGET_SUN5I
+	bool "sun5i (Allwinner A13)"
+
+config TARGET_SUN6I
+	bool "sun6i (Allwinner A31)"
+
+config TARGET_SUN7I
+	bool "sun7i (Allwinner A20)"
+
+config TARGET_SUN8I
+	bool "sun8i (Allwinner A23)"
+
+endchoice
 
 config SYS_CONFIG_NAME
 	string
diff --git a/configs/A10-OLinuXino-Lime_defconfig b/configs/A10-OLinuXino-Lime_defconfig
index f992293..816ffb5 100644
--- a/configs/A10-OLinuXino-Lime_defconfig
+++ b/configs/A10-OLinuXino-Lime_defconfig
@@ -2,4 +2,5 @@ CONFIG_SPL=y
 CONFIG_SYS_EXTRA_OPTIONS="A10_OLINUXINO_L,AXP209_POWER,SUNXI_EMAC,AHCI,SATAPWR=SUNXI_GPC(3),USB_EHCI"
 CONFIG_FDTFILE="sun4i-a10-olinuxino-lime.dtb"
 +S:CONFIG_ARM=y
++S:CONFIG_ARCH_SUNXI=y
 +S:CONFIG_TARGET_SUN4I=y
diff --git a/configs/A10s-OLinuXino-M_defconfig b/configs/A10s-OLinuXino-M_defconfig
index 2aad834..38461d1 100644
--- a/configs/A10s-OLinuXino-M_defconfig
+++ b/configs/A10s-OLinuXino-M_defconfig
@@ -5,4 +5,5 @@ CONFIG_MMC_SUNXI_SLOT_EXTRA=1
 +S:CONFIG_MMC0_CD_PIN="PG1"
 +S:CONFIG_MMC1_CD_PIN="PG13"
 +S:CONFIG_ARM=y
++S:CONFIG_ARCH_SUNXI=y
 +S:CONFIG_TARGET_SUN5I=y
diff --git a/configs/A13-OLinuXinoM_defconfig b/configs/A13-OLinuXinoM_defconfig
index 9ae7b12..7a0614d 100644
--- a/configs/A13-OLinuXinoM_defconfig
+++ b/configs/A13-OLinuXinoM_defconfig
@@ -2,4 +2,5 @@ CONFIG_SPL=y
 CONFIG_SYS_EXTRA_OPTIONS="A13_OLINUXINOM,CONS_INDEX=2,USB_EHCI,SUNXI_USB_VBUS0_GPIO=SUNXI_GPG(11)"
 CONFIG_FDTFILE="sun5i-a13-olinuxino-micro.dtb"
 +S:CONFIG_ARM=y
++S:CONFIG_ARCH_SUNXI=y
 +S:CONFIG_TARGET_SUN5I=y
diff --git a/configs/A13-OLinuXino_defconfig b/configs/A13-OLinuXino_defconfig
index 2c726f3..4822449 100644
--- a/configs/A13-OLinuXino_defconfig
+++ b/configs/A13-OLinuXino_defconfig
@@ -2,4 +2,5 @@ CONFIG_SPL=y
 CONFIG_SYS_EXTRA_OPTIONS="A13_OLINUXINO,CONS_INDEX=2,AXP209_POWER,USB_EHCI,SUNXI_USB_VBUS0_GPIO=SUNXI_GPG(11)"
 CONFIG_FDTFILE="sun5i-a13-olinuxino.dtb"
 +S:CONFIG_ARM=y
++S:CONFIG_ARCH_SUNXI=y
 +S:CONFIG_TARGET_SUN5I=y
diff --git a/configs/A20-OLinuXino-Lime2_defconfig b/configs/A20-OLinuXino-Lime2_defconfig
index 75ef872..7933704 100644
--- a/configs/A20-OLinuXino-Lime2_defconfig
+++ b/configs/A20-OLinuXino-Lime2_defconfig
@@ -2,4 +2,5 @@ CONFIG_SPL=y
 CONFIG_SYS_EXTRA_OPTIONS="A20_OLINUXINO_L2,AXP209_POWER,SUNXI_GMAC,RGMII,AHCI,SATAPWR=SUNXI_GPC(3),USB_EHCI"
 CONFIG_FDTFILE="sun7i-a20-olinuxino-lime2.dtb"
 +S:CONFIG_ARM=y
++S:CONFIG_ARCH_SUNXI=y
 +S:CONFIG_TARGET_SUN7I=y
diff --git a/configs/A20-OLinuXino-Lime_defconfig b/configs/A20-OLinuXino-Lime_defconfig
index ca79fd5..eafd733 100644
--- a/configs/A20-OLinuXino-Lime_defconfig
+++ b/configs/A20-OLinuXino-Lime_defconfig
@@ -2,4 +2,5 @@ CONFIG_SPL=y
 CONFIG_SYS_EXTRA_OPTIONS="A20_OLINUXINO_L,AXP209_POWER,SUNXI_GMAC,AHCI,SATAPWR=SUNXI_GPC(3),USB_EHCI"
 CONFIG_FDTFILE="sun7i-a20-olinuxino-lime.dtb"
 +S:CONFIG_ARM=y
++S:CONFIG_ARCH_SUNXI=y
 +S:CONFIG_TARGET_SUN7I=y
diff --git a/configs/A20-OLinuXino_MICRO_defconfig b/configs/A20-OLinuXino_MICRO_defconfig
index 0e0a7de..07edef5 100644
--- a/configs/A20-OLinuXino_MICRO_defconfig
+++ b/configs/A20-OLinuXino_MICRO_defconfig
@@ -5,4 +5,5 @@ CONFIG_MMC_SUNXI_SLOT_EXTRA=3
 +S:CONFIG_MMC0_CD_PIN="PH1"
 +S:CONFIG_MMC3_CD_PIN="PH11"
 +S:CONFIG_ARM=y
++S:CONFIG_ARCH_SUNXI=y
 +S:CONFIG_TARGET_SUN7I=y
diff --git a/configs/Auxtek-T004_defconfig b/configs/Auxtek-T004_defconfig
index ed06f57..a2577b8 100644
--- a/configs/Auxtek-T004_defconfig
+++ b/configs/Auxtek-T004_defconfig
@@ -2,4 +2,5 @@ CONFIG_SPL=y
 CONFIG_SYS_EXTRA_OPTIONS="AUXTEK_T004,AXP152_POWER,USB_EHCI,SUNXI_USB_VBUS0_GPIO=SUNXI_GPG(13)"
 CONFIG_FDTFILE="sun5i-a10s-auxtek-t004.dtb"
 +S:CONFIG_ARM=y
++S:CONFIG_ARCH_SUNXI=y
 +S:CONFIG_TARGET_SUN5I=y
diff --git a/configs/Bananapi_defconfig b/configs/Bananapi_defconfig
index d59cf72..8f8853f 100644
--- a/configs/Bananapi_defconfig
+++ b/configs/Bananapi_defconfig
@@ -2,4 +2,5 @@ CONFIG_SPL=y
 CONFIG_SYS_EXTRA_OPTIONS="BANANAPI,AXP209_POWER,SUNXI_GMAC,RGMII,MACPWR=SUNXI_GPH(23),AHCI,USB_EHCI"
 CONFIG_FDTFILE="sun7i-a20-bananapi.dtb"
 +S:CONFIG_ARM=y
++S:CONFIG_ARCH_SUNXI=y
 +S:CONFIG_TARGET_SUN7I=y
diff --git a/configs/Colombus_defconfig b/configs/Colombus_defconfig
index 16800de..b9ee7c8 100644
--- a/configs/Colombus_defconfig
+++ b/configs/Colombus_defconfig
@@ -1,4 +1,5 @@
 CONFIG_SYS_EXTRA_OPTIONS="COLOMBUS"
 CONFIG_ARM=y
+CONFIG_ARCH_SUNXI=y
 CONFIG_TARGET_SUN6I=y
 CONFIG_FDTFILE="sun6i-a31-colombus.dtb"
diff --git a/configs/Cubieboard2_FEL_defconfig b/configs/Cubieboard2_FEL_defconfig
index 353b04a..7ae7a2b 100644
--- a/configs/Cubieboard2_FEL_defconfig
+++ b/configs/Cubieboard2_FEL_defconfig
@@ -2,4 +2,5 @@ CONFIG_SPL=y
 CONFIG_SYS_EXTRA_OPTIONS="CUBIEBOARD2,SPL_FEL,AXP209_POWER,SUNXI_GMAC,AHCI,SATAPWR=SUNXI_GPB(8),USB_EHCI"
 CONFIG_FDTFILE="sun7i-a20-cubieboard2.dtb"
 +S:CONFIG_ARM=y
++S:CONFIG_ARCH_SUNXI=y
 +S:CONFIG_TARGET_SUN7I=y
diff --git a/configs/Cubieboard2_defconfig b/configs/Cubieboard2_defconfig
index 11a0c5f..9c5997d 100644
--- a/configs/Cubieboard2_defconfig
+++ b/configs/Cubieboard2_defconfig
@@ -2,4 +2,5 @@ CONFIG_SPL=y
 CONFIG_SYS_EXTRA_OPTIONS="CUBIEBOARD2,AXP209_POWER,SUNXI_GMAC,AHCI,SATAPWR=SUNXI_GPB(8),USB_EHCI"
 CONFIG_FDTFILE="sun7i-a20-cubieboard2.dtb"
 +S:CONFIG_ARM=y
++S:CONFIG_ARCH_SUNXI=y
 +S:CONFIG_TARGET_SUN7I=y
diff --git a/configs/Cubieboard_defconfig b/configs/Cubieboard_defconfig
index 8c1ff95..eafa09d 100644
--- a/configs/Cubieboard_defconfig
+++ b/configs/Cubieboard_defconfig
@@ -2,4 +2,5 @@ CONFIG_SPL=y
 CONFIG_SYS_EXTRA_OPTIONS="CUBIEBOARD,AXP209_POWER,SUNXI_EMAC,AHCI,SATAPWR=SUNXI_GPB(8),USB_EHCI"
 CONFIG_FDTFILE="sun4i-a10-cubieboard.dtb"
 +S:CONFIG_ARM=y
++S:CONFIG_ARCH_SUNXI=y
 +S:CONFIG_TARGET_SUN4I=y
diff --git a/configs/Cubietruck_FEL_defconfig b/configs/Cubietruck_FEL_defconfig
index 23c5efb..6218c58 100644
--- a/configs/Cubietruck_FEL_defconfig
+++ b/configs/Cubietruck_FEL_defconfig
@@ -2,4 +2,5 @@ CONFIG_SPL=y
 CONFIG_SYS_EXTRA_OPTIONS="CUBIETRUCK,SPL_FEL,AXP209_POWER,SUNXI_GMAC,RGMII,AHCI,SATAPWR=SUNXI_GPH(12),USB_EHCI"
 CONFIG_FDTFILE="sun7i-a20-cubietruck.dtb"
 +S:CONFIG_ARM=y
++S:CONFIG_ARCH_SUNXI=y
 +S:CONFIG_TARGET_SUN7I=y
diff --git a/configs/Cubietruck_defconfig b/configs/Cubietruck_defconfig
index 1389f21..9a56f18 100644
--- a/configs/Cubietruck_defconfig
+++ b/configs/Cubietruck_defconfig
@@ -2,4 +2,5 @@ CONFIG_SPL=y
 CONFIG_SYS_EXTRA_OPTIONS="CUBIETRUCK,AXP209_POWER,SUNXI_GMAC,RGMII,AHCI,SATAPWR=SUNXI_GPH(12),USB_EHCI"
 CONFIG_FDTFILE="sun7i-a20-cubietruck.dtb"
 +S:CONFIG_ARM=y
++S:CONFIG_ARCH_SUNXI=y
 +S:CONFIG_TARGET_SUN7I=y
diff --git a/configs/Ippo_q8h_v5_defconfig b/configs/Ippo_q8h_v5_defconfig
index 781f137..d9ea010 100644
--- a/configs/Ippo_q8h_v5_defconfig
+++ b/configs/Ippo_q8h_v5_defconfig
@@ -1,4 +1,5 @@
 CONFIG_SYS_EXTRA_OPTIONS="IPPO_Q8H_V5,CONS_INDEX=5"
 CONFIG_ARM=y
+CONFIG_ARCH_SUNXI=y
 CONFIG_TARGET_SUN8I=y
 CONFIG_DEFAULT_DEVICE_TREE="sun8i-a23-ippo-q8h-v5.dtb"
diff --git a/configs/Linksprite_pcDuino3_defconfig b/configs/Linksprite_pcDuino3_defconfig
index efc5301..046ab6f 100644
--- a/configs/Linksprite_pcDuino3_defconfig
+++ b/configs/Linksprite_pcDuino3_defconfig
@@ -2,4 +2,5 @@ CONFIG_SPL=y
 CONFIG_SYS_EXTRA_OPTIONS="PCDUINO3,AXP209_POWER,SUNXI_GMAC,AHCI,SATAPWR=SUNXI_GPH(2),USB_EHCI"
 CONFIG_FDTFILE="sun7i-a20-pcduino3.dtb"
 +S:CONFIG_ARM=y
++S:CONFIG_ARCH_SUNXI=y
 +S:CONFIG_TARGET_SUN7I=y
diff --git a/configs/Mele_A1000G_defconfig b/configs/Mele_A1000G_defconfig
index 06c4cac..c0608a5 100644
--- a/configs/Mele_A1000G_defconfig
+++ b/configs/Mele_A1000G_defconfig
@@ -2,4 +2,5 @@ CONFIG_SPL=y
 CONFIG_SYS_EXTRA_OPTIONS="MELE_A1000G,AXP209_POWER,SUNXI_EMAC,MACPWR=SUNXI_GPH(15),AHCI,USB_EHCI"
 CONFIG_FDTFILE="sun4i-a10-a1000.dtb"
 +S:CONFIG_ARM=y
++S:CONFIG_ARCH_SUNXI=y
 +S:CONFIG_TARGET_SUN4I=y
diff --git a/configs/Mele_A1000_defconfig b/configs/Mele_A1000_defconfig
index d386c79..7623975 100644
--- a/configs/Mele_A1000_defconfig
+++ b/configs/Mele_A1000_defconfig
@@ -2,4 +2,5 @@ CONFIG_SPL=y
 CONFIG_SYS_EXTRA_OPTIONS="MELE_A1000,AXP209_POWER,SUNXI_EMAC,MACPWR=SUNXI_GPH(15),AHCI,USB_EHCI"
 CONFIG_FDTFILE="sun4i-a10-a1000.dtb"
 +S:CONFIG_ARM=y
++S:CONFIG_ARCH_SUNXI=y
 +S:CONFIG_TARGET_SUN4I=y
diff --git a/configs/Mele_M3_defconfig b/configs/Mele_M3_defconfig
index a043ad2..2493446 100644
--- a/configs/Mele_M3_defconfig
+++ b/configs/Mele_M3_defconfig
@@ -4,4 +4,5 @@ CONFIG_FDTFILE="sun7i-a20-m3.dtb"
 +S:CONFIG_MMC_SUNXI_SLOT_EXTRA=2
 +S:CONFIG_MMC0_CD_PIN="PH1"
 +S:CONFIG_ARM=y
++S:CONFIG_ARCH_SUNXI=y
 +S:CONFIG_TARGET_SUN7I=y
diff --git a/configs/Mini-X-1Gb_defconfig b/configs/Mini-X-1Gb_defconfig
index 5db4aa3..cd9ac59 100644
--- a/configs/Mini-X-1Gb_defconfig
+++ b/configs/Mini-X-1Gb_defconfig
@@ -2,4 +2,5 @@ CONFIG_SPL=y
 CONFIG_SYS_EXTRA_OPTIONS="MINI_X_1GB,AXP209_POWER,USB_EHCI"
 CONFIG_FDTFILE="sun4i-a10-mini-xplus.dtb"
 +S:CONFIG_ARM=y
++S:CONFIG_ARCH_SUNXI=y
 +S:CONFIG_TARGET_SUN4I=y
diff --git a/configs/Mini-X_defconfig b/configs/Mini-X_defconfig
index 6718dcb..adccb8b 100644
--- a/configs/Mini-X_defconfig
+++ b/configs/Mini-X_defconfig
@@ -2,4 +2,5 @@ CONFIG_SPL=y
 CONFIG_SYS_EXTRA_OPTIONS="MINI_X,AXP209_POWER,USB_EHCI"
 CONFIG_FDTFILE="sun4i-a10-mini-xplus.dtb"
 +S:CONFIG_ARM=y
++S:CONFIG_ARCH_SUNXI=y
 +S:CONFIG_TARGET_SUN4I=y
diff --git a/configs/ba10_tv_box_defconfig b/configs/ba10_tv_box_defconfig
index 6f64875..743a617 100644
--- a/configs/ba10_tv_box_defconfig
+++ b/configs/ba10_tv_box_defconfig
@@ -2,4 +2,5 @@ CONFIG_SPL=y
 CONFIG_SYS_EXTRA_OPTIONS="BA10_TV_BOX,AXP209_POWER,SUNXI_EMAC,USB_EHCI,SUNXI_USB_VBUS1_GPIO=SUNXI_GPH(12)"
 CONFIG_FDTFILE="sun4i-a10-ba10-tvbox.dtb"
 +S:CONFIG_ARM=y
++S:CONFIG_ARCH_SUNXI=y
 +S:CONFIG_TARGET_SUN4I=y
diff --git a/configs/i12-tvbox_defconfig b/configs/i12-tvbox_defconfig
index 2ef0f91..e8a9eaf 100644
--- a/configs/i12-tvbox_defconfig
+++ b/configs/i12-tvbox_defconfig
@@ -2,4 +2,5 @@ CONFIG_SPL=y
 CONFIG_SYS_EXTRA_OPTIONS="I12_TVBOX,AXP209_POWER,SUNXI_GMAC,MACPWR=SUNXI_GPH(21),USB_EHCI"
 CONFIG_FDTFILE="sun7i-a20-i12-tvbox.dtb"
 +S:CONFIG_ARM=y
++S:CONFIG_ARCH_SUNXI=y
 +S:CONFIG_TARGET_SUN7I=y
diff --git a/configs/qt840a_defconfig b/configs/qt840a_defconfig
index a8d4bb8..df96eec 100644
--- a/configs/qt840a_defconfig
+++ b/configs/qt840a_defconfig
@@ -2,4 +2,5 @@ CONFIG_SPL=y
 CONFIG_SYS_EXTRA_OPTIONS="QT840A,AXP209_POWER,SUNXI_GMAC,MACPWR=SUNXI_GPH(21),USB_EHCI"
 CONFIG_FDTFILE="sun7i-a20-i12-tvbox.dtb"
 +S:CONFIG_ARM=y
++S:CONFIG_ARCH_SUNXI=y
 +S:CONFIG_TARGET_SUN7I=y
diff --git a/configs/r7-tv-dongle_defconfig b/configs/r7-tv-dongle_defconfig
index 6aba942..6b8dd97 100644
--- a/configs/r7-tv-dongle_defconfig
+++ b/configs/r7-tv-dongle_defconfig
@@ -2,4 +2,5 @@ CONFIG_SPL=y
 CONFIG_SYS_EXTRA_OPTIONS="R7DONGLE,AXP152_POWER,USB_EHCI,SUNXI_USB_VBUS0_GPIO=SUNXI_GPG(13)"
 CONFIG_FDTFILE="sun5i-a10s-r7-tv-dongle.dtb"
 +S:CONFIG_ARM=y
++S:CONFIG_ARCH_SUNXI=y
 +S:CONFIG_TARGET_SUN5I=y
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH v2 2/7] sunxi: kconfig: Rename TARGET_SUN[45678]I to MACH_SUN[45678]I.
  2014-10-24 20:20 [U-Boot] [PATCH v2 0/7] sunxi: Kconfig consolidation and cleanup Ian Campbell
  2014-10-24 20:20 ` [U-Boot] [PATCH v2 1/7] sunxi: kconfig: Add top-level ARCH_SUNXI Ian Campbell
@ 2014-10-24 20:20 ` Ian Campbell
  2014-10-24 20:20 ` [U-Boot] [PATCH v2 3/7] sunxi: Kconfig: Make SPL_FEL a toplevel Kconfig option Ian Campbell
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Ian Campbell @ 2014-10-24 20:20 UTC (permalink / raw)
  To: u-boot

Now we have CONFIG_ARCH_SUNXI as the toplevel, CONFIG_MACH_SUN[45678]I as the
per-SoC option and leave CONFIG_TARGET_BLAH free for individual boards in the
future.

Done automatically with:
    sed -i -e 's/TARGET_\(SUN[45678]I\)/MACH_\1/g' $(git grep -l TARGET_SUN[45678]I)

Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
---
v2: New patch
---
 board/sunxi/Kconfig                   | 20 ++++++++++----------
 configs/A10-OLinuXino-Lime_defconfig  |  2 +-
 configs/A10s-OLinuXino-M_defconfig    |  2 +-
 configs/A13-OLinuXinoM_defconfig      |  2 +-
 configs/A13-OLinuXino_defconfig       |  2 +-
 configs/A20-OLinuXino-Lime2_defconfig |  2 +-
 configs/A20-OLinuXino-Lime_defconfig  |  2 +-
 configs/A20-OLinuXino_MICRO_defconfig |  2 +-
 configs/Auxtek-T004_defconfig         |  2 +-
 configs/Bananapi_defconfig            |  2 +-
 configs/Colombus_defconfig            |  2 +-
 configs/Cubieboard2_FEL_defconfig     |  2 +-
 configs/Cubieboard2_defconfig         |  2 +-
 configs/Cubieboard_defconfig          |  2 +-
 configs/Cubietruck_FEL_defconfig      |  2 +-
 configs/Cubietruck_defconfig          |  2 +-
 configs/Ippo_q8h_v5_defconfig         |  2 +-
 configs/Linksprite_pcDuino3_defconfig |  2 +-
 configs/Mele_A1000G_defconfig         |  2 +-
 configs/Mele_A1000_defconfig          |  2 +-
 configs/Mele_M3_defconfig             |  2 +-
 configs/Mini-X-1Gb_defconfig          |  2 +-
 configs/Mini-X_defconfig              |  2 +-
 configs/ba10_tv_box_defconfig         |  2 +-
 configs/i12-tvbox_defconfig           |  2 +-
 configs/qt840a_defconfig              |  2 +-
 configs/r7-tv-dongle_defconfig        |  2 +-
 27 files changed, 36 insertions(+), 36 deletions(-)

diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig
index b13dccd..ea86630 100644
--- a/board/sunxi/Kconfig
+++ b/board/sunxi/Kconfig
@@ -3,30 +3,30 @@ if ARCH_SUNXI
 choice
 	prompt "Sunxi SoC Variant"
 
-config TARGET_SUN4I
+config MACH_SUN4I
 	bool "sun4i (Allwinner A10)"
 
-config TARGET_SUN5I
+config MACH_SUN5I
 	bool "sun5i (Allwinner A13)"
 
-config TARGET_SUN6I
+config MACH_SUN6I
 	bool "sun6i (Allwinner A31)"
 
-config TARGET_SUN7I
+config MACH_SUN7I
 	bool "sun7i (Allwinner A20)"
 
-config TARGET_SUN8I
+config MACH_SUN8I
 	bool "sun8i (Allwinner A23)"
 
 endchoice
 
 config SYS_CONFIG_NAME
 	string
-	default "sun4i" if TARGET_SUN4I
-	default "sun5i" if TARGET_SUN5I
-	default "sun6i" if TARGET_SUN6I
-	default "sun7i" if TARGET_SUN7I
-	default "sun8i" if TARGET_SUN8I
+	default "sun4i" if MACH_SUN4I
+	default "sun5i" if MACH_SUN5I
+	default "sun6i" if MACH_SUN6I
+	default "sun7i" if MACH_SUN7I
+	default "sun8i" if MACH_SUN8I
 
 config SYS_CPU
 	default "armv7"
diff --git a/configs/A10-OLinuXino-Lime_defconfig b/configs/A10-OLinuXino-Lime_defconfig
index 816ffb5..be989eb 100644
--- a/configs/A10-OLinuXino-Lime_defconfig
+++ b/configs/A10-OLinuXino-Lime_defconfig
@@ -3,4 +3,4 @@ CONFIG_SYS_EXTRA_OPTIONS="A10_OLINUXINO_L,AXP209_POWER,SUNXI_EMAC,AHCI,SATAPWR=S
 CONFIG_FDTFILE="sun4i-a10-olinuxino-lime.dtb"
 +S:CONFIG_ARM=y
 +S:CONFIG_ARCH_SUNXI=y
-+S:CONFIG_TARGET_SUN4I=y
++S:CONFIG_MACH_SUN4I=y
diff --git a/configs/A10s-OLinuXino-M_defconfig b/configs/A10s-OLinuXino-M_defconfig
index 38461d1..a27a788 100644
--- a/configs/A10s-OLinuXino-M_defconfig
+++ b/configs/A10s-OLinuXino-M_defconfig
@@ -6,4 +6,4 @@ CONFIG_MMC_SUNXI_SLOT_EXTRA=1
 +S:CONFIG_MMC1_CD_PIN="PG13"
 +S:CONFIG_ARM=y
 +S:CONFIG_ARCH_SUNXI=y
-+S:CONFIG_TARGET_SUN5I=y
++S:CONFIG_MACH_SUN5I=y
diff --git a/configs/A13-OLinuXinoM_defconfig b/configs/A13-OLinuXinoM_defconfig
index 7a0614d..f904b50 100644
--- a/configs/A13-OLinuXinoM_defconfig
+++ b/configs/A13-OLinuXinoM_defconfig
@@ -3,4 +3,4 @@ CONFIG_SYS_EXTRA_OPTIONS="A13_OLINUXINOM,CONS_INDEX=2,USB_EHCI,SUNXI_USB_VBUS0_G
 CONFIG_FDTFILE="sun5i-a13-olinuxino-micro.dtb"
 +S:CONFIG_ARM=y
 +S:CONFIG_ARCH_SUNXI=y
-+S:CONFIG_TARGET_SUN5I=y
++S:CONFIG_MACH_SUN5I=y
diff --git a/configs/A13-OLinuXino_defconfig b/configs/A13-OLinuXino_defconfig
index 4822449..23dc716 100644
--- a/configs/A13-OLinuXino_defconfig
+++ b/configs/A13-OLinuXino_defconfig
@@ -3,4 +3,4 @@ CONFIG_SYS_EXTRA_OPTIONS="A13_OLINUXINO,CONS_INDEX=2,AXP209_POWER,USB_EHCI,SUNXI
 CONFIG_FDTFILE="sun5i-a13-olinuxino.dtb"
 +S:CONFIG_ARM=y
 +S:CONFIG_ARCH_SUNXI=y
-+S:CONFIG_TARGET_SUN5I=y
++S:CONFIG_MACH_SUN5I=y
diff --git a/configs/A20-OLinuXino-Lime2_defconfig b/configs/A20-OLinuXino-Lime2_defconfig
index 7933704..e7c93b9 100644
--- a/configs/A20-OLinuXino-Lime2_defconfig
+++ b/configs/A20-OLinuXino-Lime2_defconfig
@@ -3,4 +3,4 @@ CONFIG_SYS_EXTRA_OPTIONS="A20_OLINUXINO_L2,AXP209_POWER,SUNXI_GMAC,RGMII,AHCI,SA
 CONFIG_FDTFILE="sun7i-a20-olinuxino-lime2.dtb"
 +S:CONFIG_ARM=y
 +S:CONFIG_ARCH_SUNXI=y
-+S:CONFIG_TARGET_SUN7I=y
++S:CONFIG_MACH_SUN7I=y
diff --git a/configs/A20-OLinuXino-Lime_defconfig b/configs/A20-OLinuXino-Lime_defconfig
index eafd733..975472b 100644
--- a/configs/A20-OLinuXino-Lime_defconfig
+++ b/configs/A20-OLinuXino-Lime_defconfig
@@ -3,4 +3,4 @@ CONFIG_SYS_EXTRA_OPTIONS="A20_OLINUXINO_L,AXP209_POWER,SUNXI_GMAC,AHCI,SATAPWR=S
 CONFIG_FDTFILE="sun7i-a20-olinuxino-lime.dtb"
 +S:CONFIG_ARM=y
 +S:CONFIG_ARCH_SUNXI=y
-+S:CONFIG_TARGET_SUN7I=y
++S:CONFIG_MACH_SUN7I=y
diff --git a/configs/A20-OLinuXino_MICRO_defconfig b/configs/A20-OLinuXino_MICRO_defconfig
index 07edef5..c2c3db6 100644
--- a/configs/A20-OLinuXino_MICRO_defconfig
+++ b/configs/A20-OLinuXino_MICRO_defconfig
@@ -6,4 +6,4 @@ CONFIG_MMC_SUNXI_SLOT_EXTRA=3
 +S:CONFIG_MMC3_CD_PIN="PH11"
 +S:CONFIG_ARM=y
 +S:CONFIG_ARCH_SUNXI=y
-+S:CONFIG_TARGET_SUN7I=y
++S:CONFIG_MACH_SUN7I=y
diff --git a/configs/Auxtek-T004_defconfig b/configs/Auxtek-T004_defconfig
index a2577b8..b2f4c51 100644
--- a/configs/Auxtek-T004_defconfig
+++ b/configs/Auxtek-T004_defconfig
@@ -3,4 +3,4 @@ CONFIG_SYS_EXTRA_OPTIONS="AUXTEK_T004,AXP152_POWER,USB_EHCI,SUNXI_USB_VBUS0_GPIO
 CONFIG_FDTFILE="sun5i-a10s-auxtek-t004.dtb"
 +S:CONFIG_ARM=y
 +S:CONFIG_ARCH_SUNXI=y
-+S:CONFIG_TARGET_SUN5I=y
++S:CONFIG_MACH_SUN5I=y
diff --git a/configs/Bananapi_defconfig b/configs/Bananapi_defconfig
index 8f8853f..ec18b9f 100644
--- a/configs/Bananapi_defconfig
+++ b/configs/Bananapi_defconfig
@@ -3,4 +3,4 @@ CONFIG_SYS_EXTRA_OPTIONS="BANANAPI,AXP209_POWER,SUNXI_GMAC,RGMII,MACPWR=SUNXI_GP
 CONFIG_FDTFILE="sun7i-a20-bananapi.dtb"
 +S:CONFIG_ARM=y
 +S:CONFIG_ARCH_SUNXI=y
-+S:CONFIG_TARGET_SUN7I=y
++S:CONFIG_MACH_SUN7I=y
diff --git a/configs/Colombus_defconfig b/configs/Colombus_defconfig
index b9ee7c8..4c0ea78 100644
--- a/configs/Colombus_defconfig
+++ b/configs/Colombus_defconfig
@@ -1,5 +1,5 @@
 CONFIG_SYS_EXTRA_OPTIONS="COLOMBUS"
 CONFIG_ARM=y
 CONFIG_ARCH_SUNXI=y
-CONFIG_TARGET_SUN6I=y
+CONFIG_MACH_SUN6I=y
 CONFIG_FDTFILE="sun6i-a31-colombus.dtb"
diff --git a/configs/Cubieboard2_FEL_defconfig b/configs/Cubieboard2_FEL_defconfig
index 7ae7a2b..1e79720 100644
--- a/configs/Cubieboard2_FEL_defconfig
+++ b/configs/Cubieboard2_FEL_defconfig
@@ -3,4 +3,4 @@ CONFIG_SYS_EXTRA_OPTIONS="CUBIEBOARD2,SPL_FEL,AXP209_POWER,SUNXI_GMAC,AHCI,SATAP
 CONFIG_FDTFILE="sun7i-a20-cubieboard2.dtb"
 +S:CONFIG_ARM=y
 +S:CONFIG_ARCH_SUNXI=y
-+S:CONFIG_TARGET_SUN7I=y
++S:CONFIG_MACH_SUN7I=y
diff --git a/configs/Cubieboard2_defconfig b/configs/Cubieboard2_defconfig
index 9c5997d..f6872c6 100644
--- a/configs/Cubieboard2_defconfig
+++ b/configs/Cubieboard2_defconfig
@@ -3,4 +3,4 @@ CONFIG_SYS_EXTRA_OPTIONS="CUBIEBOARD2,AXP209_POWER,SUNXI_GMAC,AHCI,SATAPWR=SUNXI
 CONFIG_FDTFILE="sun7i-a20-cubieboard2.dtb"
 +S:CONFIG_ARM=y
 +S:CONFIG_ARCH_SUNXI=y
-+S:CONFIG_TARGET_SUN7I=y
++S:CONFIG_MACH_SUN7I=y
diff --git a/configs/Cubieboard_defconfig b/configs/Cubieboard_defconfig
index eafa09d..9152b25 100644
--- a/configs/Cubieboard_defconfig
+++ b/configs/Cubieboard_defconfig
@@ -3,4 +3,4 @@ CONFIG_SYS_EXTRA_OPTIONS="CUBIEBOARD,AXP209_POWER,SUNXI_EMAC,AHCI,SATAPWR=SUNXI_
 CONFIG_FDTFILE="sun4i-a10-cubieboard.dtb"
 +S:CONFIG_ARM=y
 +S:CONFIG_ARCH_SUNXI=y
-+S:CONFIG_TARGET_SUN4I=y
++S:CONFIG_MACH_SUN4I=y
diff --git a/configs/Cubietruck_FEL_defconfig b/configs/Cubietruck_FEL_defconfig
index 6218c58..963ed5a 100644
--- a/configs/Cubietruck_FEL_defconfig
+++ b/configs/Cubietruck_FEL_defconfig
@@ -3,4 +3,4 @@ CONFIG_SYS_EXTRA_OPTIONS="CUBIETRUCK,SPL_FEL,AXP209_POWER,SUNXI_GMAC,RGMII,AHCI,
 CONFIG_FDTFILE="sun7i-a20-cubietruck.dtb"
 +S:CONFIG_ARM=y
 +S:CONFIG_ARCH_SUNXI=y
-+S:CONFIG_TARGET_SUN7I=y
++S:CONFIG_MACH_SUN7I=y
diff --git a/configs/Cubietruck_defconfig b/configs/Cubietruck_defconfig
index 9a56f18..7592658 100644
--- a/configs/Cubietruck_defconfig
+++ b/configs/Cubietruck_defconfig
@@ -3,4 +3,4 @@ CONFIG_SYS_EXTRA_OPTIONS="CUBIETRUCK,AXP209_POWER,SUNXI_GMAC,RGMII,AHCI,SATAPWR=
 CONFIG_FDTFILE="sun7i-a20-cubietruck.dtb"
 +S:CONFIG_ARM=y
 +S:CONFIG_ARCH_SUNXI=y
-+S:CONFIG_TARGET_SUN7I=y
++S:CONFIG_MACH_SUN7I=y
diff --git a/configs/Ippo_q8h_v5_defconfig b/configs/Ippo_q8h_v5_defconfig
index d9ea010..12ff701 100644
--- a/configs/Ippo_q8h_v5_defconfig
+++ b/configs/Ippo_q8h_v5_defconfig
@@ -1,5 +1,5 @@
 CONFIG_SYS_EXTRA_OPTIONS="IPPO_Q8H_V5,CONS_INDEX=5"
 CONFIG_ARM=y
 CONFIG_ARCH_SUNXI=y
-CONFIG_TARGET_SUN8I=y
+CONFIG_MACH_SUN8I=y
 CONFIG_DEFAULT_DEVICE_TREE="sun8i-a23-ippo-q8h-v5.dtb"
diff --git a/configs/Linksprite_pcDuino3_defconfig b/configs/Linksprite_pcDuino3_defconfig
index 046ab6f..935c055 100644
--- a/configs/Linksprite_pcDuino3_defconfig
+++ b/configs/Linksprite_pcDuino3_defconfig
@@ -3,4 +3,4 @@ CONFIG_SYS_EXTRA_OPTIONS="PCDUINO3,AXP209_POWER,SUNXI_GMAC,AHCI,SATAPWR=SUNXI_GP
 CONFIG_FDTFILE="sun7i-a20-pcduino3.dtb"
 +S:CONFIG_ARM=y
 +S:CONFIG_ARCH_SUNXI=y
-+S:CONFIG_TARGET_SUN7I=y
++S:CONFIG_MACH_SUN7I=y
diff --git a/configs/Mele_A1000G_defconfig b/configs/Mele_A1000G_defconfig
index c0608a5..17b5612 100644
--- a/configs/Mele_A1000G_defconfig
+++ b/configs/Mele_A1000G_defconfig
@@ -3,4 +3,4 @@ CONFIG_SYS_EXTRA_OPTIONS="MELE_A1000G,AXP209_POWER,SUNXI_EMAC,MACPWR=SUNXI_GPH(1
 CONFIG_FDTFILE="sun4i-a10-a1000.dtb"
 +S:CONFIG_ARM=y
 +S:CONFIG_ARCH_SUNXI=y
-+S:CONFIG_TARGET_SUN4I=y
++S:CONFIG_MACH_SUN4I=y
diff --git a/configs/Mele_A1000_defconfig b/configs/Mele_A1000_defconfig
index 7623975..c34f9e2 100644
--- a/configs/Mele_A1000_defconfig
+++ b/configs/Mele_A1000_defconfig
@@ -3,4 +3,4 @@ CONFIG_SYS_EXTRA_OPTIONS="MELE_A1000,AXP209_POWER,SUNXI_EMAC,MACPWR=SUNXI_GPH(15
 CONFIG_FDTFILE="sun4i-a10-a1000.dtb"
 +S:CONFIG_ARM=y
 +S:CONFIG_ARCH_SUNXI=y
-+S:CONFIG_TARGET_SUN4I=y
++S:CONFIG_MACH_SUN4I=y
diff --git a/configs/Mele_M3_defconfig b/configs/Mele_M3_defconfig
index 2493446..963ae9f 100644
--- a/configs/Mele_M3_defconfig
+++ b/configs/Mele_M3_defconfig
@@ -5,4 +5,4 @@ CONFIG_FDTFILE="sun7i-a20-m3.dtb"
 +S:CONFIG_MMC0_CD_PIN="PH1"
 +S:CONFIG_ARM=y
 +S:CONFIG_ARCH_SUNXI=y
-+S:CONFIG_TARGET_SUN7I=y
++S:CONFIG_MACH_SUN7I=y
diff --git a/configs/Mini-X-1Gb_defconfig b/configs/Mini-X-1Gb_defconfig
index cd9ac59..343b53c 100644
--- a/configs/Mini-X-1Gb_defconfig
+++ b/configs/Mini-X-1Gb_defconfig
@@ -3,4 +3,4 @@ CONFIG_SYS_EXTRA_OPTIONS="MINI_X_1GB,AXP209_POWER,USB_EHCI"
 CONFIG_FDTFILE="sun4i-a10-mini-xplus.dtb"
 +S:CONFIG_ARM=y
 +S:CONFIG_ARCH_SUNXI=y
-+S:CONFIG_TARGET_SUN4I=y
++S:CONFIG_MACH_SUN4I=y
diff --git a/configs/Mini-X_defconfig b/configs/Mini-X_defconfig
index adccb8b..0a18856 100644
--- a/configs/Mini-X_defconfig
+++ b/configs/Mini-X_defconfig
@@ -3,4 +3,4 @@ CONFIG_SYS_EXTRA_OPTIONS="MINI_X,AXP209_POWER,USB_EHCI"
 CONFIG_FDTFILE="sun4i-a10-mini-xplus.dtb"
 +S:CONFIG_ARM=y
 +S:CONFIG_ARCH_SUNXI=y
-+S:CONFIG_TARGET_SUN4I=y
++S:CONFIG_MACH_SUN4I=y
diff --git a/configs/ba10_tv_box_defconfig b/configs/ba10_tv_box_defconfig
index 743a617..0a22ddd 100644
--- a/configs/ba10_tv_box_defconfig
+++ b/configs/ba10_tv_box_defconfig
@@ -3,4 +3,4 @@ CONFIG_SYS_EXTRA_OPTIONS="BA10_TV_BOX,AXP209_POWER,SUNXI_EMAC,USB_EHCI,SUNXI_USB
 CONFIG_FDTFILE="sun4i-a10-ba10-tvbox.dtb"
 +S:CONFIG_ARM=y
 +S:CONFIG_ARCH_SUNXI=y
-+S:CONFIG_TARGET_SUN4I=y
++S:CONFIG_MACH_SUN4I=y
diff --git a/configs/i12-tvbox_defconfig b/configs/i12-tvbox_defconfig
index e8a9eaf..068c4b5 100644
--- a/configs/i12-tvbox_defconfig
+++ b/configs/i12-tvbox_defconfig
@@ -3,4 +3,4 @@ CONFIG_SYS_EXTRA_OPTIONS="I12_TVBOX,AXP209_POWER,SUNXI_GMAC,MACPWR=SUNXI_GPH(21)
 CONFIG_FDTFILE="sun7i-a20-i12-tvbox.dtb"
 +S:CONFIG_ARM=y
 +S:CONFIG_ARCH_SUNXI=y
-+S:CONFIG_TARGET_SUN7I=y
++S:CONFIG_MACH_SUN7I=y
diff --git a/configs/qt840a_defconfig b/configs/qt840a_defconfig
index df96eec..6ec33a8 100644
--- a/configs/qt840a_defconfig
+++ b/configs/qt840a_defconfig
@@ -3,4 +3,4 @@ CONFIG_SYS_EXTRA_OPTIONS="QT840A,AXP209_POWER,SUNXI_GMAC,MACPWR=SUNXI_GPH(21),US
 CONFIG_FDTFILE="sun7i-a20-i12-tvbox.dtb"
 +S:CONFIG_ARM=y
 +S:CONFIG_ARCH_SUNXI=y
-+S:CONFIG_TARGET_SUN7I=y
++S:CONFIG_MACH_SUN7I=y
diff --git a/configs/r7-tv-dongle_defconfig b/configs/r7-tv-dongle_defconfig
index 6b8dd97..2780e14 100644
--- a/configs/r7-tv-dongle_defconfig
+++ b/configs/r7-tv-dongle_defconfig
@@ -3,4 +3,4 @@ CONFIG_SYS_EXTRA_OPTIONS="R7DONGLE,AXP152_POWER,USB_EHCI,SUNXI_USB_VBUS0_GPIO=SU
 CONFIG_FDTFILE="sun5i-a10s-r7-tv-dongle.dtb"
 +S:CONFIG_ARM=y
 +S:CONFIG_ARCH_SUNXI=y
-+S:CONFIG_TARGET_SUN5I=y
++S:CONFIG_MACH_SUN5I=y
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH v2 3/7] sunxi: Kconfig: Make SPL_FEL a toplevel Kconfig option
  2014-10-24 20:20 [U-Boot] [PATCH v2 0/7] sunxi: Kconfig consolidation and cleanup Ian Campbell
  2014-10-24 20:20 ` [U-Boot] [PATCH v2 1/7] sunxi: kconfig: Add top-level ARCH_SUNXI Ian Campbell
  2014-10-24 20:20 ` [U-Boot] [PATCH v2 2/7] sunxi: kconfig: Rename TARGET_SUN[45678]I to MACH_SUN[45678]I Ian Campbell
@ 2014-10-24 20:20 ` Ian Campbell
  2014-10-24 20:20 ` [U-Boot] [PATCH v2 4/7] sunxi: Use CONFIG_MACH_SUN?I from Kconfig instead of CONFIG_SUN?I Ian Campbell
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Ian Campbell @ 2014-10-24 20:20 UTC (permalink / raw)
  To: u-boot

It's unfortunate that this needs to be present in both .config and spl/.config
since it makes it slightly hard to enable FEL mode for a regular defconfig. It
can be done with:
    echo CONFIG_SPL_FEL=y >> .config
    echo CONFIG_SPL_FEL=y >> spl/.config

Ideally only one of those would be needed.

Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
---
v2: Symbol should depend on SPL
---
 board/sunxi/Kconfig               | 5 +++++
 configs/Cubieboard2_FEL_defconfig | 3 ++-
 configs/Cubietruck_FEL_defconfig  | 3 ++-
 3 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig
index ea86630..496bad1 100644
--- a/board/sunxi/Kconfig
+++ b/board/sunxi/Kconfig
@@ -37,6 +37,11 @@ config SYS_BOARD
 config SYS_SOC
 	default "sunxi"
 
+config SPL_FEL
+	bool "SPL/FEL mode support"
+	depends on SPL
+	default n
+
 config FDTFILE
 	string "Default fdtfile env setting for this board"
 
diff --git a/configs/Cubieboard2_FEL_defconfig b/configs/Cubieboard2_FEL_defconfig
index 1e79720..1b73fb5 100644
--- a/configs/Cubieboard2_FEL_defconfig
+++ b/configs/Cubieboard2_FEL_defconfig
@@ -1,5 +1,6 @@
 CONFIG_SPL=y
-CONFIG_SYS_EXTRA_OPTIONS="CUBIEBOARD2,SPL_FEL,AXP209_POWER,SUNXI_GMAC,AHCI,SATAPWR=SUNXI_GPB(8),USB_EHCI"
++S:CONFIG_SPL_FEL=y
+CONFIG_SYS_EXTRA_OPTIONS="CUBIEBOARD2,AXP209_POWER,SUNXI_GMAC,AHCI,SATAPWR=SUNXI_GPB(8),USB_EHCI"
 CONFIG_FDTFILE="sun7i-a20-cubieboard2.dtb"
 +S:CONFIG_ARM=y
 +S:CONFIG_ARCH_SUNXI=y
diff --git a/configs/Cubietruck_FEL_defconfig b/configs/Cubietruck_FEL_defconfig
index 963ed5a..7e78aec 100644
--- a/configs/Cubietruck_FEL_defconfig
+++ b/configs/Cubietruck_FEL_defconfig
@@ -1,5 +1,6 @@
 CONFIG_SPL=y
-CONFIG_SYS_EXTRA_OPTIONS="CUBIETRUCK,SPL_FEL,AXP209_POWER,SUNXI_GMAC,RGMII,AHCI,SATAPWR=SUNXI_GPH(12),USB_EHCI"
++S:CONFIG_SPL_FEL=y
+CONFIG_SYS_EXTRA_OPTIONS="CUBIETRUCK,AXP209_POWER,SUNXI_GMAC,RGMII,AHCI,SATAPWR=SUNXI_GPH(12),USB_EHCI"
 CONFIG_FDTFILE="sun7i-a20-cubietruck.dtb"
 +S:CONFIG_ARM=y
 +S:CONFIG_ARCH_SUNXI=y
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH v2 4/7] sunxi: Use CONFIG_MACH_SUN?I from Kconfig instead of CONFIG_SUN?I
  2014-10-24 20:20 [U-Boot] [PATCH v2 0/7] sunxi: Kconfig consolidation and cleanup Ian Campbell
                   ` (2 preceding siblings ...)
  2014-10-24 20:20 ` [U-Boot] [PATCH v2 3/7] sunxi: Kconfig: Make SPL_FEL a toplevel Kconfig option Ian Campbell
@ 2014-10-24 20:20 ` Ian Campbell
  2014-10-24 20:20 ` [U-Boot] [PATCH v2 5/7] sunxi: Drop FEL variants of defconfigs Ian Campbell
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Ian Campbell @ 2014-10-24 20:20 UTC (permalink / raw)
  To: u-boot

Mostly automatic with:
    sed -i -e 's/CONFIG_\(SUN[45678]I\)/CONFIG_MACH_\1/g' $(git grep -l CONFIG_SUN[45678]I)
followed by removing the relevant #defines from include/configs/sun?i.h by
hand.

Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
---
v2: Rebase, handle sun6i and sun8i.
    Rename to MACH_SUN?I
---
 arch/arm/cpu/armv7/sunxi/Makefile          | 20 +++++++++---------
 arch/arm/cpu/armv7/sunxi/board.c           | 20 +++++++++---------
 arch/arm/cpu/armv7/sunxi/clock_sun4i.c     |  2 +-
 arch/arm/cpu/armv7/sunxi/cpu_info.c        | 10 ++++-----
 arch/arm/cpu/armv7/sunxi/dram.c            | 34 +++++++++++++++---------------
 arch/arm/include/asm/arch-sunxi/clock.h    |  2 +-
 arch/arm/include/asm/arch-sunxi/gpio.h     |  2 +-
 arch/arm/include/asm/arch-sunxi/mmc.h      |  2 +-
 arch/arm/include/asm/arch-sunxi/timer.h    |  4 ++--
 arch/arm/include/asm/arch-sunxi/watchdog.h |  2 +-
 drivers/mmc/sunxi_mmc.c                    |  4 ++--
 drivers/usb/host/ehci-sunxi.c              |  2 +-
 include/configs/sun4i.h                    |  1 -
 include/configs/sun5i.h                    |  1 -
 include/configs/sun6i.h                    |  1 -
 include/configs/sun7i.h                    |  1 -
 include/configs/sun8i.h                    |  1 -
 17 files changed, 52 insertions(+), 57 deletions(-)

diff --git a/arch/arm/cpu/armv7/sunxi/Makefile b/arch/arm/cpu/armv7/sunxi/Makefile
index 24f1dae..82dbf76 100644
--- a/arch/arm/cpu/armv7/sunxi/Makefile
+++ b/arch/arm/cpu/armv7/sunxi/Makefile
@@ -11,13 +11,13 @@ obj-y	+= timer.o
 obj-y	+= board.o
 obj-y	+= clock.o
 obj-y	+= pinmux.o
-obj-$(CONFIG_SUN6I)	+= prcm.o
-obj-$(CONFIG_SUN8I)	+= prcm.o
-obj-$(CONFIG_SUN4I)	+= clock_sun4i.o
-obj-$(CONFIG_SUN5I)	+= clock_sun4i.o
-obj-$(CONFIG_SUN6I)	+= clock_sun6i.o
-obj-$(CONFIG_SUN7I)	+= clock_sun4i.o
-obj-$(CONFIG_SUN8I)	+= clock_sun6i.o
+obj-$(CONFIG_MACH_SUN6I)	+= prcm.o
+obj-$(CONFIG_MACH_SUN8I)	+= prcm.o
+obj-$(CONFIG_MACH_SUN4I)	+= clock_sun4i.o
+obj-$(CONFIG_MACH_SUN5I)	+= clock_sun4i.o
+obj-$(CONFIG_MACH_SUN6I)	+= clock_sun6i.o
+obj-$(CONFIG_MACH_SUN7I)	+= clock_sun4i.o
+obj-$(CONFIG_MACH_SUN8I)	+= clock_sun6i.o
 
 ifndef CONFIG_SPL_BUILD
 obj-y	+= cpu_info.o
@@ -27,9 +27,9 @@ endif
 endif
 
 ifdef CONFIG_SPL_BUILD
-obj-$(CONFIG_SUN4I)	+= dram.o
-obj-$(CONFIG_SUN5I)	+= dram.o
-obj-$(CONFIG_SUN7I)	+= dram.o
+obj-$(CONFIG_MACH_SUN4I)	+= dram.o
+obj-$(CONFIG_MACH_SUN5I)	+= dram.o
+obj-$(CONFIG_MACH_SUN7I)	+= dram.o
 ifdef CONFIG_SPL_FEL
 obj-y	+= start.o
 endif
diff --git a/arch/arm/cpu/armv7/sunxi/board.c b/arch/arm/cpu/armv7/sunxi/board.c
index 06eb676..6c812fc 100644
--- a/arch/arm/cpu/armv7/sunxi/board.c
+++ b/arch/arm/cpu/armv7/sunxi/board.c
@@ -51,7 +51,7 @@ u32 spl_boot_mode(void)
 int gpio_init(void)
 {
 #if CONFIG_CONS_INDEX == 1 && defined(CONFIG_UART0_PORT_F)
-#if defined(CONFIG_SUN4I) || defined(CONFIG_SUN7I)
+#if defined(CONFIG_MACH_SUN4I) || defined(CONFIG_MACH_SUN7I)
 	/* disable GPB22,23 as uart0 tx,rx to avoid conflict */
 	sunxi_gpio_set_cfgpin(SUNXI_GPB(22), SUNXI_GPIO_INPUT);
 	sunxi_gpio_set_cfgpin(SUNXI_GPB(23), SUNXI_GPIO_INPUT);
@@ -59,23 +59,23 @@ int gpio_init(void)
 	sunxi_gpio_set_cfgpin(SUNXI_GPF(2), SUNXI_GPF2_UART0_TX);
 	sunxi_gpio_set_cfgpin(SUNXI_GPF(4), SUNXI_GPF4_UART0_RX);
 	sunxi_gpio_set_pull(SUNXI_GPF(4), 1);
-#elif CONFIG_CONS_INDEX == 1 && (defined(CONFIG_SUN4I) || defined(CONFIG_SUN7I))
+#elif CONFIG_CONS_INDEX == 1 && (defined(CONFIG_MACH_SUN4I) || defined(CONFIG_MACH_SUN7I))
 	sunxi_gpio_set_cfgpin(SUNXI_GPB(22), SUN4I_GPB22_UART0_TX);
 	sunxi_gpio_set_cfgpin(SUNXI_GPB(23), SUN4I_GPB23_UART0_RX);
 	sunxi_gpio_set_pull(SUNXI_GPB(23), SUNXI_GPIO_PULL_UP);
-#elif CONFIG_CONS_INDEX == 1 && defined(CONFIG_SUN5I)
+#elif CONFIG_CONS_INDEX == 1 && defined(CONFIG_MACH_SUN5I)
 	sunxi_gpio_set_cfgpin(SUNXI_GPB(19), SUN5I_GPB19_UART0_TX);
 	sunxi_gpio_set_cfgpin(SUNXI_GPB(20), SUN5I_GPB20_UART0_RX);
 	sunxi_gpio_set_pull(SUNXI_GPB(20), SUNXI_GPIO_PULL_UP);
-#elif CONFIG_CONS_INDEX == 1 && defined(CONFIG_SUN6I)
+#elif CONFIG_CONS_INDEX == 1 && defined(CONFIG_MACH_SUN6I)
 	sunxi_gpio_set_cfgpin(SUNXI_GPH(20), SUN6I_GPH20_UART0_TX);
 	sunxi_gpio_set_cfgpin(SUNXI_GPH(21), SUN6I_GPH21_UART0_RX);
 	sunxi_gpio_set_pull(SUNXI_GPH(21), SUNXI_GPIO_PULL_UP);
-#elif CONFIG_CONS_INDEX == 2 && defined(CONFIG_SUN5I)
+#elif CONFIG_CONS_INDEX == 2 && defined(CONFIG_MACH_SUN5I)
 	sunxi_gpio_set_cfgpin(SUNXI_GPG(3), SUN5I_GPG3_UART1_TX);
 	sunxi_gpio_set_cfgpin(SUNXI_GPG(4), SUN5I_GPG4_UART1_RX);
 	sunxi_gpio_set_pull(SUNXI_GPG(4), SUNXI_GPIO_PULL_UP);
-#elif CONFIG_CONS_INDEX == 5 && defined(CONFIG_SUN8I)
+#elif CONFIG_CONS_INDEX == 5 && defined(CONFIG_MACH_SUN8I)
 	sunxi_gpio_set_cfgpin(SUNXI_GPL(2), SUN8I_GPL2_R_UART_TX);
 	sunxi_gpio_set_cfgpin(SUNXI_GPL(3), SUN8I_GPL3_R_UART_RX);
 	sunxi_gpio_set_pull(SUNXI_GPL(3), SUNXI_GPIO_PULL_UP);
@@ -88,7 +88,7 @@ int gpio_init(void)
 
 void reset_cpu(ulong addr)
 {
-#if defined(CONFIG_SUN4I) || defined(CONFIG_SUN5I) || defined(CONFIG_SUN7I)
+#if defined(CONFIG_MACH_SUN4I) || defined(CONFIG_MACH_SUN5I) || defined(CONFIG_MACH_SUN7I)
 	static const struct sunxi_wdog *wdog =
 		 &((struct sunxi_timer_reg *)SUNXI_TIMER_BASE)->wdog;
 
@@ -100,7 +100,7 @@ void reset_cpu(ulong addr)
 		/* sun5i sometimes gets stuck without this */
 		writel(WDT_MODE_RESET_EN | WDT_MODE_EN, &wdog->mode);
 	}
-#else /* CONFIG_SUN6I || CONFIG_SUN8I || .. */
+#else /* CONFIG_MACH_SUN6I || CONFIG_MACH_SUN8I || .. */
 	static const struct sunxi_wdog *wdog =
 		 ((struct sunxi_timer_reg *)SUNXI_TIMER_BASE)->wdog;
 
@@ -114,8 +114,8 @@ void reset_cpu(ulong addr)
 /* do some early init */
 void s_init(void)
 {
-#if !defined CONFIG_SPL_BUILD && (defined CONFIG_SUN7I || \
-		defined CONFIG_SUN6I || defined CONFIG_SUN8I)
+#if !defined CONFIG_SPL_BUILD && (defined CONFIG_MACH_SUN7I || \
+		defined CONFIG_MACH_SUN6I || defined CONFIG_MACH_SUN8I)
 	/* Enable SMP mode for CPU0, by setting bit 6 of Auxiliary Ctl reg */
 	asm volatile(
 		"mrc p15, 0, r0, c1, c0, 1\n"
diff --git a/arch/arm/cpu/armv7/sunxi/clock_sun4i.c b/arch/arm/cpu/armv7/sunxi/clock_sun4i.c
index 4a0d64f..a0e49d1 100644
--- a/arch/arm/cpu/armv7/sunxi/clock_sun4i.c
+++ b/arch/arm/cpu/armv7/sunxi/clock_sun4i.c
@@ -35,7 +35,7 @@ void clock_init_safe(void)
 	       APB0_DIV_1 << APB0_DIV_SHIFT |
 	       CPU_CLK_SRC_PLL1 << CPU_CLK_SRC_SHIFT,
 	       &ccm->cpu_ahb_apb0_cfg);
-#ifdef CONFIG_SUN7I
+#ifdef CONFIG_MACH_SUN7I
 	setbits_le32(&ccm->ahb_gate0, 0x1 << AHB_GATE_OFFSET_DMA);
 #endif
 	writel(PLL6_CFG_DEFAULT, &ccm->pll6_cfg);
diff --git a/arch/arm/cpu/armv7/sunxi/cpu_info.c b/arch/arm/cpu/armv7/sunxi/cpu_info.c
index 4f2a09c..41b9add 100644
--- a/arch/arm/cpu/armv7/sunxi/cpu_info.c
+++ b/arch/arm/cpu/armv7/sunxi/cpu_info.c
@@ -13,9 +13,9 @@
 #ifdef CONFIG_DISPLAY_CPUINFO
 int print_cpuinfo(void)
 {
-#ifdef CONFIG_SUN4I
+#ifdef CONFIG_MACH_SUN4I
 	puts("CPU:   Allwinner A10 (SUN4I)\n");
-#elif defined CONFIG_SUN5I
+#elif defined CONFIG_MACH_SUN5I
 	u32 val = readl(SUNXI_SID_BASE + 0x08);
 	switch ((val >> 12) & 0xf) {
 	case 0: puts("CPU:   Allwinner A12 (SUN5I)\n"); break;
@@ -23,11 +23,11 @@ int print_cpuinfo(void)
 	case 7: puts("CPU:   Allwinner A10s (SUN5I)\n"); break;
 	default: puts("CPU:   Allwinner A1X (SUN5I)\n");
 	}
-#elif defined CONFIG_SUN6I
+#elif defined CONFIG_MACH_SUN6I
 	puts("CPU:   Allwinner A31 (SUN6I)\n");
-#elif defined CONFIG_SUN7I
+#elif defined CONFIG_MACH_SUN7I
 	puts("CPU:   Allwinner A20 (SUN7I)\n");
-#elif defined CONFIG_SUN8I
+#elif defined CONFIG_MACH_SUN8I
 	puts("CPU:   Allwinner A23 (SUN8I)\n");
 #else
 #warning Please update cpu_info.c with correct CPU information
diff --git a/arch/arm/cpu/armv7/sunxi/dram.c b/arch/arm/cpu/armv7/sunxi/dram.c
index 3cf3cbf..dc9fdb9 100644
--- a/arch/arm/cpu/armv7/sunxi/dram.c
+++ b/arch/arm/cpu/armv7/sunxi/dram.c
@@ -74,7 +74,7 @@ static void mctl_ddr3_reset(void)
 	struct sunxi_dram_reg *dram =
 			(struct sunxi_dram_reg *)SUNXI_DRAMC_BASE;
 
-#ifdef CONFIG_SUN4I
+#ifdef CONFIG_MACH_SUN4I
 	struct sunxi_timer_reg *timer =
 			(struct sunxi_timer_reg *)SUNXI_TIMER_BASE;
 	u32 reg_val;
@@ -113,7 +113,7 @@ static void mctl_set_drive(void)
 {
 	struct sunxi_dram_reg *dram = (struct sunxi_dram_reg *)SUNXI_DRAMC_BASE;
 
-#ifdef CONFIG_SUN7I
+#ifdef CONFIG_MACH_SUN7I
 	clrsetbits_le32(&dram->mcr, DRAM_MCR_MODE_NORM(0x3) | (0x3 << 28),
 #else
 	clrsetbits_le32(&dram->mcr, DRAM_MCR_MODE_NORM(0x3),
@@ -202,7 +202,7 @@ static void mctl_enable_dllx(u32 phase)
 }
 
 static u32 hpcr_value[32] = {
-#ifdef CONFIG_SUN5I
+#ifdef CONFIG_MACH_SUN5I
 	0, 0, 0, 0,
 	0, 0, 0, 0,
 	0, 0, 0, 0,
@@ -212,7 +212,7 @@ static u32 hpcr_value[32] = {
 	0x0301, 0x0301, 0x0301, 0x0301,
 	0x0301, 0x0301, 0x0301, 0
 #endif
-#ifdef CONFIG_SUN4I
+#ifdef CONFIG_MACH_SUN4I
 	0x0301, 0x0301, 0x0301, 0x0301,
 	0x0301, 0x0301, 0, 0,
 	0, 0, 0, 0,
@@ -222,7 +222,7 @@ static u32 hpcr_value[32] = {
 	0x1035, 0x1031, 0x0731, 0x1035,
 	0x1031, 0x0301, 0x0301, 0x0731
 #endif
-#ifdef CONFIG_SUN7I
+#ifdef CONFIG_MACH_SUN7I
 	0x0301, 0x0301, 0x0301, 0x0301,
 	0x0301, 0x0301, 0x0301, 0x0301,
 	0, 0, 0, 0,
@@ -304,7 +304,7 @@ static void mctl_setup_dram_clock(u32 clk, u32 mbus_clk)
 
 	setbits_le32(&ccm->pll5_cfg, CCM_PLL5_CTRL_DDR_CLK);
 
-#if defined(CONFIG_SUN4I) || defined(CONFIG_SUN7I)
+#if defined(CONFIG_MACH_SUN4I) || defined(CONFIG_MACH_SUN7I)
 	/* reset GPS */
 	clrbits_le32(&ccm->gps_clk_cfg, CCM_GPS_CTRL_RESET | CCM_GPS_CTRL_GATE);
 	setbits_le32(&ccm->ahb_gate0, CCM_AHB_GATE_GPS);
@@ -318,7 +318,7 @@ static void mctl_setup_dram_clock(u32 clk, u32 mbus_clk)
 
 	/* PLL5P and PLL6 are the potential clock sources for MBUS */
 	pll6x_clk = clock_get_pll6() / 1000000;
-#ifdef CONFIG_SUN7I
+#ifdef CONFIG_MACH_SUN7I
 	pll6x_clk *= 2; /* sun7i uses PLL6*2, sun5i uses just PLL6 */
 #endif
 	pll5p_clk = clock_get_pll5p() / 1000000;
@@ -348,7 +348,7 @@ static void mctl_setup_dram_clock(u32 clk, u32 mbus_clk)
 	 * open DRAMC AHB & DLL register clock
 	 * close it first
 	 */
-#if defined(CONFIG_SUN5I) || defined(CONFIG_SUN7I)
+#if defined(CONFIG_MACH_SUN5I) || defined(CONFIG_MACH_SUN7I)
 	clrbits_le32(&ccm->ahb_gate0, CCM_AHB_GATE_SDRAM | CCM_AHB_GATE_DLL);
 #else
 	clrbits_le32(&ccm->ahb_gate0, CCM_AHB_GATE_SDRAM);
@@ -356,7 +356,7 @@ static void mctl_setup_dram_clock(u32 clk, u32 mbus_clk)
 	udelay(22);
 
 	/* then open it */
-#if defined(CONFIG_SUN5I) || defined(CONFIG_SUN7I)
+#if defined(CONFIG_MACH_SUN5I) || defined(CONFIG_MACH_SUN7I)
 	setbits_le32(&ccm->ahb_gate0, CCM_AHB_GATE_SDRAM | CCM_AHB_GATE_DLL);
 #else
 	setbits_le32(&ccm->ahb_gate0, CCM_AHB_GATE_SDRAM);
@@ -417,7 +417,7 @@ static int dramc_scan_readpipe(void)
 
 static void dramc_clock_output_en(u32 on)
 {
-#if defined(CONFIG_SUN5I) || defined(CONFIG_SUN7I)
+#if defined(CONFIG_MACH_SUN5I) || defined(CONFIG_MACH_SUN7I)
 	struct sunxi_dram_reg *dram = (struct sunxi_dram_reg *)SUNXI_DRAMC_BASE;
 
 	if (on)
@@ -425,7 +425,7 @@ static void dramc_clock_output_en(u32 on)
 	else
 		clrbits_le32(&dram->mcr, DRAM_MCR_DCLK_OUT);
 #endif
-#ifdef CONFIG_SUN4I
+#ifdef CONFIG_MACH_SUN4I
 	struct sunxi_ccm_reg *ccm = (struct sunxi_ccm_reg *)SUNXI_CCM_BASE;
 	if (on)
 		setbits_le32(&ccm->dram_clk_cfg, CCM_DRAM_CTRL_DCLK_OUT);
@@ -527,7 +527,7 @@ static void mctl_set_impedance(u32 zq, u32 odt_en)
 	u32 reg_val;
 	u32 zprog = zq & 0xFF, zdata = (zq >> 8) & 0xFFFFF;
 
-#ifndef CONFIG_SUN7I
+#ifndef CONFIG_MACH_SUN7I
 	/* Appears that some kind of automatically initiated default
 	 * ZQ calibration is already in progress at this point on sun4i/sun5i
 	 * hardware, but not on sun7i. So it is reasonable to wait for its
@@ -539,7 +539,7 @@ static void mctl_set_impedance(u32 zq, u32 odt_en)
 	if (!odt_en)
 		return;
 
-#ifdef CONFIG_SUN7I
+#ifdef CONFIG_MACH_SUN7I
 	/* Enabling ODT in SDR_IOCR on sun7i hardware results in a deadlock
 	 * unless bit 24 is set in SDR_ZQCR1. Not much is known about the
 	 * SDR_ZQCR1 register, but there are hints indicating that it might
@@ -597,7 +597,7 @@ static unsigned long dramc_init_helper(struct dram_para *para)
 	/* dram clock off */
 	dramc_clock_output_en(0);
 
-#ifdef CONFIG_SUN4I
+#ifdef CONFIG_MACH_SUN4I
 	/* select dram controller 1 */
 	writel(DRAM_CSEL_MAGIC, &dram->csel);
 #endif
@@ -654,7 +654,7 @@ static unsigned long dramc_init_helper(struct dram_para *para)
 	writel(para->tpr2, &dram->tpr2);
 
 	reg_val = DRAM_MR_BURST_LENGTH(0x0);
-#if (defined(CONFIG_SUN5I) || defined(CONFIG_SUN7I))
+#if (defined(CONFIG_MACH_SUN5I) || defined(CONFIG_MACH_SUN7I))
 	reg_val |= DRAM_MR_POWER_DOWN;
 #endif
 	reg_val |= DRAM_MR_CAS_LAT(para->cas - 4);
@@ -668,7 +668,7 @@ static unsigned long dramc_init_helper(struct dram_para *para)
 	/* disable drift compensation and set passive DQS window mode */
 	clrsetbits_le32(&dram->ccr, DRAM_CCR_DQS_DRIFT_COMP, DRAM_CCR_DQS_GATE);
 
-#ifdef CONFIG_SUN7I
+#ifdef CONFIG_MACH_SUN7I
 	/* Command rate timing mode 2T & 1T */
 	if (para->tpr4 & 0x1)
 		setbits_le32(&dram->ccr, DRAM_CCR_COMMAND_RATE_1T);
@@ -718,7 +718,7 @@ unsigned long dramc_init(struct dram_para *para)
 	/* try to autodetect the DRAM bus width and density */
 	para->io_width  = 16;
 	para->bus_width = 32;
-#if defined(CONFIG_SUN4I) || defined(CONFIG_SUN5I)
+#if defined(CONFIG_MACH_SUN4I) || defined(CONFIG_MACH_SUN5I)
 	/* only A0-A14 address lines on A10/A13, limiting max density to 4096 */
 	para->density = 4096;
 #else
diff --git a/arch/arm/include/asm/arch-sunxi/clock.h b/arch/arm/include/asm/arch-sunxi/clock.h
index c562f62..42382a8 100644
--- a/arch/arm/include/asm/arch-sunxi/clock.h
+++ b/arch/arm/include/asm/arch-sunxi/clock.h
@@ -15,7 +15,7 @@
 #define CLK_GATE_CLOSE			0x0
 
 /* clock control module regs definition */
-#if defined(CONFIG_SUN6I) || defined(CONFIG_SUN8I)
+#if defined(CONFIG_MACH_SUN6I) || defined(CONFIG_MACH_SUN8I)
 #include <asm/arch/clock_sun6i.h>
 #else
 #include <asm/arch/clock_sun4i.h>
diff --git a/arch/arm/include/asm/arch-sunxi/gpio.h b/arch/arm/include/asm/arch-sunxi/gpio.h
index 7bb6499..1527a6b 100644
--- a/arch/arm/include/asm/arch-sunxi/gpio.h
+++ b/arch/arm/include/asm/arch-sunxi/gpio.h
@@ -155,7 +155,7 @@ enum sunxi_gpio_number {
 
 #define SUNXI_GPF2_SDC0		2
 
-#ifdef CONFIG_SUN8I
+#ifdef CONFIG_MACH_SUN8I
 #define SUNXI_GPF2_UART0_TX	3
 #define SUNXI_GPF4_UART0_RX	3
 #else
diff --git a/arch/arm/include/asm/arch-sunxi/mmc.h b/arch/arm/include/asm/arch-sunxi/mmc.h
index 8a21674..537f145 100644
--- a/arch/arm/include/asm/arch-sunxi/mmc.h
+++ b/arch/arm/include/asm/arch-sunxi/mmc.h
@@ -43,7 +43,7 @@ struct sunxi_mmc {
 	u32 chda;		/* 0x90 */
 	u32 cbda;		/* 0x94 */
 	u32 res1[26];
-#if defined(CONFIG_SUN6I) || defined(CONFIG_SUN8I)
+#if defined(CONFIG_MACH_SUN6I) || defined(CONFIG_MACH_SUN8I)
 	u32 res2[64];
 #endif
 	u32 fifo;		/* 0x100 (0x200 on sun6i) FIFO access address */
diff --git a/arch/arm/include/asm/arch-sunxi/timer.h b/arch/arm/include/asm/arch-sunxi/timer.h
index 03a0684..9a5e488 100644
--- a/arch/arm/include/asm/arch-sunxi/timer.h
+++ b/arch/arm/include/asm/arch-sunxi/timer.h
@@ -67,7 +67,7 @@ struct sunxi_timer_reg {
 	struct sunxi_timer timer[6];	/* We have 6 timers */
 	u8 res2[16];
 	struct sunxi_avs avs;
-#if defined(CONFIG_SUN4I) || defined(CONFIG_SUN5I) || defined(CONFIG_SUN7I)
+#if defined(CONFIG_MACH_SUN4I) || defined(CONFIG_MACH_SUN5I) || defined(CONFIG_MACH_SUN7I)
 	struct sunxi_wdog wdog;	/* 0x90 */
 	/* XXX the following is not accurate for sun5i/sun7i */
 	struct sunxi_64cnt cnt64;	/* 0xa0 */
@@ -77,7 +77,7 @@ struct sunxi_timer_reg {
 	struct sunxi_tgp tgp[4];
 	u8 res5[8];
 	u32 cpu_cfg;
-#else /* CONFIG_SUN6I || CONFIG_SUN8I || ... */
+#else /* CONFIG_MACH_SUN6I || CONFIG_MACH_SUN8I || ... */
 	u8 res3[16];
 	struct sunxi_wdog wdog[5];	/* We have 5 watchdogs */
 #endif
diff --git a/arch/arm/include/asm/arch-sunxi/watchdog.h b/arch/arm/include/asm/arch-sunxi/watchdog.h
index ccc8fa3..8108be9 100644
--- a/arch/arm/include/asm/arch-sunxi/watchdog.h
+++ b/arch/arm/include/asm/arch-sunxi/watchdog.h
@@ -13,7 +13,7 @@
 #define WDT_CTRL_RESTART	(0x1 << 0)
 #define WDT_CTRL_KEY		(0x0a57 << 1)
 
-#if defined(CONFIG_SUN4I) || defined(CONFIG_SUN5I) || defined(CONFIG_SUN7I)
+#if defined(CONFIG_MACH_SUN4I) || defined(CONFIG_MACH_SUN5I) || defined(CONFIG_MACH_SUN7I)
 
 #define WDT_MODE_EN		(0x1 << 0)
 #define WDT_MODE_RESET_EN	(0x1 << 1)
diff --git a/drivers/mmc/sunxi_mmc.c b/drivers/mmc/sunxi_mmc.c
index 16592e3..f2fa12e 100644
--- a/drivers/mmc/sunxi_mmc.c
+++ b/drivers/mmc/sunxi_mmc.c
@@ -75,7 +75,7 @@ static int mmc_clk_io_on(int sdc_no)
 	/* config ahb clock */
 	setbits_le32(&ccm->ahb_gate0, 1 << AHB_GATE_OFFSET_MMC(sdc_no));
 
-#if defined(CONFIG_SUN6I) || defined(CONFIG_SUN8I)
+#if defined(CONFIG_MACH_SUN6I) || defined(CONFIG_MACH_SUN8I)
 	/* unassert reset */
 	setbits_le32(&ccm->ahb_reset0_cfg, 1 << AHB_RESET_OFFSET_MMC(sdc_no));
 #endif
@@ -385,7 +385,7 @@ struct mmc *sunxi_mmc_init(int sdc_no)
 	cfg->voltages = MMC_VDD_32_33 | MMC_VDD_33_34;
 	cfg->host_caps = MMC_MODE_4BIT;
 	cfg->host_caps |= MMC_MODE_HS_52MHz | MMC_MODE_HS;
-#if defined(CONFIG_SUN6I) || defined(CONFIG_SUN7I) || defined(CONFIG_SUN8I)
+#if defined(CONFIG_MACH_SUN6I) || defined(CONFIG_MACH_SUN7I) || defined(CONFIG_MACH_SUN8I)
 	cfg->host_caps |= MMC_MODE_HC;
 #endif
 	cfg->b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT;
diff --git a/drivers/usb/host/ehci-sunxi.c b/drivers/usb/host/ehci-sunxi.c
index 23617b7..d65e798 100644
--- a/drivers/usb/host/ehci-sunxi.c
+++ b/drivers/usb/host/ehci-sunxi.c
@@ -105,7 +105,7 @@ static void sunxi_usb_phy_init(struct sunxi_ehci_hcd *sunxi_ehci)
 	usb_phy_write(sunxi_ehci, 0x20, 0x14, 5);
 
 	/* threshold adjustment disconnect */
-#ifdef CONFIG_SUN4I
+#ifdef CONFIG_MACH_SUN4I
 	usb_phy_write(sunxi_ehci, 0x2a, 3, 2);
 #else
 	usb_phy_write(sunxi_ehci, 0x2a, 2, 2);
diff --git a/include/configs/sun4i.h b/include/configs/sun4i.h
index d0191a3..e0ec52d 100644
--- a/include/configs/sun4i.h
+++ b/include/configs/sun4i.h
@@ -11,7 +11,6 @@
 /*
  * A10 specific configuration
  */
-#define CONFIG_SUN4I		/* sun4i SoC generation */
 #define CONFIG_CLK_FULL_SPEED		1008000000
 
 #define CONFIG_SYS_PROMPT		"sun4i# "
diff --git a/include/configs/sun5i.h b/include/configs/sun5i.h
index 7b683e9..09f7533 100644
--- a/include/configs/sun5i.h
+++ b/include/configs/sun5i.h
@@ -11,7 +11,6 @@
 /*
  * High Level Configuration Options
  */
-#define CONFIG_SUN5I		/* sun5i SoC generation */
 #define CONFIG_CLK_FULL_SPEED		1008000000
 
 #define CONFIG_SYS_PROMPT		"sun5i# "
diff --git a/include/configs/sun6i.h b/include/configs/sun6i.h
index 93a1d96..b714474 100644
--- a/include/configs/sun6i.h
+++ b/include/configs/sun6i.h
@@ -14,7 +14,6 @@
 /*
  * A31 specific configuration
  */
-#define CONFIG_SUN6I		/* sun6i SoC generation */
 
 #define CONFIG_SYS_PROMPT		"sun6i# "
 
diff --git a/include/configs/sun7i.h b/include/configs/sun7i.h
index 966cbd8..0193826 100644
--- a/include/configs/sun7i.h
+++ b/include/configs/sun7i.h
@@ -12,7 +12,6 @@
 /*
  * A20 specific configuration
  */
-#define CONFIG_SUN7I		/* sun7i SoC generation */
 #define CONFIG_CLK_FULL_SPEED		912000000
 
 #define CONFIG_SYS_PROMPT		"sun7i# "
diff --git a/include/configs/sun8i.h b/include/configs/sun8i.h
index 1c1a7cd..6f1fc48 100644
--- a/include/configs/sun8i.h
+++ b/include/configs/sun8i.h
@@ -12,7 +12,6 @@
 /*
  * A23 specific configuration
  */
-#define CONFIG_SUN8I		/* sun8i SoC generation */
 #define CONFIG_SYS_PROMPT	"sun8i# "
 
 /*
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH v2 5/7] sunxi: Drop FEL variants of defconfigs.
  2014-10-24 20:20 [U-Boot] [PATCH v2 0/7] sunxi: Kconfig consolidation and cleanup Ian Campbell
                   ` (3 preceding siblings ...)
  2014-10-24 20:20 ` [U-Boot] [PATCH v2 4/7] sunxi: Use CONFIG_MACH_SUN?I from Kconfig instead of CONFIG_SUN?I Ian Campbell
@ 2014-10-24 20:20 ` Ian Campbell
  2014-10-24 20:20 ` [U-Boot] [PATCH v2 6/7] sunxi: kconfig: Introduce CONFIG_TARGET_<BOARD> Ian Campbell
  2014-10-24 20:20 ` [U-Boot] [PATCH v2 7/7] sunxi: kconfig: Add %_felconfig rule to enable FEL build of sunxi platforms Ian Campbell
  6 siblings, 0 replies; 9+ messages in thread
From: Ian Campbell @ 2014-10-24 20:20 UTC (permalink / raw)
  To: u-boot

This can now be configured via Kconfig, e.g. with:

    $ make BOARD_defconfig
    $ echo CONFIG_SPL_FEL=y >> .config
    $ echo CONFIG_SPL_FEL=y >> spl/.config

Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
---
 configs/Cubieboard2_FEL_defconfig | 7 -------
 configs/Cubietruck_FEL_defconfig  | 7 -------
 2 files changed, 14 deletions(-)
 delete mode 100644 configs/Cubieboard2_FEL_defconfig
 delete mode 100644 configs/Cubietruck_FEL_defconfig

diff --git a/configs/Cubieboard2_FEL_defconfig b/configs/Cubieboard2_FEL_defconfig
deleted file mode 100644
index 1b73fb5..0000000
--- a/configs/Cubieboard2_FEL_defconfig
+++ /dev/null
@@ -1,7 +0,0 @@
-CONFIG_SPL=y
-+S:CONFIG_SPL_FEL=y
-CONFIG_SYS_EXTRA_OPTIONS="CUBIEBOARD2,AXP209_POWER,SUNXI_GMAC,AHCI,SATAPWR=SUNXI_GPB(8),USB_EHCI"
-CONFIG_FDTFILE="sun7i-a20-cubieboard2.dtb"
-+S:CONFIG_ARM=y
-+S:CONFIG_ARCH_SUNXI=y
-+S:CONFIG_MACH_SUN7I=y
diff --git a/configs/Cubietruck_FEL_defconfig b/configs/Cubietruck_FEL_defconfig
deleted file mode 100644
index 7e78aec..0000000
--- a/configs/Cubietruck_FEL_defconfig
+++ /dev/null
@@ -1,7 +0,0 @@
-CONFIG_SPL=y
-+S:CONFIG_SPL_FEL=y
-CONFIG_SYS_EXTRA_OPTIONS="CUBIETRUCK,AXP209_POWER,SUNXI_GMAC,RGMII,AHCI,SATAPWR=SUNXI_GPH(12),USB_EHCI"
-CONFIG_FDTFILE="sun7i-a20-cubietruck.dtb"
-+S:CONFIG_ARM=y
-+S:CONFIG_ARCH_SUNXI=y
-+S:CONFIG_MACH_SUN7I=y
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH v2 6/7] sunxi: kconfig: Introduce CONFIG_TARGET_<BOARD>
  2014-10-24 20:20 [U-Boot] [PATCH v2 0/7] sunxi: Kconfig consolidation and cleanup Ian Campbell
                   ` (4 preceding siblings ...)
  2014-10-24 20:20 ` [U-Boot] [PATCH v2 5/7] sunxi: Drop FEL variants of defconfigs Ian Campbell
@ 2014-10-24 20:20 ` Ian Campbell
  2014-10-24 20:20 ` [U-Boot] [PATCH v2 7/7] sunxi: kconfig: Add %_felconfig rule to enable FEL build of sunxi platforms Ian Campbell
  6 siblings, 0 replies; 9+ messages in thread
From: Ian Campbell @ 2014-10-24 20:20 UTC (permalink / raw)
  To: u-boot

This was done automatically with the following bits of scripting.

The Kconfig choice content was generated with this script snippet:
    for i in $(git grep -l CONFIG_ARCH_SUNXI configs/*) ; do
        TARGET=$(sed -n -e 's/CONFIG_SYS_EXTRA_OPTIONS="\([^,"]\+\).*/\1/p' $i);
        MACH=$(sed -n -e 's/.*CONFIG_\(MACH_SUN.I\)=./\1/p' $i)
        echo "config TARGET_$TARGET"
        echo "	bool \"$TARGET\""
        echo "	depends on $MACH"
        echo
    done

defconfigs were updated with a sed script (t):
    # Extract board from first entry of CONFIG_SYS_EXTRA_OPTIONS,
    /^CONFIG_SYS_EXTRA_OPTIONS/ {
        s/^\(CONFIG_SYS_EXTRA_OPTIONS="\)\([^,"]\+\),\?\(.*\)/\1\3\nCONFIG_TARGET_\2=y/;

        # Print and delete first line (CONFIG_SYS_EXTRA_OPTIONS), leaving
        # CONFIG_TARGET_<BOARD> in pattern space
        P;D;
    };

    # Move CONFIG_TARGET_<BOARD> to hold space
    /^CONFIG_TARGET/{h;n}

    # Print CONFIG_TARGET_<BOARD> after CONFIG_MACH_<SOC> in either SPL or
    # normal mode.
    /^CONFIG_MACH/{p;g;p;n};
    /^\+S:CONFIG_MACH/{p;g;s/^CONFIG_TARGET/+S:&/;p;n};

    # Print any remaining lines normally
    p;
Run as:
    sed -i -n -f t $(git grep -l CONFIG_ARCH_SUNXI configs/*)
and then manually removing the one instance of CONFIG_SYS_EXTRA_OPTIONS="" from
Colombus_defconfig

board/sunxi/Makefile was updated with:
    sed -e 's/^\(obj-\$(CONFIG_\)\(.*\)\().*+= dram_.*\)/\1TARGET_\2\3/g' board/sunxi/Makefile
and manually retabbing a few lines to line up again.

The board descriptions could certainly be improved.

Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
---
v2: New patch
---
 board/sunxi/Kconfig                   | 101 ++++++++++++++++++++++++++++++++++
 board/sunxi/Makefile                  |  44 +++++++--------
 configs/A10-OLinuXino-Lime_defconfig  |   3 +-
 configs/A10s-OLinuXino-M_defconfig    |   3 +-
 configs/A13-OLinuXinoM_defconfig      |   3 +-
 configs/A13-OLinuXino_defconfig       |   3 +-
 configs/A20-OLinuXino-Lime2_defconfig |   3 +-
 configs/A20-OLinuXino-Lime_defconfig  |   3 +-
 configs/A20-OLinuXino_MICRO_defconfig |   3 +-
 configs/Auxtek-T004_defconfig         |   3 +-
 configs/Bananapi_defconfig            |   3 +-
 configs/Colombus_defconfig            |   2 +-
 configs/Cubieboard2_defconfig         |   3 +-
 configs/Cubieboard_defconfig          |   3 +-
 configs/Cubietruck_defconfig          |   3 +-
 configs/Ippo_q8h_v5_defconfig         |   3 +-
 configs/Linksprite_pcDuino3_defconfig |   3 +-
 configs/Mele_A1000G_defconfig         |   3 +-
 configs/Mele_A1000_defconfig          |   3 +-
 configs/Mele_M3_defconfig             |   3 +-
 configs/Mini-X-1Gb_defconfig          |   3 +-
 configs/Mini-X_defconfig              |   3 +-
 configs/ba10_tv_box_defconfig         |   3 +-
 configs/i12-tvbox_defconfig           |   3 +-
 configs/qt840a_defconfig              |   3 +-
 configs/r7-tv-dongle_defconfig        |   3 +-
 26 files changed, 170 insertions(+), 46 deletions(-)

diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig
index 496bad1..baa8c0c 100644
--- a/board/sunxi/Kconfig
+++ b/board/sunxi/Kconfig
@@ -28,6 +28,107 @@ config SYS_CONFIG_NAME
 	default "sun7i" if MACH_SUN7I
 	default "sun8i" if MACH_SUN8I
 
+choice
+	prompt "Board"
+
+config TARGET_A10_OLINUXINO_L
+	bool "A10_OLINUXINO_L"
+	depends on MACH_SUN4I
+
+config TARGET_A10S_OLINUXINO_M
+	bool "A10S_OLINUXINO_M"
+	depends on MACH_SUN5I
+
+config TARGET_A13_OLINUXINOM
+	bool "A13_OLINUXINOM"
+	depends on MACH_SUN5I
+
+config TARGET_A13_OLINUXINO
+	bool "A13_OLINUXINO"
+	depends on MACH_SUN5I
+
+config TARGET_A20_OLINUXINO_L2
+	bool "A20_OLINUXINO_L2"
+	depends on MACH_SUN7I
+
+config TARGET_A20_OLINUXINO_L
+	bool "A20_OLINUXINO_L"
+	depends on MACH_SUN7I
+
+config TARGET_A20_OLINUXINO_M
+	bool "A20_OLINUXINO_M"
+	depends on MACH_SUN7I
+
+config TARGET_AUXTEK_T004
+	bool "AUXTEK_T004"
+	depends on MACH_SUN5I
+
+config TARGET_BANANAPI
+	bool "BANANAPI"
+	depends on MACH_SUN7I
+
+config TARGET_COLOMBUS
+	bool "COLOMBUS"
+	depends on MACH_SUN6I
+
+config TARGET_CUBIEBOARD2
+	bool "CUBIEBOARD2"
+	depends on MACH_SUN7I
+
+config TARGET_CUBIEBOARD
+	bool "CUBIEBOARD"
+	depends on MACH_SUN4I
+
+config TARGET_CUBIETRUCK
+	bool "CUBIETRUCK"
+	depends on MACH_SUN7I
+
+config TARGET_IPPO_Q8H_V5
+	bool "IPPO_Q8H_V5"
+	depends on MACH_SUN8I
+
+config TARGET_PCDUINO3
+	bool "PCDUINO3"
+	depends on MACH_SUN7I
+
+config TARGET_MELE_A1000G
+	bool "MELE_A1000G"
+	depends on MACH_SUN4I
+
+config TARGET_MELE_A1000
+	bool "MELE_A1000"
+	depends on MACH_SUN4I
+
+config TARGET_MELE_M3
+	bool "MELE_M3"
+	depends on MACH_SUN7I
+
+config TARGET_MINI_X_1GB
+	bool "MINI_X_1GB"
+	depends on MACH_SUN4I
+
+config TARGET_MINI_X
+	bool "MINI_X"
+	depends on MACH_SUN4I
+
+config TARGET_BA10_TV_BOX
+	bool "BA10_TV_BOX"
+	depends on MACH_SUN4I
+
+config TARGET_I12_TVBOX
+	bool "I12_TVBOX"
+	depends on MACH_SUN7I
+
+config TARGET_QT840A
+	bool "QT840A"
+	depends on MACH_SUN7I
+
+config TARGET_R7DONGLE
+	bool "R7DONGLE"
+	depends on MACH_SUN5I
+
+endchoice
+
 config SYS_CPU
 	default "armv7"
 
diff --git a/board/sunxi/Makefile b/board/sunxi/Makefile
index 6a2e4c9..b84ff9b 100644
--- a/board/sunxi/Makefile
+++ b/board/sunxi/Makefile
@@ -11,26 +11,26 @@
 obj-y	+= board.o
 obj-$(CONFIG_SUNXI_GMAC)	+= gmac.o
 obj-$(CONFIG_SUNXI_AHCI)	+= ahci.o
-obj-$(CONFIG_A10_OLINUXINO_L)	+= dram_a10_olinuxino_l.o
-obj-$(CONFIG_A10S_OLINUXINO_M)	+= dram_a10s_olinuxino_m.o
-obj-$(CONFIG_A13_OLINUXINO)	+= dram_a13_olinuxino.o
-obj-$(CONFIG_A13_OLINUXINOM)	+= dram_a13_oli_micro.o
-obj-$(CONFIG_A20_OLINUXINO_L)	+= dram_a20_olinuxino_l.o
-obj-$(CONFIG_A20_OLINUXINO_L2)	+= dram_a20_olinuxino_l2.o
-obj-$(CONFIG_A20_OLINUXINO_M)	+= dram_sun7i_384_1024_iow16.o
+obj-$(CONFIG_TARGET_A10_OLINUXINO_L)	+= dram_a10_olinuxino_l.o
+obj-$(CONFIG_TARGET_A10S_OLINUXINO_M)	+= dram_a10s_olinuxino_m.o
+obj-$(CONFIG_TARGET_A13_OLINUXINO)	+= dram_a13_olinuxino.o
+obj-$(CONFIG_TARGET_A13_OLINUXINOM)	+= dram_a13_oli_micro.o
+obj-$(CONFIG_TARGET_A20_OLINUXINO_L)	+= dram_a20_olinuxino_l.o
+obj-$(CONFIG_TARGET_A20_OLINUXINO_L2)	+= dram_a20_olinuxino_l2.o
+obj-$(CONFIG_TARGET_A20_OLINUXINO_M)	+= dram_sun7i_384_1024_iow16.o
 # This is not a typo, uses the same mem settings as the a10s-olinuxino-m
-obj-$(CONFIG_AUXTEK_T004)	+= dram_a10s_olinuxino_m.o
-obj-$(CONFIG_BA10_TV_BOX)	+= dram_sun4i_384_1024_iow8.o
-obj-$(CONFIG_BANANAPI)		+= dram_bananapi.o
-obj-$(CONFIG_CUBIEBOARD)	+= dram_cubieboard.o
-obj-$(CONFIG_CUBIEBOARD2)	+= dram_cubieboard2.o
-obj-$(CONFIG_CUBIETRUCK)	+= dram_cubietruck.o
-obj-$(CONFIG_I12_TVBOX)		+= dram_sun7i_384_1024_iow16.o
-obj-$(CONFIG_MELE_A1000)	+= dram_sun4i_360_512.o
-obj-$(CONFIG_MELE_A1000G)	+= dram_sun4i_360_1024_iow8.o
-obj-$(CONFIG_MELE_M3)		+= dram_sun7i_384_1024_iow16.o
-obj-$(CONFIG_MINI_X)		+= dram_sun4i_360_512.o
-obj-$(CONFIG_MINI_X_1GB)	+= dram_sun4i_360_1024_iow16.o
-obj-$(CONFIG_PCDUINO3)		+= dram_linksprite_pcduino3.o
-obj-$(CONFIG_QT840A)		+= dram_sun7i_384_512_busw16_iow16.o
-obj-$(CONFIG_R7DONGLE)		+= dram_r7dongle.o
+obj-$(CONFIG_TARGET_AUXTEK_T004)	+= dram_a10s_olinuxino_m.o
+obj-$(CONFIG_TARGET_BA10_TV_BOX)	+= dram_sun4i_384_1024_iow8.o
+obj-$(CONFIG_TARGET_BANANAPI)		+= dram_bananapi.o
+obj-$(CONFIG_TARGET_CUBIEBOARD)		+= dram_cubieboard.o
+obj-$(CONFIG_TARGET_CUBIEBOARD2)	+= dram_cubieboard2.o
+obj-$(CONFIG_TARGET_CUBIETRUCK)		+= dram_cubietruck.o
+obj-$(CONFIG_TARGET_I12_TVBOX)		+= dram_sun7i_384_1024_iow16.o
+obj-$(CONFIG_TARGET_MELE_A1000)		+= dram_sun4i_360_512.o
+obj-$(CONFIG_TARGET_MELE_A1000G)	+= dram_sun4i_360_1024_iow8.o
+obj-$(CONFIG_TARGET_MELE_M3)		+= dram_sun7i_384_1024_iow16.o
+obj-$(CONFIG_TARGET_MINI_X)		+= dram_sun4i_360_512.o
+obj-$(CONFIG_TARGET_MINI_X_1GB)		+= dram_sun4i_360_1024_iow16.o
+obj-$(CONFIG_TARGET_PCDUINO3)		+= dram_linksprite_pcduino3.o
+obj-$(CONFIG_TARGET_QT840A)		+= dram_sun7i_384_512_busw16_iow16.o
+obj-$(CONFIG_TARGET_R7DONGLE)		+= dram_r7dongle.o
diff --git a/configs/A10-OLinuXino-Lime_defconfig b/configs/A10-OLinuXino-Lime_defconfig
index be989eb..f0cbf21 100644
--- a/configs/A10-OLinuXino-Lime_defconfig
+++ b/configs/A10-OLinuXino-Lime_defconfig
@@ -1,6 +1,7 @@
 CONFIG_SPL=y
-CONFIG_SYS_EXTRA_OPTIONS="A10_OLINUXINO_L,AXP209_POWER,SUNXI_EMAC,AHCI,SATAPWR=SUNXI_GPC(3),USB_EHCI"
+CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER,SUNXI_EMAC,AHCI,SATAPWR=SUNXI_GPC(3),USB_EHCI"
 CONFIG_FDTFILE="sun4i-a10-olinuxino-lime.dtb"
 +S:CONFIG_ARM=y
 +S:CONFIG_ARCH_SUNXI=y
 +S:CONFIG_MACH_SUN4I=y
++S:CONFIG_TARGET_A10_OLINUXINO_L=y
diff --git a/configs/A10s-OLinuXino-M_defconfig b/configs/A10s-OLinuXino-M_defconfig
index a27a788..6475675 100644
--- a/configs/A10s-OLinuXino-M_defconfig
+++ b/configs/A10s-OLinuXino-M_defconfig
@@ -1,5 +1,5 @@
 CONFIG_SPL=y
-CONFIG_SYS_EXTRA_OPTIONS="A10S_OLINUXINO_M,AXP152_POWER,SUNXI_EMAC,USB_EHCI,SUNXI_USB_VBUS0_GPIO=SUNXI_GPB(10)"
+CONFIG_SYS_EXTRA_OPTIONS="AXP152_POWER,SUNXI_EMAC,USB_EHCI,SUNXI_USB_VBUS0_GPIO=SUNXI_GPB(10)"
 CONFIG_FDTFILE="sun5i-a10s-olinuxino-micro.dtb"
 CONFIG_MMC_SUNXI_SLOT_EXTRA=1
 +S:CONFIG_MMC0_CD_PIN="PG1"
@@ -7,3 +7,4 @@ CONFIG_MMC_SUNXI_SLOT_EXTRA=1
 +S:CONFIG_ARM=y
 +S:CONFIG_ARCH_SUNXI=y
 +S:CONFIG_MACH_SUN5I=y
++S:CONFIG_TARGET_A10S_OLINUXINO_M=y
diff --git a/configs/A13-OLinuXinoM_defconfig b/configs/A13-OLinuXinoM_defconfig
index f904b50..d8b1239 100644
--- a/configs/A13-OLinuXinoM_defconfig
+++ b/configs/A13-OLinuXinoM_defconfig
@@ -1,6 +1,7 @@
 CONFIG_SPL=y
-CONFIG_SYS_EXTRA_OPTIONS="A13_OLINUXINOM,CONS_INDEX=2,USB_EHCI,SUNXI_USB_VBUS0_GPIO=SUNXI_GPG(11)"
+CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=2,USB_EHCI,SUNXI_USB_VBUS0_GPIO=SUNXI_GPG(11)"
 CONFIG_FDTFILE="sun5i-a13-olinuxino-micro.dtb"
 +S:CONFIG_ARM=y
 +S:CONFIG_ARCH_SUNXI=y
 +S:CONFIG_MACH_SUN5I=y
++S:CONFIG_TARGET_A13_OLINUXINOM=y
diff --git a/configs/A13-OLinuXino_defconfig b/configs/A13-OLinuXino_defconfig
index 23dc716..91039df 100644
--- a/configs/A13-OLinuXino_defconfig
+++ b/configs/A13-OLinuXino_defconfig
@@ -1,6 +1,7 @@
 CONFIG_SPL=y
-CONFIG_SYS_EXTRA_OPTIONS="A13_OLINUXINO,CONS_INDEX=2,AXP209_POWER,USB_EHCI,SUNXI_USB_VBUS0_GPIO=SUNXI_GPG(11)"
+CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=2,AXP209_POWER,USB_EHCI,SUNXI_USB_VBUS0_GPIO=SUNXI_GPG(11)"
 CONFIG_FDTFILE="sun5i-a13-olinuxino.dtb"
 +S:CONFIG_ARM=y
 +S:CONFIG_ARCH_SUNXI=y
 +S:CONFIG_MACH_SUN5I=y
++S:CONFIG_TARGET_A13_OLINUXINO=y
diff --git a/configs/A20-OLinuXino-Lime2_defconfig b/configs/A20-OLinuXino-Lime2_defconfig
index e7c93b9..f80b98a 100644
--- a/configs/A20-OLinuXino-Lime2_defconfig
+++ b/configs/A20-OLinuXino-Lime2_defconfig
@@ -1,6 +1,7 @@
 CONFIG_SPL=y
-CONFIG_SYS_EXTRA_OPTIONS="A20_OLINUXINO_L2,AXP209_POWER,SUNXI_GMAC,RGMII,AHCI,SATAPWR=SUNXI_GPC(3),USB_EHCI"
+CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER,SUNXI_GMAC,RGMII,AHCI,SATAPWR=SUNXI_GPC(3),USB_EHCI"
 CONFIG_FDTFILE="sun7i-a20-olinuxino-lime2.dtb"
 +S:CONFIG_ARM=y
 +S:CONFIG_ARCH_SUNXI=y
 +S:CONFIG_MACH_SUN7I=y
++S:CONFIG_TARGET_A20_OLINUXINO_L2=y
diff --git a/configs/A20-OLinuXino-Lime_defconfig b/configs/A20-OLinuXino-Lime_defconfig
index 975472b..d9e66b7 100644
--- a/configs/A20-OLinuXino-Lime_defconfig
+++ b/configs/A20-OLinuXino-Lime_defconfig
@@ -1,6 +1,7 @@
 CONFIG_SPL=y
-CONFIG_SYS_EXTRA_OPTIONS="A20_OLINUXINO_L,AXP209_POWER,SUNXI_GMAC,AHCI,SATAPWR=SUNXI_GPC(3),USB_EHCI"
+CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER,SUNXI_GMAC,AHCI,SATAPWR=SUNXI_GPC(3),USB_EHCI"
 CONFIG_FDTFILE="sun7i-a20-olinuxino-lime.dtb"
 +S:CONFIG_ARM=y
 +S:CONFIG_ARCH_SUNXI=y
 +S:CONFIG_MACH_SUN7I=y
++S:CONFIG_TARGET_A20_OLINUXINO_L=y
diff --git a/configs/A20-OLinuXino_MICRO_defconfig b/configs/A20-OLinuXino_MICRO_defconfig
index c2c3db6..1b9668d 100644
--- a/configs/A20-OLinuXino_MICRO_defconfig
+++ b/configs/A20-OLinuXino_MICRO_defconfig
@@ -1,5 +1,5 @@
 CONFIG_SPL=y
-CONFIG_SYS_EXTRA_OPTIONS="A20_OLINUXINO_M,AXP209_POWER,SUNXI_GMAC,AHCI,SATAPWR=SUNXI_GPB(8),USB_EHCI"
+CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER,SUNXI_GMAC,AHCI,SATAPWR=SUNXI_GPB(8),USB_EHCI"
 CONFIG_FDTFILE="sun7i-a20-olinuxino-micro.dtb"
 CONFIG_MMC_SUNXI_SLOT_EXTRA=3
 +S:CONFIG_MMC0_CD_PIN="PH1"
@@ -7,3 +7,4 @@ CONFIG_MMC_SUNXI_SLOT_EXTRA=3
 +S:CONFIG_ARM=y
 +S:CONFIG_ARCH_SUNXI=y
 +S:CONFIG_MACH_SUN7I=y
++S:CONFIG_TARGET_A20_OLINUXINO_M=y
diff --git a/configs/Auxtek-T004_defconfig b/configs/Auxtek-T004_defconfig
index b2f4c51..5b06ea0 100644
--- a/configs/Auxtek-T004_defconfig
+++ b/configs/Auxtek-T004_defconfig
@@ -1,6 +1,7 @@
 CONFIG_SPL=y
-CONFIG_SYS_EXTRA_OPTIONS="AUXTEK_T004,AXP152_POWER,USB_EHCI,SUNXI_USB_VBUS0_GPIO=SUNXI_GPG(13)"
+CONFIG_SYS_EXTRA_OPTIONS="AXP152_POWER,USB_EHCI,SUNXI_USB_VBUS0_GPIO=SUNXI_GPG(13)"
 CONFIG_FDTFILE="sun5i-a10s-auxtek-t004.dtb"
 +S:CONFIG_ARM=y
 +S:CONFIG_ARCH_SUNXI=y
 +S:CONFIG_MACH_SUN5I=y
++S:CONFIG_TARGET_AUXTEK_T004=y
diff --git a/configs/Bananapi_defconfig b/configs/Bananapi_defconfig
index ec18b9f..196f682 100644
--- a/configs/Bananapi_defconfig
+++ b/configs/Bananapi_defconfig
@@ -1,6 +1,7 @@
 CONFIG_SPL=y
-CONFIG_SYS_EXTRA_OPTIONS="BANANAPI,AXP209_POWER,SUNXI_GMAC,RGMII,MACPWR=SUNXI_GPH(23),AHCI,USB_EHCI"
+CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER,SUNXI_GMAC,RGMII,MACPWR=SUNXI_GPH(23),AHCI,USB_EHCI"
 CONFIG_FDTFILE="sun7i-a20-bananapi.dtb"
 +S:CONFIG_ARM=y
 +S:CONFIG_ARCH_SUNXI=y
 +S:CONFIG_MACH_SUN7I=y
++S:CONFIG_TARGET_BANANAPI=y
diff --git a/configs/Colombus_defconfig b/configs/Colombus_defconfig
index 4c0ea78..89291f9 100644
--- a/configs/Colombus_defconfig
+++ b/configs/Colombus_defconfig
@@ -1,5 +1,5 @@
-CONFIG_SYS_EXTRA_OPTIONS="COLOMBUS"
 CONFIG_ARM=y
 CONFIG_ARCH_SUNXI=y
 CONFIG_MACH_SUN6I=y
+CONFIG_TARGET_COLOMBUS=y
 CONFIG_FDTFILE="sun6i-a31-colombus.dtb"
diff --git a/configs/Cubieboard2_defconfig b/configs/Cubieboard2_defconfig
index f6872c6..7e7a1ca 100644
--- a/configs/Cubieboard2_defconfig
+++ b/configs/Cubieboard2_defconfig
@@ -1,6 +1,7 @@
 CONFIG_SPL=y
-CONFIG_SYS_EXTRA_OPTIONS="CUBIEBOARD2,AXP209_POWER,SUNXI_GMAC,AHCI,SATAPWR=SUNXI_GPB(8),USB_EHCI"
+CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER,SUNXI_GMAC,AHCI,SATAPWR=SUNXI_GPB(8),USB_EHCI"
 CONFIG_FDTFILE="sun7i-a20-cubieboard2.dtb"
 +S:CONFIG_ARM=y
 +S:CONFIG_ARCH_SUNXI=y
 +S:CONFIG_MACH_SUN7I=y
++S:CONFIG_TARGET_CUBIEBOARD2=y
diff --git a/configs/Cubieboard_defconfig b/configs/Cubieboard_defconfig
index 9152b25..0bc45fd 100644
--- a/configs/Cubieboard_defconfig
+++ b/configs/Cubieboard_defconfig
@@ -1,6 +1,7 @@
 CONFIG_SPL=y
-CONFIG_SYS_EXTRA_OPTIONS="CUBIEBOARD,AXP209_POWER,SUNXI_EMAC,AHCI,SATAPWR=SUNXI_GPB(8),USB_EHCI"
+CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER,SUNXI_EMAC,AHCI,SATAPWR=SUNXI_GPB(8),USB_EHCI"
 CONFIG_FDTFILE="sun4i-a10-cubieboard.dtb"
 +S:CONFIG_ARM=y
 +S:CONFIG_ARCH_SUNXI=y
 +S:CONFIG_MACH_SUN4I=y
++S:CONFIG_TARGET_CUBIEBOARD=y
diff --git a/configs/Cubietruck_defconfig b/configs/Cubietruck_defconfig
index 7592658..b1f9f93 100644
--- a/configs/Cubietruck_defconfig
+++ b/configs/Cubietruck_defconfig
@@ -1,6 +1,7 @@
 CONFIG_SPL=y
-CONFIG_SYS_EXTRA_OPTIONS="CUBIETRUCK,AXP209_POWER,SUNXI_GMAC,RGMII,AHCI,SATAPWR=SUNXI_GPH(12),USB_EHCI"
+CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER,SUNXI_GMAC,RGMII,AHCI,SATAPWR=SUNXI_GPH(12),USB_EHCI"
 CONFIG_FDTFILE="sun7i-a20-cubietruck.dtb"
 +S:CONFIG_ARM=y
 +S:CONFIG_ARCH_SUNXI=y
 +S:CONFIG_MACH_SUN7I=y
++S:CONFIG_TARGET_CUBIETRUCK=y
diff --git a/configs/Ippo_q8h_v5_defconfig b/configs/Ippo_q8h_v5_defconfig
index 12ff701..fc67bd9 100644
--- a/configs/Ippo_q8h_v5_defconfig
+++ b/configs/Ippo_q8h_v5_defconfig
@@ -1,5 +1,6 @@
-CONFIG_SYS_EXTRA_OPTIONS="IPPO_Q8H_V5,CONS_INDEX=5"
+CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=5"
 CONFIG_ARM=y
 CONFIG_ARCH_SUNXI=y
 CONFIG_MACH_SUN8I=y
+CONFIG_TARGET_IPPO_Q8H_V5=y
 CONFIG_DEFAULT_DEVICE_TREE="sun8i-a23-ippo-q8h-v5.dtb"
diff --git a/configs/Linksprite_pcDuino3_defconfig b/configs/Linksprite_pcDuino3_defconfig
index 935c055..a26ff0a 100644
--- a/configs/Linksprite_pcDuino3_defconfig
+++ b/configs/Linksprite_pcDuino3_defconfig
@@ -1,6 +1,7 @@
 CONFIG_SPL=y
-CONFIG_SYS_EXTRA_OPTIONS="PCDUINO3,AXP209_POWER,SUNXI_GMAC,AHCI,SATAPWR=SUNXI_GPH(2),USB_EHCI"
+CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER,SUNXI_GMAC,AHCI,SATAPWR=SUNXI_GPH(2),USB_EHCI"
 CONFIG_FDTFILE="sun7i-a20-pcduino3.dtb"
 +S:CONFIG_ARM=y
 +S:CONFIG_ARCH_SUNXI=y
 +S:CONFIG_MACH_SUN7I=y
++S:CONFIG_TARGET_PCDUINO3=y
diff --git a/configs/Mele_A1000G_defconfig b/configs/Mele_A1000G_defconfig
index 17b5612..2f4bf72 100644
--- a/configs/Mele_A1000G_defconfig
+++ b/configs/Mele_A1000G_defconfig
@@ -1,6 +1,7 @@
 CONFIG_SPL=y
-CONFIG_SYS_EXTRA_OPTIONS="MELE_A1000G,AXP209_POWER,SUNXI_EMAC,MACPWR=SUNXI_GPH(15),AHCI,USB_EHCI"
+CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER,SUNXI_EMAC,MACPWR=SUNXI_GPH(15),AHCI,USB_EHCI"
 CONFIG_FDTFILE="sun4i-a10-a1000.dtb"
 +S:CONFIG_ARM=y
 +S:CONFIG_ARCH_SUNXI=y
 +S:CONFIG_MACH_SUN4I=y
++S:CONFIG_TARGET_MELE_A1000G=y
diff --git a/configs/Mele_A1000_defconfig b/configs/Mele_A1000_defconfig
index c34f9e2..e2912b0 100644
--- a/configs/Mele_A1000_defconfig
+++ b/configs/Mele_A1000_defconfig
@@ -1,6 +1,7 @@
 CONFIG_SPL=y
-CONFIG_SYS_EXTRA_OPTIONS="MELE_A1000,AXP209_POWER,SUNXI_EMAC,MACPWR=SUNXI_GPH(15),AHCI,USB_EHCI"
+CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER,SUNXI_EMAC,MACPWR=SUNXI_GPH(15),AHCI,USB_EHCI"
 CONFIG_FDTFILE="sun4i-a10-a1000.dtb"
 +S:CONFIG_ARM=y
 +S:CONFIG_ARCH_SUNXI=y
 +S:CONFIG_MACH_SUN4I=y
++S:CONFIG_TARGET_MELE_A1000=y
diff --git a/configs/Mele_M3_defconfig b/configs/Mele_M3_defconfig
index 963ae9f..fe9ba11 100644
--- a/configs/Mele_M3_defconfig
+++ b/configs/Mele_M3_defconfig
@@ -1,8 +1,9 @@
 CONFIG_SPL=y
-CONFIG_SYS_EXTRA_OPTIONS="MELE_M3,AXP209_POWER,SUNXI_GMAC,USB_EHCI"
+CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER,SUNXI_GMAC,USB_EHCI"
 CONFIG_FDTFILE="sun7i-a20-m3.dtb"
 +S:CONFIG_MMC_SUNXI_SLOT_EXTRA=2
 +S:CONFIG_MMC0_CD_PIN="PH1"
 +S:CONFIG_ARM=y
 +S:CONFIG_ARCH_SUNXI=y
 +S:CONFIG_MACH_SUN7I=y
++S:CONFIG_TARGET_MELE_M3=y
diff --git a/configs/Mini-X-1Gb_defconfig b/configs/Mini-X-1Gb_defconfig
index 343b53c..b8fea01 100644
--- a/configs/Mini-X-1Gb_defconfig
+++ b/configs/Mini-X-1Gb_defconfig
@@ -1,6 +1,7 @@
 CONFIG_SPL=y
-CONFIG_SYS_EXTRA_OPTIONS="MINI_X_1GB,AXP209_POWER,USB_EHCI"
+CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER,USB_EHCI"
 CONFIG_FDTFILE="sun4i-a10-mini-xplus.dtb"
 +S:CONFIG_ARM=y
 +S:CONFIG_ARCH_SUNXI=y
 +S:CONFIG_MACH_SUN4I=y
++S:CONFIG_TARGET_MINI_X_1GB=y
diff --git a/configs/Mini-X_defconfig b/configs/Mini-X_defconfig
index 0a18856..0f6bbe0 100644
--- a/configs/Mini-X_defconfig
+++ b/configs/Mini-X_defconfig
@@ -1,6 +1,7 @@
 CONFIG_SPL=y
-CONFIG_SYS_EXTRA_OPTIONS="MINI_X,AXP209_POWER,USB_EHCI"
+CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER,USB_EHCI"
 CONFIG_FDTFILE="sun4i-a10-mini-xplus.dtb"
 +S:CONFIG_ARM=y
 +S:CONFIG_ARCH_SUNXI=y
 +S:CONFIG_MACH_SUN4I=y
++S:CONFIG_TARGET_MINI_X=y
diff --git a/configs/ba10_tv_box_defconfig b/configs/ba10_tv_box_defconfig
index 0a22ddd..0a1abea 100644
--- a/configs/ba10_tv_box_defconfig
+++ b/configs/ba10_tv_box_defconfig
@@ -1,6 +1,7 @@
 CONFIG_SPL=y
-CONFIG_SYS_EXTRA_OPTIONS="BA10_TV_BOX,AXP209_POWER,SUNXI_EMAC,USB_EHCI,SUNXI_USB_VBUS1_GPIO=SUNXI_GPH(12)"
+CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER,SUNXI_EMAC,USB_EHCI,SUNXI_USB_VBUS1_GPIO=SUNXI_GPH(12)"
 CONFIG_FDTFILE="sun4i-a10-ba10-tvbox.dtb"
 +S:CONFIG_ARM=y
 +S:CONFIG_ARCH_SUNXI=y
 +S:CONFIG_MACH_SUN4I=y
++S:CONFIG_TARGET_BA10_TV_BOX=y
diff --git a/configs/i12-tvbox_defconfig b/configs/i12-tvbox_defconfig
index 068c4b5..5f5037e 100644
--- a/configs/i12-tvbox_defconfig
+++ b/configs/i12-tvbox_defconfig
@@ -1,6 +1,7 @@
 CONFIG_SPL=y
-CONFIG_SYS_EXTRA_OPTIONS="I12_TVBOX,AXP209_POWER,SUNXI_GMAC,MACPWR=SUNXI_GPH(21),USB_EHCI"
+CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER,SUNXI_GMAC,MACPWR=SUNXI_GPH(21),USB_EHCI"
 CONFIG_FDTFILE="sun7i-a20-i12-tvbox.dtb"
 +S:CONFIG_ARM=y
 +S:CONFIG_ARCH_SUNXI=y
 +S:CONFIG_MACH_SUN7I=y
++S:CONFIG_TARGET_I12_TVBOX=y
diff --git a/configs/qt840a_defconfig b/configs/qt840a_defconfig
index 6ec33a8..70f8159 100644
--- a/configs/qt840a_defconfig
+++ b/configs/qt840a_defconfig
@@ -1,6 +1,7 @@
 CONFIG_SPL=y
-CONFIG_SYS_EXTRA_OPTIONS="QT840A,AXP209_POWER,SUNXI_GMAC,MACPWR=SUNXI_GPH(21),USB_EHCI"
+CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER,SUNXI_GMAC,MACPWR=SUNXI_GPH(21),USB_EHCI"
 CONFIG_FDTFILE="sun7i-a20-i12-tvbox.dtb"
 +S:CONFIG_ARM=y
 +S:CONFIG_ARCH_SUNXI=y
 +S:CONFIG_MACH_SUN7I=y
++S:CONFIG_TARGET_QT840A=y
diff --git a/configs/r7-tv-dongle_defconfig b/configs/r7-tv-dongle_defconfig
index 2780e14..7dbff40 100644
--- a/configs/r7-tv-dongle_defconfig
+++ b/configs/r7-tv-dongle_defconfig
@@ -1,6 +1,7 @@
 CONFIG_SPL=y
-CONFIG_SYS_EXTRA_OPTIONS="R7DONGLE,AXP152_POWER,USB_EHCI,SUNXI_USB_VBUS0_GPIO=SUNXI_GPG(13)"
+CONFIG_SYS_EXTRA_OPTIONS="AXP152_POWER,USB_EHCI,SUNXI_USB_VBUS0_GPIO=SUNXI_GPG(13)"
 CONFIG_FDTFILE="sun5i-a10s-r7-tv-dongle.dtb"
 +S:CONFIG_ARM=y
 +S:CONFIG_ARCH_SUNXI=y
 +S:CONFIG_MACH_SUN5I=y
++S:CONFIG_TARGET_R7DONGLE=y
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH v2 7/7] sunxi: kconfig: Add %_felconfig rule to enable FEL build of sunxi platforms.
  2014-10-24 20:20 [U-Boot] [PATCH v2 0/7] sunxi: Kconfig consolidation and cleanup Ian Campbell
                   ` (5 preceding siblings ...)
  2014-10-24 20:20 ` [U-Boot] [PATCH v2 6/7] sunxi: kconfig: Introduce CONFIG_TARGET_<BOARD> Ian Campbell
@ 2014-10-24 20:20 ` Ian Campbell
  2014-10-27 11:08   ` Hans de Goede
  6 siblings, 1 reply; 9+ messages in thread
From: Ian Campbell @ 2014-10-24 20:20 UTC (permalink / raw)
  To: u-boot

    $ make BOARD_felconfig
is more convenient than
    $ make BOARD_defconfig
    $ echo CONFIG_SPL_FEL=y >> .config
    $ echo CONFIG_SPL_FEL=y >> spl/.config

Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
---
v2: New patch.

    Is this a good idea?
---
 scripts/multiconfig.sh | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/scripts/multiconfig.sh b/scripts/multiconfig.sh
index 3e3040b..70f3a5d 100644
--- a/scripts/multiconfig.sh
+++ b/scripts/multiconfig.sh
@@ -162,6 +162,16 @@ do_defconfig () {
 	fi
 }
 
+do_board_felconfig () {
+    do_board_defconfig ${1%%_felconfig}_defconfig
+    if ! grep -q CONFIG_ARCH_SUNXI=y .config || ! grep -q CONFIG_SPL=y .config ; then
+	echo "$progname: Cannot felconfig a non-sunxi or non-SPL platform" >&2
+	exit 1
+    fi
+    sed -i -e 's/\# CONFIG_SPL_FEL is not set/CONFIG_SPL_FEL=y/g' \
+	.config spl/.config
+}
+
 do_savedefconfig () {
 	if [ -r "$KCONFIG_CONFIG" ]; then
 		subimages=$(get_enabled_subimages)
@@ -323,6 +333,8 @@ target=$1
 case $target in
 *_defconfig)
 	do_board_defconfig $target;;
+*_felconfig)
+	do_board_felconfig $target;;
 *_config)
 	# backward compatibility
 	do_board_defconfig ${target%_config}_defconfig;;
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH v2 7/7] sunxi: kconfig: Add %_felconfig rule to enable FEL build of sunxi platforms.
  2014-10-24 20:20 ` [U-Boot] [PATCH v2 7/7] sunxi: kconfig: Add %_felconfig rule to enable FEL build of sunxi platforms Ian Campbell
@ 2014-10-27 11:08   ` Hans de Goede
  0 siblings, 0 replies; 9+ messages in thread
From: Hans de Goede @ 2014-10-27 11:08 UTC (permalink / raw)
  To: u-boot

Hi,

On 10/24/2014 10:20 PM, Ian Campbell wrote:
>     $ make BOARD_felconfig
> is more convenient than
>     $ make BOARD_defconfig
>     $ echo CONFIG_SPL_FEL=y >> .config
>     $ echo CONFIG_SPL_FEL=y >> spl/.config
> 
> Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
> ---
> v2: New patch.
> 
>     Is this a good idea?

Yes!

All patches look good to me and are:

Reviewed-by: Hans de Goede <hdegoede@redhat.com>

I've pushed this series to u-boot-sunxi/next

Regards,

Hans



> ---
>  scripts/multiconfig.sh | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/scripts/multiconfig.sh b/scripts/multiconfig.sh
> index 3e3040b..70f3a5d 100644
> --- a/scripts/multiconfig.sh
> +++ b/scripts/multiconfig.sh
> @@ -162,6 +162,16 @@ do_defconfig () {
>  	fi
>  }
>  
> +do_board_felconfig () {
> +    do_board_defconfig ${1%%_felconfig}_defconfig
> +    if ! grep -q CONFIG_ARCH_SUNXI=y .config || ! grep -q CONFIG_SPL=y .config ; then
> +	echo "$progname: Cannot felconfig a non-sunxi or non-SPL platform" >&2
> +	exit 1
> +    fi
> +    sed -i -e 's/\# CONFIG_SPL_FEL is not set/CONFIG_SPL_FEL=y/g' \
> +	.config spl/.config
> +}
> +
>  do_savedefconfig () {
>  	if [ -r "$KCONFIG_CONFIG" ]; then
>  		subimages=$(get_enabled_subimages)
> @@ -323,6 +333,8 @@ target=$1
>  case $target in
>  *_defconfig)
>  	do_board_defconfig $target;;
> +*_felconfig)
> +	do_board_felconfig $target;;
>  *_config)
>  	# backward compatibility
>  	do_board_defconfig ${target%_config}_defconfig;;
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-10-27 11:08 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-24 20:20 [U-Boot] [PATCH v2 0/7] sunxi: Kconfig consolidation and cleanup Ian Campbell
2014-10-24 20:20 ` [U-Boot] [PATCH v2 1/7] sunxi: kconfig: Add top-level ARCH_SUNXI Ian Campbell
2014-10-24 20:20 ` [U-Boot] [PATCH v2 2/7] sunxi: kconfig: Rename TARGET_SUN[45678]I to MACH_SUN[45678]I Ian Campbell
2014-10-24 20:20 ` [U-Boot] [PATCH v2 3/7] sunxi: Kconfig: Make SPL_FEL a toplevel Kconfig option Ian Campbell
2014-10-24 20:20 ` [U-Boot] [PATCH v2 4/7] sunxi: Use CONFIG_MACH_SUN?I from Kconfig instead of CONFIG_SUN?I Ian Campbell
2014-10-24 20:20 ` [U-Boot] [PATCH v2 5/7] sunxi: Drop FEL variants of defconfigs Ian Campbell
2014-10-24 20:20 ` [U-Boot] [PATCH v2 6/7] sunxi: kconfig: Introduce CONFIG_TARGET_<BOARD> Ian Campbell
2014-10-24 20:20 ` [U-Boot] [PATCH v2 7/7] sunxi: kconfig: Add %_felconfig rule to enable FEL build of sunxi platforms Ian Campbell
2014-10-27 11:08   ` Hans de Goede

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).