diff mbox

[v5,1/6] ARM: cygnus: Initial support for Broadcom Cygnus SoC

Message ID 1413341936-17606-2-git-send-email-sbranden@broadcom.com (mailing list archive)
State New, archived
Headers show

Commit Message

Scott Branden Oct. 15, 2014, 2:58 a.m. UTC
From: Jonathan Richardson <jonathar@broadcom.com>

Adds initial support for the Cygnus SoC based on Broadcom’s iProc series.
Move ARCH_BCM_5301x under the ARCH_BCM_IPROC architecture.

Reviewed-by: Ray Jui <rjui@broadcom.com>
Reviewed-by: Desmond Liu <desmondl@broadcom.com>
Reviewed-by: JD (Jiandong) Zheng <jdzheng@broadcom.com>
Tested-by: Jonathan Richardson <jonathar@broadcom.com>
Signed-off-by: Scott Branden <sbranden@broadcom.com>
---
 arch/arm/mach-bcm/Kconfig      |   30 ++++++++++++++++++++++++++++++
 arch/arm/mach-bcm/Makefile     |    3 +++
 arch/arm/mach-bcm/bcm_cygnus.c |   26 ++++++++++++++++++++++++++
 3 files changed, 59 insertions(+)
 create mode 100644 arch/arm/mach-bcm/bcm_cygnus.c

Comments

Arnd Bergmann Oct. 20, 2014, 7:55 p.m. UTC | #1
On Tuesday 14 October 2014 19:58:51 Scott Branden wrote:
>  if ARCH_BCM
>  
> +menu "iProc SoC based Machine types"
> +       config ARCH_BCM_IPROC
> +               bool
> +               select ARM_GIC
> +               select CACHE_L2X0
> +               select HAVE_ARM_SCU if SMP
> +               select HAVE_ARM_TWD if SMP
> +               select ARM_GLOBAL_TIMER
> +
> +               select CLKSRC_MMIO
> +               select ARCH_REQUIRE_GPIOLIB
> +               select ARM_AMBA
> +               select PINCTRL
> +               help
> +                 This enables support for systems based on Broadcom IPROC architected SoCs.
> +                 The IPROC complex contains one or more ARM CPUs along with common
> +                 core periperals. Application specific SoCs are created by adding a
> +                 uArchitecture containing peripherals outside of the IPROC complex.
> +                 Currently supported SoCs are Cygnus.
> +
> +       config ARCH_BCM_CYGNUS
> +               bool "Broadcom Cygnus Support" if ARCH_MULTI_V7

You still have a three-level menu structure. Please fix.

> +static const char const *bcm_cygnus_dt_compat[] = {
> +       "brcm,cygnus",
> +       NULL,
> +};
> +
> +DT_MACHINE_START(BCM_CYGNUS_DT, "Broadcom Cygnus SoC")
> +       .l2c_aux_val    = 0,
> +       .l2c_aux_mask   = ~0,
> +       .dt_compat = bcm_cygnus_dt_compat,
> +MACHINE_END
> 
This looks good.

	Arnd
Scott Branden Oct. 20, 2014, 10:59 p.m. UTC | #2
On 14-10-20 12:55 PM, Arnd Bergmann wrote:
> On Tuesday 14 October 2014 19:58:51 Scott Branden wrote:
>>   if ARCH_BCM
>>
>> +menu "iProc SoC based Machine types"
>> +       config ARCH_BCM_IPROC
>> +               bool
>> +               select ARM_GIC
>> +               select CACHE_L2X0
>> +               select HAVE_ARM_SCU if SMP
>> +               select HAVE_ARM_TWD if SMP
>> +               select ARM_GLOBAL_TIMER
>> +
>> +               select CLKSRC_MMIO
>> +               select ARCH_REQUIRE_GPIOLIB
>> +               select ARM_AMBA
>> +               select PINCTRL
>> +               help
>> +                 This enables support for systems based on Broadcom IPROC architected SoCs.
>> +                 The IPROC complex contains one or more ARM CPUs along with common
>> +                 core periperals. Application specific SoCs are created by adding a
>> +                 uArchitecture containing peripherals outside of the IPROC complex.
>> +                 Currently supported SoCs are Cygnus.
>> +
>> +       config ARCH_BCM_CYGNUS
>> +               bool "Broadcom Cygnus Support" if ARCH_MULTI_V7
>
> You still have a three-level menu structure. Please fix.

Hi Arnd, we have ARCH_BCM->ARCH_BCM_CYGNUS.

ARCH_BCM_IPROC is silent and selected by ARCH_BCM_CYGNUS.  This was the 
change made between v3 and v5.

Is there something else to be done here?
>
>> +static const char const *bcm_cygnus_dt_compat[] = {
>> +       "brcm,cygnus",
>> +       NULL,
>> +};
>> +
>> +DT_MACHINE_START(BCM_CYGNUS_DT, "Broadcom Cygnus SoC")
>> +       .l2c_aux_val    = 0,
>> +       .l2c_aux_mask   = ~0,
>> +       .dt_compat = bcm_cygnus_dt_compat,
>> +MACHINE_END
>>
> This looks good.
>
> 	Arnd
>
Arnd Bergmann Oct. 21, 2014, 5:48 a.m. UTC | #3
On Monday 20 October 2014 15:59:45 Scott Branden wrote:
> On 14-10-20 12:55 PM, Arnd Bergmann wrote:
> > On Tuesday 14 October 2014 19:58:51 Scott Branden wrote:
> >>   if ARCH_BCM
> >>
> >> +menu "iProc SoC based Machine types"
> >> +       config ARCH_BCM_IPROC
> >> +               bool
> >> +               select ARM_GIC
> >> +               select CACHE_L2X0
> >> +               select HAVE_ARM_SCU if SMP
> >> +               select HAVE_ARM_TWD if SMP
> >> +               select ARM_GLOBAL_TIMER
> >> +
> >> +               select CLKSRC_MMIO
> >> +               select ARCH_REQUIRE_GPIOLIB
> >> +               select ARM_AMBA
> >> +               select PINCTRL
> >> +               help
> >> +                 This enables support for systems based on Broadcom IPROC architected SoCs.
> >> +                 The IPROC complex contains one or more ARM CPUs along with common
> >> +                 core periperals. Application specific SoCs are created by adding a
> >> +                 uArchitecture containing peripherals outside of the IPROC complex.
> >> +                 Currently supported SoCs are Cygnus.
> >> +
> >> +       config ARCH_BCM_CYGNUS
> >> +               bool "Broadcom Cygnus Support" if ARCH_MULTI_V7
> >
> > You still have a three-level menu structure. Please fix.
> 
> Hi Arnd, we have ARCH_BCM->ARCH_BCM_CYGNUS.
> 
> ARCH_BCM_IPROC is silent and selected by ARCH_BCM_CYGNUS.  This was the 
> change made between v3 and v5.
> 
> Is there something else to be done here?
> 

You have

	"Broadcom SoC Support" 
		"iProc SoC based Machine types"
			 "Broadcom Cygnus Support"

Get rid of one of them.

	Arnd
Scott Branden Oct. 22, 2014, 12:11 a.m. UTC | #4
On 14-10-20 10:48 PM, Arnd Bergmann wrote:
> On Monday 20 October 2014 15:59:45 Scott Branden wrote:
>> On 14-10-20 12:55 PM, Arnd Bergmann wrote:
>>> On Tuesday 14 October 2014 19:58:51 Scott Branden wrote:
>>>>    if ARCH_BCM
>>>>
>>>> +menu "iProc SoC based Machine types"
>>>> +       config ARCH_BCM_IPROC
>>>> +               bool
>>>> +               select ARM_GIC
>>>> +               select CACHE_L2X0
>>>> +               select HAVE_ARM_SCU if SMP
>>>> +               select HAVE_ARM_TWD if SMP
>>>> +               select ARM_GLOBAL_TIMER
>>>> +
>>>> +               select CLKSRC_MMIO
>>>> +               select ARCH_REQUIRE_GPIOLIB
>>>> +               select ARM_AMBA
>>>> +               select PINCTRL
>>>> +               help
>>>> +                 This enables support for systems based on Broadcom IPROC architected SoCs.
>>>> +                 The IPROC complex contains one or more ARM CPUs along with common
>>>> +                 core periperals. Application specific SoCs are created by adding a
>>>> +                 uArchitecture containing peripherals outside of the IPROC complex.
>>>> +                 Currently supported SoCs are Cygnus.
>>>> +
>>>> +       config ARCH_BCM_CYGNUS
>>>> +               bool "Broadcom Cygnus Support" if ARCH_MULTI_V7
>>>
>>> You still have a three-level menu structure. Please fix.
>>
>> Hi Arnd, we have ARCH_BCM->ARCH_BCM_CYGNUS.
>>
>> ARCH_BCM_IPROC is silent and selected by ARCH_BCM_CYGNUS.  This was the
>> change made between v3 and v5.
>>
>> Is there something else to be done here?
>>
>
> You have
>
> 	"Broadcom SoC Support"
> 		"iProc SoC based Machine types"
> 			 "Broadcom Cygnus Support"
OK, I will remove the "iProc SoC based Machine types".  This was 
grouping all iProc based SoCs under one menu and parallels what the 
existing "Broadcom Mobile Soc Support" menu does.
I can create another patch removing the "Broadcom Mobile SoC Support" 
menu if the ARM Maintainer now want all Broadcom devices are supposed to 
be contained in a single level?
>
> Get rid of one of them.
>
> 	Arnd
>
Arnd Bergmann Oct. 22, 2014, 8:22 a.m. UTC | #5
On Tuesday 21 October 2014 17:11:08 Scott Branden wrote:
> OK, I will remove the "iProc SoC based Machine types".  This was 
> grouping all iProc based SoCs under one menu and parallels what the 
> existing "Broadcom Mobile Soc Support" menu does.
>
> I can create another patch removing the "Broadcom Mobile SoC Support" 
> menu if the ARM Maintainer now want all Broadcom devices are supposed to 
> be contained in a single level?

Sounds good, I missed that other menu going in.

It can make sense to add 'comment' statements if you want to separate the
families.

I also noticed that there are a few configuration options that at first
seem pointless: ARCH_BCM_MOBILE_L2_CACHE and ARCH_BCM_MOBILE_SMP. I wonder
if it ever makes sense to disable these when the common options (CACHE_L2X0
and SMP) are enabled for another SoC. I'd normally like to see these as
hidden options that are always on whenever the core support for those
features is enabled, to avoid confusing users as well as bugs from the
combinatorial explosion.

	Arnd
Scott Branden Oct. 22, 2014, 5:12 p.m. UTC | #6
On 14-10-22 01:22 AM, Arnd Bergmann wrote:
> On Tuesday 21 October 2014 17:11:08 Scott Branden wrote:
>> OK, I will remove the "iProc SoC based Machine types".  This was
>> grouping all iProc based SoCs under one menu and parallels what the
>> existing "Broadcom Mobile Soc Support" menu does.
>>
>> I can create another patch removing the "Broadcom Mobile SoC Support"
>> menu if the ARM Maintainer now want all Broadcom devices are supposed to
>> be contained in a single level?
>
> Sounds good, I missed that other menu going in.
I will add another patch to my set to correct this.
>
> It can make sense to add 'comment' statements if you want to separate the
> families.
Thanks - I will add this to my patchset.
>
> I also noticed that there are a few configuration options that at first
> seem pointless: ARCH_BCM_MOBILE_L2_CACHE and ARCH_BCM_MOBILE_SMP. I wonder
> if it ever makes sense to disable these when the common options (CACHE_L2X0
> and SMP) are enabled for another SoC. I'd normally like to see these as
> hidden options that are always on whenever the core support for those
> features is enabled, to avoid confusing users as well as bugs from the
> combinatorial explosion.
I can clean up all but ARCH_BCM_MOBILE_L2_CACHE.  This one is 
intertwined with SMC support and it looks like they want the option to 
turn on and off this feature.  This L2/Trustzone support will need to be 
cleaned up at a later time.  I heard Russell King says the PL310 cache 
code will be changing again soon.  When I add PL310 Trustzone support 
for the Cygnus SoC I can have a look at cleaning it up for the 
Mobile/Kona base SoCs at the same time.
>
> 	Arnd
>
diff mbox

Patch

diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig
index 2abad74..ecc544a 100644
--- a/arch/arm/mach-bcm/Kconfig
+++ b/arch/arm/mach-bcm/Kconfig
@@ -5,6 +5,36 @@  menuconfig ARCH_BCM
 
 if ARCH_BCM
 
+menu "iProc SoC based Machine types"
+	config ARCH_BCM_IPROC
+		bool
+		select ARM_GIC
+		select CACHE_L2X0
+		select HAVE_ARM_SCU if SMP
+		select HAVE_ARM_TWD if SMP
+		select ARM_GLOBAL_TIMER
+
+		select CLKSRC_MMIO
+		select ARCH_REQUIRE_GPIOLIB
+		select ARM_AMBA
+		select PINCTRL
+		help
+		  This enables support for systems based on Broadcom IPROC architected SoCs.
+		  The IPROC complex contains one or more ARM CPUs along with common
+		  core periperals. Application specific SoCs are created by adding a
+		  uArchitecture containing peripherals outside of the IPROC complex.
+		  Currently supported SoCs are Cygnus.
+
+	config ARCH_BCM_CYGNUS
+		bool "Broadcom Cygnus Support" if ARCH_MULTI_V7
+		select ARCH_BCM_IPROC
+		help
+		  Enable support for the Cygnus family,
+		  which includes the following variants:
+		  BCM11300, BCM11320, BCM11350, BCM11360,
+		  BCM58300, BCM58302, BCM58303, BCM58305.
+endmenu
+
 config ARCH_BCM_MOBILE
 	bool "Broadcom Mobile SoC Support" if ARCH_MULTI_V7
 	select ARCH_REQUIRE_GPIOLIB
diff --git a/arch/arm/mach-bcm/Makefile b/arch/arm/mach-bcm/Makefile
index 300ae4b..34d45ba 100644
--- a/arch/arm/mach-bcm/Makefile
+++ b/arch/arm/mach-bcm/Makefile
@@ -10,6 +10,9 @@ 
 # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 
+# Cygnus
+obj-$(CONFIG_ARCH_BCM_CYGNUS) +=  bcm_cygnus.o
+
 # BCM281XX
 obj-$(CONFIG_ARCH_BCM_281XX)	+= board_bcm281xx.o
 
diff --git a/arch/arm/mach-bcm/bcm_cygnus.c b/arch/arm/mach-bcm/bcm_cygnus.c
new file mode 100644
index 0000000..41b4933
--- /dev/null
+++ b/arch/arm/mach-bcm/bcm_cygnus.c
@@ -0,0 +1,26 @@ 
+/*
+ * Copyright 2014 Broadcom Corporation.  All rights reserved.
+ *
+ * Unless you and Broadcom execute a separate written software license
+ * agreement governing use of this software, this software is licensed to you
+ * under the terms of the GNU General Public License as
+ * published by the Free Software Foundation version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#include <asm/mach/arch.h>
+
+static const char const *bcm_cygnus_dt_compat[] = {
+	"brcm,cygnus",
+	NULL,
+};
+
+DT_MACHINE_START(BCM_CYGNUS_DT, "Broadcom Cygnus SoC")
+	.l2c_aux_val	= 0,
+	.l2c_aux_mask	= ~0,
+	.dt_compat = bcm_cygnus_dt_compat,
+MACHINE_END