[PATCH 01/32] arm64: Add platform selection for BCM2835.

Subsystems: arm port, arm64 port (aarch64 architecture), broadcom bcm281xx/bcm11xxx/bcm216xx arm architecture, the rest

STALE3751d

9 messages, 5 authors, 2016-06-02 · open the first message on its own page

[PATCH 01/32] arm64: Add platform selection for BCM2835.

From: Gerd Hoffmann <kraxel@redhat.com>
Date: 2016-06-01 21:43:56

From: Eric Anholt <redacted>

Signed-off-by: Eric Anholt <redacted>

[ kraxel: copy some selects from arm to arm64 ]
[ kraxel: add CONFIG_ARCH_BCM, needed for some "depends on ARCH_BCM" ]

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 arch/arm/mach-bcm/Kconfig    |  2 +-
 arch/arm64/Kconfig.platforms | 20 ++++++++++++++++++++
 2 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig
index 68ab641..21f0e43 100644
--- a/arch/arm/mach-bcm/Kconfig
+++ b/arch/arm/mach-bcm/Kconfig
@@ -136,7 +136,7 @@ comment "Other Architectures"
 
 config ARCH_BCM2835
 	bool "Broadcom BCM2835 family"
-	depends on ARCH_MULTI_V6 || ARCH_MULTI_V7
+	depends on ARCH_MULTI_V6 || ARCH_MULTI_V7 || ARM64
 	select ARCH_REQUIRE_GPIOLIB
 	select ARM_AMBA
 	select ARM_ERRATA_411920 if ARCH_MULTI_V6
diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms
index 7ef1d05..32aba6b 100644
--- a/arch/arm64/Kconfig.platforms
+++ b/arch/arm64/Kconfig.platforms
@@ -13,8 +13,28 @@ config ARCH_ALPINE
 	  This enables support for the Annapurna Labs Alpine
 	  Soc family.
 
+config ARCH_BCM
+	bool "Broadcom SoC Support"
+	help
+	  This enables support for Broadcom ARM based SoC chips
+
+config ARCH_BCM2835
+	bool "Broadcom BCM2835 family"
+	depends on ARCH_BCM
+	select ARCH_REQUIRE_GPIOLIB
+	select CLKSRC_OF
+	select PINCTRL
+	select PINCTRL_BCM2835
+	select ARM_AMBA
+	select ARM_TIMER_SP804
+	select HAVE_ARM_ARCH_TIMER
+	help
+	  This enables support for the Broadcom BCM2837 SoC.
+	  This SoC is used in the Raspberry Pi 3 device.
+
 config ARCH_BCM_IPROC
 	bool "Broadcom iProc SoC Family"
+	depends on ARCH_BCM
 	select COMMON_CLK_IPROC
 	select PINCTRL
 	select ARCH_REQUIRE_GPIOLIB
-- 
1.8.3.1

Re: [PATCH 01/32] arm64: Add platform selection for BCM2835.

From: Florian Fainelli <f.fainelli@gmail.com>
Date: 2016-06-01 21:50:01

On 06/01/2016 02:43 PM, Gerd Hoffmann wrote:
quoted hunk
From: Eric Anholt <redacted>

Signed-off-by: Eric Anholt <redacted>

[ kraxel: copy some selects from arm to arm64 ]
[ kraxel: add CONFIG_ARCH_BCM, needed for some "depends on ARCH_BCM" ]

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 arch/arm/mach-bcm/Kconfig    |  2 +-
 arch/arm64/Kconfig.platforms | 20 ++++++++++++++++++++
 2 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig
index 68ab641..21f0e43 100644
--- a/arch/arm/mach-bcm/Kconfig
+++ b/arch/arm/mach-bcm/Kconfig
@@ -136,7 +136,7 @@ comment "Other Architectures"
 
 config ARCH_BCM2835
 	bool "Broadcom BCM2835 family"
-	depends on ARCH_MULTI_V6 || ARCH_MULTI_V7
+	depends on ARCH_MULTI_V6 || ARCH_MULTI_V7 || ARM64
Humm, what does that achieve?
quoted hunk
 	select ARCH_REQUIRE_GPIOLIB
 	select ARM_AMBA
 	select ARM_ERRATA_411920 if ARCH_MULTI_V6
diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms
index 7ef1d05..32aba6b 100644
--- a/arch/arm64/Kconfig.platforms
+++ b/arch/arm64/Kconfig.platforms
@@ -13,8 +13,28 @@ config ARCH_ALPINE
 	  This enables support for the Annapurna Labs Alpine
 	  Soc family.
 
+config ARCH_BCM
+	bool "Broadcom SoC Support"
+	help
+	  This enables support for Broadcom ARM based SoC chips
menuconfig maybe?
+
+config ARCH_BCM2835
+	bool "Broadcom BCM2835 family"
+	depends on ARCH_BCM
+	select ARCH_REQUIRE_GPIOLIB
+	select CLKSRC_OF
+	select PINCTRL
+	select PINCTRL_BCM2835
+	select ARM_AMBA
+	select ARM_TIMER_SP804
+	select HAVE_ARM_ARCH_TIMER
+	help
+	  This enables support for the Broadcom BCM2837 SoC.
+	  This SoC is used in the Raspberry Pi 3 device.
+
 config ARCH_BCM_IPROC
 	bool "Broadcom iProc SoC Family"
+	depends on ARCH_BCM
Does not seem necessary nor adding anything here.
-- 
Florian

Re: [PATCH 01/32] arm64: Add platform selection for BCM2835.

From: Gerd Hoffmann <kraxel@redhat.com>
Date: 2016-06-02 06:45:42

quoted
 config ARCH_BCM2835
 	bool "Broadcom BCM2835 family"
-	depends on ARCH_MULTI_V6 || ARCH_MULTI_V7
+	depends on ARCH_MULTI_V6 || ARCH_MULTI_V7 || ARM64
Humm, what does that achieve?
Nothing ;)

Slipped through unnoticed, I'll drop it.
quoted
+config ARCH_BCM
+	bool "Broadcom SoC Support"
+	help
+	  This enables support for Broadcom ARM based SoC chips
menuconfig maybe?
There isn't any in arch/arm64/Kconfig.platforms right now, so I didn't
feel like introducing one.  Also the dependency should have pretty much
the same effect ...
quoted
+config ARCH_BCM2835
+	bool "Broadcom BCM2835 family"
+	depends on ARCH_BCM
+	select ARCH_REQUIRE_GPIOLIB
+	select CLKSRC_OF
+	select PINCTRL
+	select PINCTRL_BCM2835
+	select ARM_AMBA
+	select ARM_TIMER_SP804
+	select HAVE_ARM_ARCH_TIMER
+	help
+	  This enables support for the Broadcom BCM2837 SoC.
+	  This SoC is used in the Raspberry Pi 3 device.
+
 config ARCH_BCM_IPROC
 	bool "Broadcom iProc SoC Family"
+	depends on ARCH_BCM
Does not seem necessary nor adding anything here.
Added for consistency.  When we add ARCH_BCM all ARCH_BCM_* should
depend on it ...

We could also do it the other way around: make ARCH_BCM a hidden bool
and have ARCH_BCM_* select it.

cheers,
  Gerd

Re: [PATCH 01/32] arm64: Add platform selection for BCM2835.

From: Ray Jui <hidden>
Date: 2016-06-02 16:25:25


On 6/1/2016 11:45 PM, Gerd Hoffmann wrote:
quoted
quoted
 config ARCH_BCM2835
 	bool "Broadcom BCM2835 family"
-	depends on ARCH_MULTI_V6 || ARCH_MULTI_V7
+	depends on ARCH_MULTI_V6 || ARCH_MULTI_V7 || ARM64
Humm, what does that achieve?
Nothing ;)

Slipped through unnoticed, I'll drop it.
quoted
quoted
+config ARCH_BCM
+	bool "Broadcom SoC Support"
+	help
+	  This enables support for Broadcom ARM based SoC chips
menuconfig maybe?
There isn't any in arch/arm64/Kconfig.platforms right now, so I didn't
feel like introducing one.  Also the dependency should have pretty much
the same effect ...
quoted
quoted
+config ARCH_BCM2835
+	bool "Broadcom BCM2835 family"
+	depends on ARCH_BCM
+	select ARCH_REQUIRE_GPIOLIB
+	select CLKSRC_OF
+	select PINCTRL
+	select PINCTRL_BCM2835
+	select ARM_AMBA
+	select ARM_TIMER_SP804
+	select HAVE_ARM_ARCH_TIMER
+	help
+	  This enables support for the Broadcom BCM2837 SoC.
+	  This SoC is used in the Raspberry Pi 3 device.
+
 config ARCH_BCM_IPROC
 	bool "Broadcom iProc SoC Family"
+	depends on ARCH_BCM
Does not seem necessary nor adding anything here.
Added for consistency.  When we add ARCH_BCM all ARCH_BCM_* should
depend on it ...

We could also do it the other way around: make ARCH_BCM a hidden bool
and have ARCH_BCM_* select it.
Yes, this is probably better.

ARCH_BCM_IPROC is currently enabled in arch/arm64/configs/defconfig. By 
adding a dependency here without enabling ARCH_BCM in arm64 defconfig, 
this effectively disables ARCH_BCM_IPROC from arm64 defconfig.
cheers,
  Gerd

Re: [PATCH 01/32] arm64: Add platform selection for BCM2835.

From: Scott Branden <scott.branden@broadcom.com>
Date: 2016-06-02 16:48:31

Reply inline.

On 16-06-02 09:25 AM, Ray Jui wrote:

On 6/1/2016 11:45 PM, Gerd Hoffmann wrote:
quoted
quoted
quoted
 config ARCH_BCM2835
     bool "Broadcom BCM2835 family"
-    depends on ARCH_MULTI_V6 || ARCH_MULTI_V7
+    depends on ARCH_MULTI_V6 || ARCH_MULTI_V7 || ARM64
Humm, what does that achieve?
Nothing ;)

Slipped through unnoticed, I'll drop it.
quoted
quoted
+config ARCH_BCM
+    bool "Broadcom SoC Support"
+    help
+      This enables support for Broadcom ARM based SoC chips
menuconfig maybe?
There isn't any in arch/arm64/Kconfig.platforms right now, so I didn't
feel like introducing one.  Also the dependency should have pretty much
the same effect .
No need to add ARCH_BCM
.
quoted
quoted
quoted
+config ARCH_BCM2835
+    bool "Broadcom BCM2835 family"
+    depends on ARCH_BCM
+    select ARCH_REQUIRE_GPIOLIB
+    select CLKSRC_OF
+    select PINCTRL
+    select PINCTRL_BCM2835
+    select ARM_AMBA
+    select ARM_TIMER_SP804
+    select HAVE_ARM_ARCH_TIMER
+    help
+      This enables support for the Broadcom BCM2837 SoC.
+      This SoC is used in the Raspberry Pi 3 device.
+
 config ARCH_BCM_IPROC
     bool "Broadcom iProc SoC Family"
+    depends on ARCH_BCM
Does not seem necessary nor adding anything here.
Added for consistency.  When we add ARCH_BCM all ARCH_BCM_* should
depend on it ...

We could also do it the other way around: make ARCH_BCM a hidden bool
and have ARCH_BCM_* select it.
Yes, this is probably better.

ARCH_BCM_IPROC is currently enabled in arch/arm64/configs/defconfig. By
adding a dependency here without enabling ARCH_BCM in arm64 defconfig,
this effectively disables ARCH_BCM_IPROC from arm64 defconfig.
There is no need to add ARCH_BCM though?
quoted
cheers,
  Gerd

Re: [PATCH 01/32] arm64: Add platform selection for BCM2835.

From: Gerd Hoffmann <kraxel@redhat.com>
Date: 2016-06-02 17:12:53

There is no need to add ARCH_BCM though?
There are Makefile(s) with

obj-$(CONFIG_ARCH_BCM)          += bcm/

in drivers/pinctrl for example, maybe more, didn't check the whole tree.

So without ARCH_BCM some drivers are dropped from the build ...

cheers,
  Gerd

Re: [PATCH 01/32] arm64: Add platform selection for BCM2835.

From: Scott Branden <scott.branden@broadcom.com>
Date: 2016-06-02 17:22:09


On 16-06-02 10:12 AM, Gerd Hoffmann wrote:
quoted
There is no need to add ARCH_BCM though?
There are Makefile(s) with

obj-$(CONFIG_ARCH_BCM)          += bcm/

in drivers/pinctrl for example, maybe more, didn't check the whole tree.

So without ARCH_BCM some drivers are dropped from the build ...
I see that now.  Quite bizarre how the NS2 pinctl driver (used on a 
arm64 SoC) gets built right now....

Yes, adding the select with hidden option seems like what needs to be 
done.  The ARM Maintainers did not like multi-level ARCH_BCM being added 
in the arm64 Kconfig previously so we dropped it.
cheers,
   Gerd
Thanks,
  Scott

Re: [PATCH 01/32] arm64: Add platform selection for BCM2835.

From: Catalin Marinas <catalin.marinas@arm.com>
Date: 2016-06-02 17:31:03

On Thu, Jun 02, 2016 at 08:45:36AM +0200, Gerd Hoffmann wrote:
quoted
quoted
+config ARCH_BCM2835
+	bool "Broadcom BCM2835 family"
+	depends on ARCH_BCM
+	select ARCH_REQUIRE_GPIOLIB
+	select CLKSRC_OF
+	select PINCTRL
+	select PINCTRL_BCM2835
+	select ARM_AMBA
+	select ARM_TIMER_SP804
+	select HAVE_ARM_ARCH_TIMER
+	help
+	  This enables support for the Broadcom BCM2837 SoC.
+	  This SoC is used in the Raspberry Pi 3 device.
+
 config ARCH_BCM_IPROC
 	bool "Broadcom iProc SoC Family"
+	depends on ARCH_BCM
Does not seem necessary nor adding anything here.
Added for consistency.  When we add ARCH_BCM all ARCH_BCM_* should
depend on it ...
For arm64, I prefer to keep Kconfig.platforms to SoC families only. I
don't think we have any single-SoC Kconfig entry left now.

-- 
Catalin

Re: [PATCH 01/32] arm64: Add platform selection for BCM2835.

From: Florian Fainelli <f.fainelli@gmail.com>
Date: 2016-06-02 17:36:35

On 06/02/2016 10:21 AM, Scott Branden wrote:

On 16-06-02 10:12 AM, Gerd Hoffmann wrote:
quoted
quoted
There is no need to add ARCH_BCM though?
There are Makefile(s) with

obj-$(CONFIG_ARCH_BCM)          += bcm/

in drivers/pinctrl for example, maybe more, didn't check the whole tree.

So without ARCH_BCM some drivers are dropped from the build ...
I see that now.  Quite bizarre how the NS2 pinctl driver (used on a
arm64 SoC) gets built right now....

Yes, adding the select with hidden option seems like what needs to be
done.  The ARM Maintainers did not like multi-level ARCH_BCM being added
in the arm64 Kconfig previously so we dropped it.
We should always recusrse into that directory and build the respective
pinctrl drivers within drivers/pinctrl/bcm, only for the enabled
platforms, it makes no sense to have this kind of config symbol gating that.

I can submit a patch doing just that unless somebody wants to do it as
part of this patch series.
-- 
Florian
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help