All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2 1/6] sunxi: add invisible options for PRCM and RSB support
@ 2017-02-25 23:52 Icenowy Zheng
  2017-02-25 23:52 ` [U-Boot] [PATCH v2 2/6] sunxi: support RSB on A64 Icenowy Zheng
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Icenowy Zheng @ 2017-02-25 23:52 UTC (permalink / raw)
  To: u-boot

The Makefile of mach-sunxi used to build PRCM and RSB according to the
SoC's MACH_SUNxI macro, which makes it needed to add lines for new SoC
generation.

Change this behavior to invisible options in sunxi Kconfig, so that new
lines are not needed for new SoC. Also it allows more accurate control
of the build of the related sources, for example, V3s (sun8iw8) and R40
(sun8iw11) do not have PRCM at all, and H3 (sun8iw7) do not have RSB,
but these functions are built with the old code.

Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
---
 arch/arm/mach-sunxi/Makefile |  7 ++-----
 board/sunxi/Kconfig          | 22 ++++++++++++++++++++++
 2 files changed, 24 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-sunxi/Makefile b/arch/arm/mach-sunxi/Makefile
index 7daba1169c..a8bf3a6c64 100644
--- a/arch/arm/mach-sunxi/Makefile
+++ b/arch/arm/mach-sunxi/Makefile
@@ -16,12 +16,9 @@ obj-y	+= pinmux.o
 ifndef CONFIG_MACH_SUN9I
 obj-y	+= usb_phy.o
 endif
-obj-$(CONFIG_MACH_SUN6I)	+= prcm.o
-obj-$(CONFIG_MACH_SUN8I)	+= prcm.o
-obj-$(CONFIG_MACH_SUN9I)	+= prcm.o
+obj-$(CONFIG_SUNXI_HAS_PRCM)	+= prcm.o
 obj-$(CONFIG_MACH_SUN6I)	+= p2wi.o
-obj-$(CONFIG_MACH_SUN8I)	+= rsb.o
-obj-$(CONFIG_MACH_SUN9I)	+= rsb.o
+obj-$(CONFIG_SUNXI_HAS_RSB)	+= rsb.o
 obj-$(CONFIG_MACH_SUN4I)	+= clock_sun4i.o
 obj-$(CONFIG_MACH_SUN5I)	+= clock_sun4i.o
 obj-$(CONFIG_MACH_SUN6I)	+= clock_sun6i.o
diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig
index 37b42521a4..acd2bebcdb 100644
--- a/board/sunxi/Kconfig
+++ b/board/sunxi/Kconfig
@@ -42,6 +42,18 @@ config SUNXI_GEN_SUN6I
 	separate ahb reset control registers, custom pmic bus, new style
 	watchdog, etc.
 
+config SUNXI_HAS_PRCM
+	bool
+	---help---
+	Select this for sunxi SoCs which have PRCM part, which is
+	sometimes also called "CPUs" part.
+
+config SUNXI_HAS_RSB
+	bool
+	depends on SUNXI_HAS_PRCM
+	---help---
+	Select this for sunxi SoCs which have RSB (Reduced Serial Bus)
+	support.
 
 choice
 	prompt "Sunxi SoC Variant"
@@ -67,6 +79,7 @@ config MACH_SUN6I
 	select ARCH_SUPPORT_PSCI
 	select SUNXI_GEN_SUN6I
 	select SUPPORT_SPL
+	select SUNXI_HAS_PRCM
 	select ARMV7_BOOT_SEC_DEFAULT if OLD_SUNXI_KERNEL_COMPAT
 
 config MACH_SUN7I
@@ -87,6 +100,8 @@ config MACH_SUN8I_A23
 	select ARCH_SUPPORT_PSCI
 	select SUNXI_GEN_SUN6I
 	select SUPPORT_SPL
+	select SUNXI_HAS_PRCM
+	select SUNXI_HAS_RSB
 	select ARMV7_BOOT_SEC_DEFAULT if OLD_SUNXI_KERNEL_COMPAT
 
 config MACH_SUN8I_A33
@@ -97,6 +112,8 @@ config MACH_SUN8I_A33
 	select ARCH_SUPPORT_PSCI
 	select SUNXI_GEN_SUN6I
 	select SUPPORT_SPL
+	select SUNXI_HAS_PRCM
+	select SUNXI_HAS_RSB
 	select ARMV7_BOOT_SEC_DEFAULT if OLD_SUNXI_KERNEL_COMPAT
 
 config MACH_SUN8I_A83T
@@ -104,6 +121,8 @@ config MACH_SUN8I_A83T
 	select CPU_V7
 	select SUNXI_GEN_SUN6I
 	select SUPPORT_SPL
+	select SUNXI_HAS_PRCM
+	select SUNXI_HAS_RSB
 
 config MACH_SUN8I_H3
 	bool "sun8i (Allwinner H3)"
@@ -113,6 +132,7 @@ config MACH_SUN8I_H3
 	select ARCH_SUPPORT_PSCI
 	select SUNXI_GEN_SUN6I
 	select SUPPORT_SPL
+	select SUNXI_HAS_PRCM
 	select ARMV7_BOOT_SEC_DEFAULT if OLD_SUNXI_KERNEL_COMPAT
 
 config MACH_SUN9I
@@ -120,6 +140,8 @@ config MACH_SUN9I
 	select CPU_V7
 	select SUNXI_GEN_SUN6I
 	select SUPPORT_SPL
+	select SUNXI_HAS_PRCM
+	select SUNXI_HAS_RSB
 
 config MACH_SUN50I
 	bool "sun50i (Allwinner A64)"
-- 
2.11.1

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

end of thread, other threads:[~2017-03-01 10:36 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-25 23:52 [U-Boot] [PATCH v2 1/6] sunxi: add invisible options for PRCM and RSB support Icenowy Zheng
2017-02-25 23:52 ` [U-Boot] [PATCH v2 2/6] sunxi: support RSB on A64 Icenowy Zheng
2017-02-25 23:52 ` [U-Boot] [PATCH v2 3/6] sunxi: add AXP_PMIC_BUS invisible options for AXP PMICs access Icenowy Zheng
2017-03-01 10:36   ` Jagan Teki
2017-02-25 23:52 ` [U-Boot] [PATCH v2 4/6] sunxi: fix an error when setting DLDO on AXP818 Icenowy Zheng
2017-02-27  3:40   ` [U-Boot] [linux-sunxi] " Chen-Yu Tsai
2017-02-25 23:52 ` [U-Boot] [PATCH v2 5/6] sunxi: add AXP803 support based on AXP818 code Icenowy Zheng
2017-02-25 23:52 ` [U-Boot] [PATCH v2 6/6] sunxi: enable DC1SW in Pine64+ defconfig Icenowy Zheng
2017-03-01 10:30 ` [U-Boot] [PATCH v2 1/6] sunxi: add invisible options for PRCM and RSB support Jagan Teki

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.