Skip to contentSkip to conversation

sunxi: Kconfig consolidation and cleanup

PATCH New Ian Campbell 4 participants 22 messages Oct 4, 2014 – Oct 26, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover sunxi: Kconfig consolidation and cleanup

A few simple patches which consolidate some Kconfig options and make 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

I've been using a little hack (below) to MAKEALL to help build test this.

There's still plenty of stuff in sunxi CONFIG_SYS_EXTRA_OPTIONS which could be moved out, but most of it is dependent on drivers/*/Kconfig switching first.

Probably the board and power controller selection could be moved out without any dependencies, although the board one in particular will be quite a big patch I think it would be worth it.

Ian.

My MAKEALL hack, surely not upstreamable ;-)

MAKEALL +5 -0
index 7c16319..3a8d1d0 100755
@@ -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
 
#1 lore raw

PATCH 1/3 sunxi: Kconfig: Consolidate SYS_CONFIG_NAME settings

No need to be so repetitive.

---
 board/sunxi/Kconfig | 31 ++++---------------------------
 1 file changed, 4 insertions(+), 27 deletions(-)
board/sunxi/Kconfig +4 -27
index 05defac..c4b3167 100644
@@ -1,31 +1,8 @@
-if TARGET_SUN4I
-
-config SYS_CONFIG_NAME
-	default "sun4i"
-
-endif
-
-if TARGET_SUN5I
-
-config SYS_CONFIG_NAME
-	default "sun5i"
-
-endif
-
-if TARGET_SUN6I
-
 config SYS_CONFIG_NAME
-	string
-	default "sun6i"
-
-endif
-
-if TARGET_SUN7I
-
-config SYS_CONFIG_NAME
-	default "sun7i"
-
-endif
+	default "sun4i" if TARGET_SUN4I
+	default "sun5i" if TARGET_SUN5I
+	default "sun6i" if TARGET_SUN6I
+	default "sun7i" if TARGET_SUN7I
 
 if TARGET_SUN4I || TARGET_SUN5I || TARGET_SUN6I || TARGET_SUN7I
 
Signature · 1 line
2.1.0
#2 lore raw

PATCH 1/3 sunxi: Kconfig: Consolidate SYS_CONFIG_NAME settings

Hi,

Quoted 1 line · Ian Campbell

No need to be so repetitive.

Hmm, I also have a version of this in my tree, I thought I had already send that out, but maybe I did not, see:

https://github.com/jwrdegoede/u-boot-sunxi/commit/387033b669d72b8621eeb52c4cdc503e0d63b86d

Note this needs to be rebased on top current next, as it does not take the SUN6I changes into account.

Quoted 34 lines
---
 board/sunxi/Kconfig | 31 ++++---------------------------
 1 file changed, 4 insertions(+), 27 deletions(-)
board/sunxi/Kconfig +0 -23
index 05defac..c4b3167 100644
@@ -1,31 +1,8 @@
-if TARGET_SUN4I
-
-config SYS_CONFIG_NAME
-	default "sun4i"
-
-endif
-
-if TARGET_SUN5I
-
-config SYS_CONFIG_NAME
-	default "sun5i"
-
-endif
-
-if TARGET_SUN6I
-
 config SYS_CONFIG_NAME
-	string
-	default "sun6i"
-
-endif
-
-if TARGET_SUN7I
-

board/sunxi/Kconfig line 7

Quoted 10 lines
board/sunxi/Kconfig +4 -4
-config SYS_CONFIG_NAME
-	default "sun7i"
-
-endif
+	default "sun4i" if TARGET_SUN4I
+	default "sun5i" if TARGET_SUN5I
+	default "sun6i" if TARGET_SUN6I
+	default "sun7i" if TARGET_SUN7I
 
 if TARGET_SUN4I || TARGET_SUN5I || TARGET_SUN6I || TARGET_SUN7I

You need to move this up to the top of the Kconfig file, as it gets unconditionally sourced from arch/arm/Kconfig, and if this is not at the top, you will be unconditionally adding a SYS_CONFIG_NAME section which may conflict with other targets which also define it.

With that fixed this is:

Regards,

Hans

#3 lore raw

PATCH 1/3 sunxi: Kconfig: Consolidate SYS_CONFIG_NAME settings

Quoted 7 lines · Hans de Goede

Hi,

Quoted 1 line · Ian Campbell

No need to be so repetitive.

Hmm, I also have a version of this in my tree, I thought I had already send that out, but maybe I did not,

Ah, it seemed familiar as I was writing it, but I decided it had just been discussed and not implemented.

Quoted 4 lines

You need to move this up to the top of the Kconfig file, as it gets unconditionally sourced from arch/arm/Kconfig, and if this is not at the top, you will be unconditionally adding a SYS_CONFIG_NAME section which may conflict with other targets which also define it.

Makes sense.

Quoted 3 lines

With that fixed this is:

Thanks.
Ian.

#4 lore raw

PATCH 2/3 sunxi: kconfig: Add top-level TARGET_SUNXI

In reply to Ian Campbell

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

configs updated with:

    sed -i -e 's/^\+S:CONFIG_TARGET_SUN.I=y/+S:CONFIG_TARGET_SUNXI=y\n&/g' configs/*
---
 arch/arm/Kconfig                      | 13 ++-----------
 board/sunxi/Kconfig                   | 21 +++++++++++++++++++--
 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-Lime_defconfig  |  1 +
 configs/A20-OLinuXino_MICRO_defconfig |  1 +
 configs/Auxtek-T004_defconfig         |  1 +
 configs/Bananapi_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/Linksprite_pcDuino3_defconfig |  1 +
 configs/Mele_A1000G_defconfig         |  1 +
 configs/Mele_A1000_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 +
 24 files changed, 43 insertions(+), 13 deletions(-)
arch/arm/Kconfig +2 -11
index e3e7e78..54d2fbb 100644
@@ -438,17 +438,8 @@ config TARGET_SMDKC100
 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_SUNXI
+	bool "Support sunxi"
 
 config TARGET_SNOWBALL
 	bool "Support snowball"
board/sunxi/Kconfig +19 -2
index c4b3167..6e9308d 100644
@@ -1,11 +1,28 @@
+if TARGET_SUNXI
+
+choice
+	prompt "Sunxi SoC"
+
+config TARGET_SUN4I
+	bool "sun4i family"
+
+config TARGET_SUN5I
+	bool "sun5i family"
+
+config TARGET_SUN6I
+	bool "sun6i family"
+
+config TARGET_SUN7I
+	bool "sun7i family"
+
+endchoice
+
 config SYS_CONFIG_NAME
 	default "sun4i" if TARGET_SUN4I
 	default "sun5i" if TARGET_SUN5I
 	default "sun6i" if TARGET_SUN6I
 	default "sun7i" if TARGET_SUN7I
 
-if TARGET_SUN4I || TARGET_SUN5I || TARGET_SUN6I || TARGET_SUN7I
-
 config SYS_CPU
 	default "armv7"
 
configs/A10-OLinuXino-Lime_defconfig +1 -0
index f992293..35cc2ca 100644
@@ -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_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN4I=y
configs/A10s-OLinuXino-M_defconfig +1 -0
index a578c06..2ab8d3e 100644
@@ -2,4 +2,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_FDTFILE="sun5i-a10s-olinuxino-micro.dtb"
 +S:CONFIG_ARM=y
++S:CONFIG_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN5I=y
configs/A13-OLinuXinoM_defconfig +1 -0
index 9ae7b12..5fb3556 100644
@@ -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_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN5I=y
configs/A13-OLinuXino_defconfig +1 -0
index 2c726f3..3632f95 100644
@@ -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_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN5I=y
configs/A20-OLinuXino-Lime_defconfig +1 -0
index ca79fd5..2317d1f 100644
@@ -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_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN7I=y
configs/A20-OLinuXino_MICRO_defconfig +1 -0
index 20a947c..ca68a9f 100644
@@ -2,4 +2,5 @@ CONFIG_SPL=y
 CONFIG_SYS_EXTRA_OPTIONS="A20_OLINUXINO_M,AXP209_POWER,SUNXI_GMAC,AHCI,SATAPWR=SUNXI_GPB(8),USB_EHCI"
 CONFIG_FDTFILE="sun7i-a20-olinuxino-micro.dtb"
 +S:CONFIG_ARM=y
++S:CONFIG_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN7I=y
configs/Auxtek-T004_defconfig +1 -0
index ed06f57..bc2e8f3 100644
@@ -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_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN5I=y
configs/Bananapi_defconfig +1 -0
index d59cf72..062bd02 100644
@@ -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_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN7I=y
configs/Cubieboard2_FEL_defconfig +1 -0
index 353b04a..967be18 100644
@@ -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_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN7I=y
configs/Cubieboard2_defconfig +1 -0
index 11a0c5f..b7947fb 100644
@@ -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_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN7I=y
configs/Cubieboard_defconfig +1 -0
index 8c1ff95..f4b93cf 100644
@@ -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_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN4I=y
configs/Cubietruck_FEL_defconfig +1 -0
index 23c5efb..1cda577 100644
@@ -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_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN7I=y
configs/Cubietruck_defconfig +1 -0
index 1389f21..6c9a530 100644
@@ -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_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN7I=y
configs/Linksprite_pcDuino3_defconfig +1 -0
index efc5301..1178f5b 100644
@@ -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_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN7I=y
configs/Mele_A1000G_defconfig +1 -0
index 06c4cac..1095b4b 100644
@@ -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_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN4I=y
configs/Mele_A1000_defconfig +1 -0
index d386c79..1d5d0cd 100644
@@ -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_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN4I=y
configs/Mini-X-1Gb_defconfig +1 -0
index 5db4aa3..b40bde4 100644
@@ -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_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN4I=y
configs/Mini-X_defconfig +1 -0
index 6718dcb..c0f645e 100644
@@ -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_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN4I=y
configs/ba10_tv_box_defconfig +1 -0
index 6f64875..bd46520 100644
@@ -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_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN4I=y
configs/i12-tvbox_defconfig +1 -0
index 2ef0f91..71c04f9 100644
@@ -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_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN7I=y
configs/qt840a_defconfig +1 -0
index a8d4bb8..03bbe6d 100644
@@ -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_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN7I=y
configs/r7-tv-dongle_defconfig +1 -0
index 6aba942..49c0fb4 100644
@@ -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_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN5I=y
Signature · 1 line
2.1.0
#5 lore raw

PATCH 2/3 sunxi: kconfig: Add top-level TARGET_SUNXI

Quoted 44 lines · Ian Campbell

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

configs updated with:

    sed -i -e 's/^\+S:CONFIG_TARGET_SUN.I=y/+S:CONFIG_TARGET_SUNXI=y\n&/g' configs/*
---
 arch/arm/Kconfig                      | 13 ++-----------
 board/sunxi/Kconfig                   | 21 +++++++++++++++++++--
 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-Lime_defconfig  |  1 +
 configs/A20-OLinuXino_MICRO_defconfig |  1 +
 configs/Auxtek-T004_defconfig         |  1 +
 configs/Bananapi_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/Linksprite_pcDuino3_defconfig |  1 +
 configs/Mele_A1000G_defconfig         |  1 +
 configs/Mele_A1000_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 +
 24 files changed, 43 insertions(+), 13 deletions(-)
arch/arm/Kconfig +0 -3
index e3e7e78..54d2fbb 100644
@@ -438,17 +438,8 @@ config TARGET_SMDKC100
 config TARGET_SOCFPGA_CYCLONE5
        bool "Support socfpga_cyclone5"
 
-config TARGET_SUN4I
-       bool "Support sun4i"
-

arch/arm/Kconfig config TARGET_SMDKC100 · line 442

Quoted 10 lines
arch/arm/Kconfig +2 -8
-config TARGET_SUN5I
-       bool "Support sun5i"
-
-config TARGET_SUN6I
-       bool "Support sun6i"
-
-config TARGET_SUN7I
-       bool "Support sun7i"
+config TARGET_SUNXI
+       bool "Support sunxi"

Should we mention "Allwinner SoCs"?

Quoted 8 lines
arch/arm/Kconfig +0 -0
 config TARGET_SNOWBALL
        bool "Support snowball"
board/sunxi/Kconfig +0 -0
index c4b3167..6e9308d 100644

board/sunxi/Kconfig line 7

Quoted 7 lines
board/sunxi/Kconfig +7 -0
@@ -1,11 +1,28 @@
+if TARGET_SUNXI
+
+choice
+       prompt "Sunxi SoC"
+
+config TARGET_SUN4I
+       bool "sun4i family"

And name the SoC models?
It would be easier for users to find what they need.

Quoted 244 lines
board/sunxi/Kconfig +12 -2
+
+config TARGET_SUN5I
+       bool "sun5i family"
+
+config TARGET_SUN6I
+       bool "sun6i family"
+
+config TARGET_SUN7I
+       bool "sun7i family"
+
+endchoice
+
 config SYS_CONFIG_NAME
        default "sun4i" if TARGET_SUN4I
        default "sun5i" if TARGET_SUN5I
        default "sun6i" if TARGET_SUN6I
        default "sun7i" if TARGET_SUN7I
 
-if TARGET_SUN4I || TARGET_SUN5I || TARGET_SUN6I || TARGET_SUN7I
-
 config SYS_CPU
        default "armv7"
 
configs/A10-OLinuXino-Lime_defconfig +1 -0
index f992293..35cc2ca 100644
@@ -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_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN4I=y
configs/A10s-OLinuXino-M_defconfig +1 -0
index a578c06..2ab8d3e 100644
@@ -2,4 +2,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_FDTFILE="sun5i-a10s-olinuxino-micro.dtb"
 +S:CONFIG_ARM=y
++S:CONFIG_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN5I=y
configs/A13-OLinuXinoM_defconfig +1 -0
index 9ae7b12..5fb3556 100644
@@ -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_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN5I=y
configs/A13-OLinuXino_defconfig +1 -0
index 2c726f3..3632f95 100644
@@ -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_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN5I=y
configs/A20-OLinuXino-Lime_defconfig +1 -0
index ca79fd5..2317d1f 100644
@@ -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_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN7I=y
configs/A20-OLinuXino_MICRO_defconfig +1 -0
index 20a947c..ca68a9f 100644
@@ -2,4 +2,5 @@ CONFIG_SPL=y
 CONFIG_SYS_EXTRA_OPTIONS="A20_OLINUXINO_M,AXP209_POWER,SUNXI_GMAC,AHCI,SATAPWR=SUNXI_GPB(8),USB_EHCI"
 CONFIG_FDTFILE="sun7i-a20-olinuxino-micro.dtb"
 +S:CONFIG_ARM=y
++S:CONFIG_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN7I=y
configs/Auxtek-T004_defconfig +1 -0
index ed06f57..bc2e8f3 100644
@@ -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_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN5I=y
configs/Bananapi_defconfig +1 -0
index d59cf72..062bd02 100644
@@ -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_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN7I=y
configs/Cubieboard2_FEL_defconfig +1 -0
index 353b04a..967be18 100644
@@ -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_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN7I=y
configs/Cubieboard2_defconfig +1 -0
index 11a0c5f..b7947fb 100644
@@ -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_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN7I=y
configs/Cubieboard_defconfig +1 -0
index 8c1ff95..f4b93cf 100644
@@ -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_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN4I=y
configs/Cubietruck_FEL_defconfig +1 -0
index 23c5efb..1cda577 100644
@@ -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_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN7I=y
configs/Cubietruck_defconfig +1 -0
index 1389f21..6c9a530 100644
@@ -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_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN7I=y
configs/Linksprite_pcDuino3_defconfig +1 -0
index efc5301..1178f5b 100644
@@ -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_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN7I=y
configs/Mele_A1000G_defconfig +1 -0
index 06c4cac..1095b4b 100644
@@ -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_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN4I=y
configs/Mele_A1000_defconfig +1 -0
index d386c79..1d5d0cd 100644
@@ -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_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN4I=y
configs/Mini-X-1Gb_defconfig +1 -0
index 5db4aa3..b40bde4 100644
@@ -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_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN4I=y
configs/Mini-X_defconfig +1 -0
index 6718dcb..c0f645e 100644
@@ -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_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN4I=y
configs/ba10_tv_box_defconfig +1 -0
index 6f64875..bd46520 100644
@@ -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_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN4I=y
configs/i12-tvbox_defconfig +1 -0
index 2ef0f91..71c04f9 100644
@@ -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_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN7I=y
configs/qt840a_defconfig +1 -0
index a8d4bb8..03bbe6d 100644
@@ -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_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN7I=y
configs/r7-tv-dongle_defconfig +1 -1
index 6aba942..49c0fb4 100644
@@ -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_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN5I=y
--
Quoted 1 line

2.1.0

Cheers
ChenYu

#6 lore raw

PATCH 2/3 sunxi: kconfig: Add top-level TARGET_SUNXI

In reply to Ian Campbell

Hi Ian,

Quoted 6 lines · On Sat, 4 Oct 2014 09:48:11 +0100 Ian Campbell <[email protected]> wrote:

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

configs updated with:

    sed -i -e 's/^\+S:CONFIG_TARGET_SUN.I=y/+S:CONFIG_TARGET_SUNXI=y\n&/g' configs/*

Perhaps, is ARCH_SUNXI more familiar?

Best Regards
Masahiro Yamada

#7 lore raw

PATCH 2/3 sunxi: kconfig: Add top-level TARGET_SUNXI

Quoted 7 lines · Masahiro Yamada

Hi Ian,

Quoted 2 lines · On Sat, 4 Oct 2014 09:48:11 +0100 Ian Campbell <[email protected]> wrote:

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

Quoted 7 lines
Quoted 4 lines

configs updated with:

    sed -i -e 's/^\+S:CONFIG_TARGET_SUN.I=y/+S:CONFIG_TARGET_SUNXI=y\n&/g' configs/*

Perhaps, is ARCH_SUNXI more familiar?

I've no idea ;-)

I think this is something which ought to be consistent within u-boot as a whole. Seems we have a mixture of ARCH_FOO (DAVINCI, VERSATILE, EXYNOS) and just FOO (TEGRA, ZYNQ). It does look like TARGET_FOO is all individual boards though, which would make it inappropriate for SUNXI or even SUN[4567]I.

Ultimately I'm happy to follow any guidance anyone has to give.

Ian.

#8 lore raw

PATCH 2/3 sunxi: kconfig: Add top-level TARGET_SUNXI

Hi Ian

On Mon, 06 Oct 2014 09:27:19 +0100
Ian Campbell <[email protected]> wrote:
Hi Ian,

Quoted 16 lines · Masahiro Yamada
Quoted 7 lines

Hi Ian,

Quoted 2 lines · On Sat, 4 Oct 2014 09:48:11 +0100 Ian Campbell <[email protected]> wrote:

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

Quoted 7 lines
Quoted 4 lines

configs updated with:

    sed -i -e 's/^\+S:CONFIG_TARGET_SUN.I=y/+S:CONFIG_TARGET_SUNXI=y\n&/g' configs/*

Perhaps, is ARCH_SUNXI more familiar?

Quoted 7 lines

I've no idea ;-)

I think this is something which ought to be consistent within u-boot as a whole. Seems we have a mixture of ARCH_FOO (DAVINCI, VERSATILE, EXYNOS) and just FOO (TEGRA, ZYNQ). It does look like TARGET_FOO is all individual boards though, which would make it inappropriate for SUNXI or even SUN[4567]I.

SoC/board select menu clean-up is on the way.
I have to admit the naming convention is inconsistent now.

CONFIG_ARCH_{DAVINCI, VERSATILE, EXYNOS} were added recently. If Xilinx/NVIDIA developers argree, we can rename CONFIG_{TEGRA, ZYNQ} -> CONFIG_ARCH_{TEGRA, ZYNQ} at some point.

Quoted 3 lines

Ultimately I'm happy to follow any guidance anyone has to give.

Ian.

#9 lore raw

PATCH 2/3 sunxi: kconfig: Add top-level TARGET_SUNXI

Quoted 30 lines · Masahiro Yamada

Hi Ian

On Mon, 06 Oct 2014 09:27:19 +0100
Ian Campbell <[email protected]> wrote:
Hi Ian,

Quoted 16 lines · Masahiro Yamada
Quoted 7 lines

Hi Ian,

Quoted 2 lines · On Sat, 4 Oct 2014 09:48:11 +0100 Ian Campbell <[email protected]> wrote:

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

Quoted 7 lines
Quoted 4 lines

configs updated with:

    sed -i -e 's/^\+S:CONFIG_TARGET_SUN.I=y/+S:CONFIG_TARGET_SUNXI=y\n&/g' configs/*

Perhaps, is ARCH_SUNXI more familiar?

Quoted 7 lines

I've no idea ;-)

I think this is something which ought to be consistent within u-boot as a whole. Seems we have a mixture of ARCH_FOO (DAVINCI, VERSATILE, EXYNOS) and just FOO (TEGRA, ZYNQ). It does look like TARGET_FOO is all individual boards though, which would make it inappropriate for SUNXI or even SUN[4567]I.

Quoted 6 lines

SoC/board select menu clean-up is on the way.
I have to admit the naming convention is inconsistent now.

CONFIG_ARCH_{DAVINCI, VERSATILE, EXYNOS} were added recently. If Xilinx/NVIDIA developers argree, we can rename CONFIG_{TEGRA, ZYNQ} -> CONFIG_ARCH_{TEGRA, ZYNQ} at some point.

So we want CONFIG_ARCH_SUNXI as well as CONFIG_ARCH_SUN[45678]I? Or did you mean for the latter to remain CONFIG_TARGET_SUN[45678]I?

Ian.

#10 lore raw

PATCH 2/3 sunxi: kconfig: Add top-level TARGET_SUNXI

Hi Ian,

Quoted 34 lines · On Wed, 22 Oct 2014 20:14:29 +0100 Ian Campbell <[email protected]> wrote:
Quoted 33 lines · Masahiro Yamada

Hi Ian

On Mon, 06 Oct 2014 09:27:19 +0100
Ian Campbell <[email protected]> wrote:
Hi Ian,

Quoted 16 lines · Masahiro Yamada
Quoted 7 lines

Hi Ian,

Quoted 2 lines · On Sat, 4 Oct 2014 09:48:11 +0100 Ian Campbell <[email protected]> wrote:

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

Quoted 7 lines
Quoted 4 lines

configs updated with:

    sed -i -e 's/^\+S:CONFIG_TARGET_SUN.I=y/+S:CONFIG_TARGET_SUNXI=y\n&/g' configs/*

Perhaps, is ARCH_SUNXI more familiar?

Quoted 7 lines

I've no idea ;-)

I think this is something which ought to be consistent within u-boot as a whole. Seems we have a mixture of ARCH_FOO (DAVINCI, VERSATILE, EXYNOS) and just FOO (TEGRA, ZYNQ). It does look like TARGET_FOO is all individual boards though, which would make it inappropriate for SUNXI or even SUN[4567]I.

SoC/board select menu clean-up is on the way.
I have to admit the naming convention is inconsistent now.

Quoted 6 lines
Quoted 3 lines

CONFIG_ARCH_{DAVINCI, VERSATILE, EXYNOS} were added recently. If Xilinx/NVIDIA developers argree, we can rename CONFIG_{TEGRA, ZYNQ} -> CONFIG_ARCH_{TEGRA, ZYNQ} at some point.

So we want CONFIG_ARCH_SUNXI as well as CONFIG_ARCH_SUN[45678]I? Or did you mean for the latter to remain CONFIG_TARGET_SUN[45678]I?

I think the latter should remain CONFIG_TARGET_*.
Or I think it is also OK to follow arch/arm/mach-sunxi/Kconfig of Linux.

Best Regards
Masahiro Yamada

#11 lore raw

PATCH 2/3 sunxi: kconfig: Add top-level TARGET_SUNXI

Quoted 44 lines · Masahiro Yamada

Hi Ian,

Quoted 38 lines · On Wed, 22 Oct 2014 20:14:29 +0100 Ian Campbell <[email protected]> wrote:
Quoted 36 lines · Masahiro Yamada

Hi Ian

On Mon, 06 Oct 2014 09:27:19 +0100
Ian Campbell <[email protected]> wrote:
Hi Ian,

Quoted 16 lines · Masahiro Yamada
Quoted 7 lines

Hi Ian,

Quoted 2 lines · On Sat, 4 Oct 2014 09:48:11 +0100 Ian Campbell <[email protected]> wrote:

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

Quoted 7 lines
Quoted 4 lines

configs updated with:

    sed -i -e 's/^\+S:CONFIG_TARGET_SUN.I=y/+S:CONFIG_TARGET_SUNXI=y\n&/g' configs/*

Perhaps, is ARCH_SUNXI more familiar?

Quoted 7 lines

I've no idea ;-)

I think this is something which ought to be consistent within u-boot as a whole. Seems we have a mixture of ARCH_FOO (DAVINCI, VERSATILE, EXYNOS) and just FOO (TEGRA, ZYNQ). It does look like TARGET_FOO is all individual boards though, which would make it inappropriate for SUNXI or even SUN[4567]I.

SoC/board select menu clean-up is on the way.
I have to admit the naming convention is inconsistent now.

CONFIG_ARCH_{DAVINCI, VERSATILE, EXYNOS} were added recently. If Xilinx/NVIDIA developers argree, we can rename CONFIG_{TEGRA, ZYNQ} -> CONFIG_ARCH_{TEGRA, ZYNQ} at some point.

Quoted 6 lines
Quoted 2 lines

So we want CONFIG_ARCH_SUNXI as well as CONFIG_ARCH_SUN[45678]I? Or did you mean for the latter to remain CONFIG_TARGET_SUN[45678]I?

I think the latter should remain CONFIG_TARGET_*.
Or I think it is also OK to follow arch/arm/mach-sunxi/Kconfig of Linux.

So either: CONFIG_ARCH_SUNXI + CONFIG_TARGET_SUN[45678]I
Or: CONFIG_ARCH_SUNXI + CONFIG_MACH_SUN[45679]I?

I'm not too fussed but I think the second sounds good and leaves CONFIG_TARGET_* available for the individual boards if we end up wanting/needing that. Sound good to everyone?

Ian.

#12 lore raw

PATCH 2/3 sunxi: kconfig: Add top-level TARGET_SUNXI

Hi,

Quoted 52 lines · Ian Campbell
Quoted 44 lines · Masahiro Yamada

Hi Ian,

Quoted 38 lines · On Wed, 22 Oct 2014 20:14:29 +0100 Ian Campbell <[email protected]> wrote:
Quoted 36 lines · Masahiro Yamada

Hi Ian

On Mon, 06 Oct 2014 09:27:19 +0100
Ian Campbell <[email protected]> wrote:
Hi Ian,

Quoted 16 lines · Masahiro Yamada
Quoted 7 lines

Hi Ian,

Quoted 2 lines · On Sat, 4 Oct 2014 09:48:11 +0100 Ian Campbell <[email protected]> wrote:

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

Quoted 7 lines
Quoted 4 lines

configs updated with:

    sed -i -e 's/^\+S:CONFIG_TARGET_SUN.I=y/+S:CONFIG_TARGET_SUNXI=y\n&/g' configs/*

Perhaps, is ARCH_SUNXI more familiar?

Quoted 7 lines

I've no idea ;-)

I think this is something which ought to be consistent within u-boot as a whole. Seems we have a mixture of ARCH_FOO (DAVINCI, VERSATILE, EXYNOS) and just FOO (TEGRA, ZYNQ). It does look like TARGET_FOO is all individual boards though, which would make it inappropriate for SUNXI or even SUN[4567]I.

SoC/board select menu clean-up is on the way.
I have to admit the naming convention is inconsistent now.

CONFIG_ARCH_{DAVINCI, VERSATILE, EXYNOS} were added recently. If Xilinx/NVIDIA developers argree, we can rename CONFIG_{TEGRA, ZYNQ} -> CONFIG_ARCH_{TEGRA, ZYNQ} at some point.

Quoted 6 lines
Quoted 2 lines

So we want CONFIG_ARCH_SUNXI as well as CONFIG_ARCH_SUN[45678]I? Or did you mean for the latter to remain CONFIG_TARGET_SUN[45678]I?

I think the latter should remain CONFIG_TARGET_*.
Or I think it is also OK to follow arch/arm/mach-sunxi/Kconfig of Linux.

Quoted 6 lines

So either: CONFIG_ARCH_SUNXI + CONFIG_TARGET_SUN[45678]I
Or: CONFIG_ARCH_SUNXI + CONFIG_MACH_SUN[45679]I?

I'm not too fussed but I think the second sounds good and leaves CONFIG_TARGET_* available for the individual boards if we end up wanting/needing that. Sound good to everyone?

Works for me.

Regards,

Hans

#13 lore raw

PATCH 2/3 sunxi: kconfig: Add top-level TARGET_SUNXI

In reply to Ian Campbell

Hi Ian,

2014-10-24 22:22 GMT+09:00 Ian Campbell <[email protected]>:

Quoted 49 lines · Masahiro Yamada
Quoted 48 lines

Hi Ian,

Quoted 40 lines · On Wed, 22 Oct 2014 20:14:29 +0100 Ian Campbell <[email protected]> wrote:
Quoted 30 lines · Masahiro Yamada

Hi Ian

On Mon, 06 Oct 2014 09:27:19 +0100
Ian Campbell <[email protected]> wrote:
Hi Ian,

Quoted 16 lines · Masahiro Yamada
Quoted 7 lines

Hi Ian,

Quoted 2 lines · On Sat, 4 Oct 2014 09:48:11 +0100 Ian Campbell <[email protected]> wrote:

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

Quoted 7 lines
Quoted 4 lines

configs updated with:

    sed -i -e 's/^\+S:CONFIG_TARGET_SUN.I=y/+S:CONFIG_TARGET_SUNXI=y\n&/g' configs/*

Perhaps, is ARCH_SUNXI more familiar?

Quoted 7 lines

I've no idea ;-)

I think this is something which ought to be consistent within u-boot as a whole. Seems we have a mixture of ARCH_FOO (DAVINCI, VERSATILE, EXYNOS) and just FOO (TEGRA, ZYNQ). It does look like TARGET_FOO is all individual boards though, which would make it inappropriate for SUNXI or even SUN[4567]I.

Quoted 6 lines

SoC/board select menu clean-up is on the way.
I have to admit the naming convention is inconsistent now.

CONFIG_ARCH_{DAVINCI, VERSATILE, EXYNOS} were added recently. If Xilinx/NVIDIA developers argree, we can rename CONFIG_{TEGRA, ZYNQ} -> CONFIG_ARCH_{TEGRA, ZYNQ} at some point.

So we want CONFIG_ARCH_SUNXI as well as CONFIG_ARCH_SUN[45678]I? Or did you mean for the latter to remain CONFIG_TARGET_SUN[45678]I?

Quoted 5 lines
Quoted 2 lines

I think the latter should remain CONFIG_TARGET_*.
Or I think it is also OK to follow arch/arm/mach-sunxi/Kconfig of Linux.

So either: CONFIG_ARCH_SUNXI + CONFIG_TARGET_SUN[45678]I
Or: CONFIG_ARCH_SUNXI + CONFIG_MACH_SUN[45679]I?

I personally prefer the latter.

Quoted 3 lines

I'm not too fussed but I think the second sounds good and leaves CONFIG_TARGET_* available for the individual boards if we end up wanting/needing that. Sound good to everyone?

Fully agreed with your
"[U-Boot,v2,0/7] sunxi: Kconfig consolidation and cleanup" series.

Thank you!

Signature · 2 lines
Best Regards
Masahiro Yamada
#14 lore raw

PATCH 2/3 sunxi: kconfig: Add top-level TARGET_SUNXI

In reply to Ian Campbell

Hi,

Quoted 6 lines · Ian Campbell

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

configs updated with:

    sed -i -e 's/^\+S:CONFIG_TARGET_SUN.I=y/+S:CONFIG_TARGET_SUNXI=y\n&/g' configs/*

Looks good:

Regards,

Hans

Quoted 307 lines
---
 arch/arm/Kconfig                      | 13 ++-----------
 board/sunxi/Kconfig                   | 21 +++++++++++++++++++--
 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-Lime_defconfig  |  1 +
 configs/A20-OLinuXino_MICRO_defconfig |  1 +
 configs/Auxtek-T004_defconfig         |  1 +
 configs/Bananapi_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/Linksprite_pcDuino3_defconfig |  1 +
 configs/Mele_A1000G_defconfig         |  1 +
 configs/Mele_A1000_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 +
 24 files changed, 43 insertions(+), 13 deletions(-)
arch/arm/Kconfig +2 -11
index e3e7e78..54d2fbb 100644
@@ -438,17 +438,8 @@ config TARGET_SMDKC100
 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_SUNXI
+	bool "Support sunxi"
 
 config TARGET_SNOWBALL
 	bool "Support snowball"
board/sunxi/Kconfig +19 -2
index c4b3167..6e9308d 100644
@@ -1,11 +1,28 @@
+if TARGET_SUNXI
+
+choice
+	prompt "Sunxi SoC"
+
+config TARGET_SUN4I
+	bool "sun4i family"
+
+config TARGET_SUN5I
+	bool "sun5i family"
+
+config TARGET_SUN6I
+	bool "sun6i family"
+
+config TARGET_SUN7I
+	bool "sun7i family"
+
+endchoice
+
 config SYS_CONFIG_NAME
 	default "sun4i" if TARGET_SUN4I
 	default "sun5i" if TARGET_SUN5I
 	default "sun6i" if TARGET_SUN6I
 	default "sun7i" if TARGET_SUN7I
 
-if TARGET_SUN4I || TARGET_SUN5I || TARGET_SUN6I || TARGET_SUN7I
-
 config SYS_CPU
 	default "armv7"
 
configs/A10-OLinuXino-Lime_defconfig +1 -0
index f992293..35cc2ca 100644
@@ -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_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN4I=y
configs/A10s-OLinuXino-M_defconfig +1 -0
index a578c06..2ab8d3e 100644
@@ -2,4 +2,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_FDTFILE="sun5i-a10s-olinuxino-micro.dtb"
 +S:CONFIG_ARM=y
++S:CONFIG_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN5I=y
configs/A13-OLinuXinoM_defconfig +1 -0
index 9ae7b12..5fb3556 100644
@@ -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_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN5I=y
configs/A13-OLinuXino_defconfig +1 -0
index 2c726f3..3632f95 100644
@@ -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_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN5I=y
configs/A20-OLinuXino-Lime_defconfig +1 -0
index ca79fd5..2317d1f 100644
@@ -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_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN7I=y
configs/A20-OLinuXino_MICRO_defconfig +1 -0
index 20a947c..ca68a9f 100644
@@ -2,4 +2,5 @@ CONFIG_SPL=y
 CONFIG_SYS_EXTRA_OPTIONS="A20_OLINUXINO_M,AXP209_POWER,SUNXI_GMAC,AHCI,SATAPWR=SUNXI_GPB(8),USB_EHCI"
 CONFIG_FDTFILE="sun7i-a20-olinuxino-micro.dtb"
 +S:CONFIG_ARM=y
++S:CONFIG_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN7I=y
configs/Auxtek-T004_defconfig +1 -0
index ed06f57..bc2e8f3 100644
@@ -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_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN5I=y
configs/Bananapi_defconfig +1 -0
index d59cf72..062bd02 100644
@@ -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_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN7I=y
configs/Cubieboard2_FEL_defconfig +1 -0
index 353b04a..967be18 100644
@@ -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_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN7I=y
configs/Cubieboard2_defconfig +1 -0
index 11a0c5f..b7947fb 100644
@@ -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_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN7I=y
configs/Cubieboard_defconfig +1 -0
index 8c1ff95..f4b93cf 100644
@@ -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_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN4I=y
configs/Cubietruck_FEL_defconfig +1 -0
index 23c5efb..1cda577 100644
@@ -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_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN7I=y
configs/Cubietruck_defconfig +1 -0
index 1389f21..6c9a530 100644
@@ -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_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN7I=y
configs/Linksprite_pcDuino3_defconfig +1 -0
index efc5301..1178f5b 100644
@@ -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_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN7I=y
configs/Mele_A1000G_defconfig +1 -0
index 06c4cac..1095b4b 100644
@@ -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_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN4I=y
configs/Mele_A1000_defconfig +1 -0
index d386c79..1d5d0cd 100644
@@ -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_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN4I=y
configs/Mini-X-1Gb_defconfig +1 -0
index 5db4aa3..b40bde4 100644
@@ -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_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN4I=y
configs/Mini-X_defconfig +1 -0
index 6718dcb..c0f645e 100644
@@ -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_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN4I=y
configs/ba10_tv_box_defconfig +1 -0
index 6f64875..bd46520 100644
@@ -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_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN4I=y
configs/i12-tvbox_defconfig +1 -0
index 2ef0f91..71c04f9 100644
@@ -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_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN7I=y
configs/qt840a_defconfig +1 -0
index a8d4bb8..03bbe6d 100644
@@ -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_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN7I=y
configs/r7-tv-dongle_defconfig +1 -0
index 6aba942..49c0fb4 100644
@@ -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_TARGET_SUNXI=y
 +S:CONFIG_TARGET_SUN5I=y
#15 lore raw

PATCH 3/3 sunxi: Kconfig: Make SPL_FEL a toplevel Kconfig option

In reply to Ian Campbell

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.

---
 board/sunxi/Kconfig               | 4 ++++
 configs/Cubieboard2_FEL_defconfig | 3 ++-
 configs/Cubietruck_FEL_defconfig  | 3 ++-
 3 files changed, 8 insertions(+), 2 deletions(-)
board/sunxi/Kconfig +4 -0
index 6e9308d..f467ade 100644
@@ -32,6 +32,10 @@ config SYS_BOARD
 config SYS_SOC
 	default "sunxi"
 
+config SPL_FEL
+	bool "SPL/FEL mode support"
+	default n
+
 config FDTFILE
 	string "Default fdtfile env setting for this board"
 
configs/Cubieboard2_FEL_defconfig +2 -1
index 967be18..8d68275 100644
@@ -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_TARGET_SUNXI=y
configs/Cubietruck_FEL_defconfig +2 -1
index 1cda577..64fbc34 100644
@@ -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_TARGET_SUNXI=y
Signature · 1 line
2.1.0
#16 lore raw

PATCH 3/3 sunxi: Kconfig: Make SPL_FEL a toplevel Kconfig option

Hi,

Quoted 20 lines · Ian Campbell

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.

---
 board/sunxi/Kconfig               | 4 ++++
 configs/Cubieboard2_FEL_defconfig | 3 ++-
 configs/Cubietruck_FEL_defconfig  | 3 ++-
 3 files changed, 8 insertions(+), 2 deletions(-)
board/sunxi/Kconfig +0 -0
index 6e9308d..f467ade 100644

board/sunxi/Kconfig config SYS_BOARD · line 41

Quoted 10 lines
board/sunxi/Kconfig +4 -0
@@ -32,6 +32,10 @@ config SYS_BOARD
 config SYS_SOC
 	default "sunxi"
 
+config SPL_FEL
+	bool "SPL/FEL mode support"
+	default n
+
 config FDTFILE
 	string "Default fdtfile env setting for this board"
 

Ack to this bit.

Quoted 18 lines
configs/Cubieboard2_FEL_defconfig +2 -1
index 967be18..8d68275 100644
@@ -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_TARGET_SUNXI=y
configs/Cubietruck_FEL_defconfig +0 -0
index 1cda577..64fbc34 100644

configs/Cubietruck_FEL_defconfig line 6

Quoted 7 lines
configs/Cubietruck_FEL_defconfig +2 -1
@@ -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_TARGET_SUNXI=y

But not do this but, I don't see how these 2 are so special that they have to get a FEL version of the defconfig, where others do not. I was planning to do a similar patch (but have not gotten around to it), but my plan was to simply remove these 2 defconfigs then.

This is:

With the 2 FEL defconfigs completely removed. If you disagree with removing them, this is going to need some more discussion :)

Regards,

Hans

#17 lore raw

PATCH 3/3 sunxi: Kconfig: Make SPL_FEL a toplevel Kconfig option

Quoted 2 lines · Hans de Goede

With the 2 FEL defconfigs completely removed. If you disagree with removing them, this is going to need some more discussion :)

I think they should be removed but in a separate patch, rather than mixing two changes in this one. I'll add such a patch to the next version.

Ian.

#18 lore raw

PATCH 3/3 sunxi: Kconfig: Make SPL_FEL a toplevel Kconfig option

Hi,

Quoted 7 lines · Ian Campbell
Quoted 2 lines · Hans de Goede

With the 2 FEL defconfigs completely removed. If you disagree with removing them, this is going to need some more discussion :)

I think they should be removed but in a separate patch, rather than mixing two changes in this one. I'll add such a patch to the next version.

Ok, that works for me.

Regards,

Hans

#19 lore raw

cover sunxi: Kconfig consolidation and cleanup

In reply to Ian Campbell
Quoted 3 lines · Ian Campbell

Probably the board [...] selection could be moved out without any dependencies, although the board one in particular will be quite a big patch I think it would be worth it.

On the topic of board selection which way round should the SoC vs. board options be arrange? Should we have invisible TARGET_SUN?I options which are selected by each board, or should we have the boards depend on the appropriate TARGET?

In the first case a user would need to choose from a pretty long list of boards, in the second case they would need to know which SoC the board has.

I'm leaning towards the first.

I don't think either would be an impediment to an eventually single common binary which I'm imagining would appear as a "Generic board" option which depends/selects all appropriate SoCs.

Ian.

#20 lore raw

cover sunxi: Kconfig consolidation and cleanup

Hi Ian,

Quoted 10 lines · On Sat, 04 Oct 2014 10:32:04 +0100 Ian Campbell <[email protected]> wrote:
Quoted 3 lines · Ian Campbell

Probably the board [...] selection could be moved out without any dependencies, although the board one in particular will be quite a big patch I think it would be worth it.

On the topic of board selection which way round should the SoC vs. board options be arrange? Should we have invisible TARGET_SUN?I options which are selected by each board, or should we have the boards depend on the appropriate TARGET?

Quoted 5 lines

In the first case a user would need to choose from a pretty long list of boards, in the second case they would need to know which SoC the board has.

I'm leaning towards the first.

Either would work, but as for Tegra, the second one has been chosen.

Architecture select (CONFIG_ARCH)

     -> Tegra Platform (CONFIG_TEGRA)
         -> Tegra SoC select (CONFIG_TEGRA20 / 30 / 114 / 124)
             -> Board select
Quoted 3 lines

I don't think either would be an impediment to an eventually single common binary which I'm imagining would appear as a "Generic board" option which depends/selects all appropriate SoCs.

Best Regards
Masahiro Yamada

#21 lore raw

cover sunxi: Kconfig consolidation and cleanup

Quoted 15 lines · Masahiro Yamada

Hi Ian,

Quoted 10 lines · On Sat, 04 Oct 2014 10:32:04 +0100 Ian Campbell <[email protected]> wrote:
Quoted 3 lines · Ian Campbell

Probably the board [...] selection could be moved out without any dependencies, although the board one in particular will be quite a big patch I think it would be worth it.

On the topic of board selection which way round should the SoC vs. board options be arrange? Should we have invisible TARGET_SUN?I options which are selected by each board, or should we have the boards depend on the appropriate TARGET?

Quoted 8 lines
Quoted 5 lines

In the first case a user would need to choose from a pretty long list of boards, in the second case they would need to know which SoC the board has.

I'm leaning towards the first.

Either would work, but as for Tegra, the second one has been chosen.

Thanks. I think global consistency is a worthwhile goal, so sunxi should follow the same pattern.

Quoted 21 lines

Architecture select (CONFIG_ARCH)

     -> Tegra Platform (CONFIG_TEGRA)
         -> Tegra SoC select (CONFIG_TEGRA20 / 30 / 114 / 124)
             -> Board select
Quoted 3 lines

I don't think either would be an impediment to an eventually single common binary which I'm imagining would appear as a "Generic board" option which depends/selects all appropriate SoCs.

Best Regards
Masahiro Yamada