sunxi: Kconfig consolidation and cleanup
Subsystems (5)
v2 cover sunxi: Kconfig consolidation and cleanup
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 ;-)
MAKEALL +5 -0
@@ -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
PATCH v2 1/7 sunxi: kconfig: Add top-level ARCH_SUNXI
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/*
---
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(-)
arch/arm/Kconfig +2 -14
@@ -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"
board/sunxi/Kconfig +21 -1
@@ -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
configs/A10-OLinuXino-Lime_defconfig +1 -0
@@ -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
configs/A10s-OLinuXino-M_defconfig +1 -0
@@ -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
configs/A13-OLinuXinoM_defconfig +1 -0
@@ -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
configs/A13-OLinuXino_defconfig +1 -0
@@ -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
configs/A20-OLinuXino-Lime2_defconfig +1 -0
@@ -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
configs/A20-OLinuXino-Lime_defconfig +1 -0
@@ -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
configs/A20-OLinuXino_MICRO_defconfig +1 -0
@@ -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
configs/Auxtek-T004_defconfig +1 -0
@@ -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
configs/Bananapi_defconfig +1 -0
@@ -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
configs/Colombus_defconfig +1 -0
@@ -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"
configs/Cubieboard2_FEL_defconfig +1 -0
@@ -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
configs/Cubieboard2_defconfig +1 -0
@@ -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
configs/Cubieboard_defconfig +1 -0
@@ -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
configs/Cubietruck_FEL_defconfig +1 -0
@@ -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
configs/Cubietruck_defconfig +1 -0
@@ -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
configs/Ippo_q8h_v5_defconfig +1 -0
@@ -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"
configs/Linksprite_pcDuino3_defconfig +1 -0
@@ -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
configs/Mele_A1000G_defconfig +1 -0
@@ -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
configs/Mele_A1000_defconfig +1 -0
@@ -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
configs/Mele_M3_defconfig +1 -0
@@ -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
configs/Mini-X-1Gb_defconfig +1 -0
@@ -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
configs/Mini-X_defconfig +1 -0
@@ -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
configs/ba10_tv_box_defconfig +1 -0
@@ -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
configs/i12-tvbox_defconfig +1 -0
@@ -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
configs/qt840a_defconfig +1 -0
@@ -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
configs/r7-tv-dongle_defconfig +1 -0
@@ -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
Signature · 1 line
2.1.0
PATCH v2 2/7 sunxi: kconfig: Rename TARGET_SUN[45678]I to MACH_SUN[45678]I.
In reply to Ian CampbellNow 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)
---
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(-)
board/sunxi/Kconfig +10 -10
@@ -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"
configs/A10-OLinuXino-Lime_defconfig +1 -1
@@ -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
configs/A10s-OLinuXino-M_defconfig +1 -1
@@ -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
configs/A13-OLinuXinoM_defconfig +1 -1
@@ -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
configs/A13-OLinuXino_defconfig +1 -1
@@ -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
configs/A20-OLinuXino-Lime2_defconfig +1 -1
@@ -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
configs/A20-OLinuXino-Lime_defconfig +1 -1
@@ -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
configs/A20-OLinuXino_MICRO_defconfig +1 -1
@@ -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
configs/Auxtek-T004_defconfig +1 -1
@@ -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
configs/Bananapi_defconfig +1 -1
@@ -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
configs/Colombus_defconfig +1 -1
@@ -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"
configs/Cubieboard2_FEL_defconfig +1 -1
@@ -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
configs/Cubieboard2_defconfig +1 -1
@@ -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
configs/Cubieboard_defconfig +1 -1
@@ -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
configs/Cubietruck_FEL_defconfig +1 -1
@@ -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
configs/Cubietruck_defconfig +1 -1
@@ -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
configs/Ippo_q8h_v5_defconfig +1 -1
@@ -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"
configs/Linksprite_pcDuino3_defconfig +1 -1
@@ -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
configs/Mele_A1000G_defconfig +1 -1
@@ -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
configs/Mele_A1000_defconfig +1 -1
@@ -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
configs/Mele_M3_defconfig +1 -1
@@ -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
configs/Mini-X-1Gb_defconfig +1 -1
@@ -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
configs/Mini-X_defconfig +1 -1
@@ -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
configs/ba10_tv_box_defconfig +1 -1
@@ -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
configs/i12-tvbox_defconfig +1 -1
@@ -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
configs/qt840a_defconfig +1 -1
@@ -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
configs/r7-tv-dongle_defconfig +1 -1
@@ -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
Signature · 1 line
2.1.0
PATCH v2 3/7 sunxi: Kconfig: Make SPL_FEL a toplevel Kconfig option
In reply to Ian CampbellIt'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.
---
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(-)
board/sunxi/Kconfig +5 -0
@@ -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"
configs/Cubieboard2_FEL_defconfig +2 -1
@@ -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
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_ARCH_SUNXI=y
Signature · 1 line
2.1.0
PATCH v2 4/7 sunxi: Use CONFIG_MACH_SUN?I from Kconfig instead of CONFIG_SUN?I
In reply to Ian CampbellMostly 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.
---
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(-)
arch/arm/cpu/armv7/sunxi/Makefile +10 -10
@@ -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
arch/arm/cpu/armv7/sunxi/board.c +10 -10
@@ -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 !definedCONFIG_SPL_BUILD && (definedCONFIG_SUN7I || \ - definedCONFIG_SUN6I || definedCONFIG_SUN8I ) +#if !definedCONFIG_SPL_BUILD && (definedCONFIG_MACH_SUN7I || \ + definedCONFIG_MACH_SUN6I || definedCONFIG_MACH_SUN8I )/* Enable SMP mode for CPU0, by setting bit 6 of Auxiliary Ctl reg */ asmvolatile ( "mrc p15, 0, r0, c1, c0, 1\n"
arch/arm/cpu/armv7/sunxi/clock_sun4i.c +1 -1
@@ -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);
arch/arm/cpu/armv7/sunxi/cpu_info.c +5 -5
@@ -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 definedCONFIG_SUN5I +#elif definedCONFIG_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_SUN6Iputs ("CPU: Allwinner A31 (SUN6I)\n" ); -#elif defined CONFIG_SUN7I +#elif defined CONFIG_MACH_SUN7Iputs ("CPU: Allwinner A20 (SUN7I)\n" ); -#elif defined CONFIG_SUN8I +#elif defined CONFIG_MACH_SUN8Iputs ("CPU: Allwinner A23 (SUN8I)\n" );#else #warning Please update cpu_info.c with correct CPU information
arch/arm/cpu/armv7/sunxi/dram.c +17 -17
@@ -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
arch/arm/include/asm/arch-sunxi/clock.h +1 -1
@@ -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>
arch/arm/include/asm/arch-sunxi/gpio.h +1 -1
@@ -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
arch/arm/include/asm/arch-sunxi/mmc.h +1 -1
@@ -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 */
arch/arm/include/asm/arch-sunxi/timer.h +2 -2
@@ -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
arch/arm/include/asm/arch-sunxi/watchdog.h +1 -1
@@ -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)
drivers/mmc/sunxi_mmc.c +2 -2
@@ -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 ;
drivers/usb/host/ehci-sunxi.c +1 -1
@@ -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 );
include/configs/sun4i.h +0 -1
@@ -11,7 +11,6 @@/* * A10 specific configuration */ -#define CONFIG_SUN4I /* sun4i SoC generation */ #define CONFIG_CLK_FULL_SPEED 1008000000#define CONFIG_SYS_PROMPT "sun4i# "
include/configs/sun5i.h +0 -1
@@ -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# "
include/configs/sun6i.h +0 -1
@@ -14,7 +14,6 @@/* * A31 specific configuration */ -#define CONFIG_SUN6I /* sun6i SoC generation */ #define CONFIG_SYS_PROMPT "sun6i# "
include/configs/sun7i.h +0 -1
@@ -12,7 +12,6 @@/* * A20 specific configuration */ -#define CONFIG_SUN7I /* sun7i SoC generation */ #define CONFIG_CLK_FULL_SPEED 912000000#define CONFIG_SYS_PROMPT "sun7i# "
include/configs/sun8i.h +0 -1
@@ -12,7 +12,6 @@/* * A23 specific configuration */ -#define CONFIG_SUN8I /* sun8i SoC generation */ #define CONFIG_SYS_PROMPT "sun8i# "/*
Signature · 1 line
2.1.0
PATCH v2 5/7 sunxi: Drop FEL variants of defconfigs.
In reply to Ian CampbellThis 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--- 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
configs/Cubieboard2_FEL_defconfig deleted +0 -7
@@ -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
configs/Cubietruck_FEL_defconfig deleted +0 -7
@@ -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
Signature · 1 line
2.1.0
PATCH v2 6/7 sunxi: kconfig: Introduce CONFIG_TARGET_<BOARD>
In reply to Ian CampbellThis 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
donedefconfigs 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.
---
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(-)
board/sunxi/Kconfig +101 -0
@@ -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"
board/sunxi/Makefile +22 -22
48 lines not on this page · raw message
configs/A10-OLinuXino-Lime_defconfig +2 -1
@@ -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
configs/A10s-OLinuXino-M_defconfig +2 -1
@@ -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
configs/A13-OLinuXinoM_defconfig +2 -1
@@ -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
configs/A13-OLinuXino_defconfig +2 -1
@@ -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
configs/A20-OLinuXino-Lime2_defconfig +2 -1
@@ -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
configs/A20-OLinuXino-Lime_defconfig +2 -1
@@ -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
configs/A20-OLinuXino_MICRO_defconfig +2 -1
@@ -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
configs/Auxtek-T004_defconfig +2 -1
@@ -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
configs/Bananapi_defconfig +2 -1
@@ -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
configs/Colombus_defconfig +1 -1
@@ -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"
configs/Cubieboard2_defconfig +2 -1
@@ -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
configs/Cubieboard_defconfig +2 -1
@@ -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
configs/Cubietruck_defconfig +2 -1
@@ -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
configs/Ippo_q8h_v5_defconfig +2 -1
@@ -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"
configs/Linksprite_pcDuino3_defconfig +2 -1
@@ -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
configs/Mele_A1000G_defconfig +2 -1
@@ -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
configs/Mele_A1000_defconfig +2 -1
@@ -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
configs/Mele_M3_defconfig +2 -1
@@ -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
configs/Mini-X-1Gb_defconfig +2 -1
@@ -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
configs/Mini-X_defconfig +2 -1
@@ -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
configs/ba10_tv_box_defconfig +2 -1
@@ -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
configs/i12-tvbox_defconfig +2 -1
@@ -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
configs/qt840a_defconfig +2 -1
@@ -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
configs/r7-tv-dongle_defconfig +2 -1
@@ -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
Signature · 1 line
2.1.0
PATCH v2 7/7 sunxi: kconfig: Add %_felconfig rule to enable FEL build of sunxi platforms.
In reply to Ian Campbell $ make BOARD_felconfig
is more convenient than
$ make BOARD_defconfig
$ echo CONFIG_SPL_FEL=y >> .config
$ echo CONFIG_SPL_FEL=y >> spl/.config---
v2: New patch.
Is this a good idea?
--- scripts/multiconfig.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+)
scripts/multiconfig.sh +12 -0
@@ -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;;
Signature · 1 line
2.1.0
PATCH v2 7/7 sunxi: kconfig: Add %_felconfig rule to enable FEL build of sunxi platforms.
Hi,
Quoted 11 lines · Ian Campbell
$ make BOARD_felconfig is more convenient than $ make BOARD_defconfig $ echo CONFIG_SPL_FEL=y >> .config $ echo CONFIG_SPL_FEL=y >> spl/.configSigned-off-by Ian Campbell <[email protected]>---
v2: New patch.Is this a good idea?
Yes!
All patches look good to me and are:
I've pushed this series to u-boot-sunxi/next
Regards,
Hans
Quoted 35 lines
--- scripts/multiconfig.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+)scripts/multiconfig.sh +12
-0@@ -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;;