Skip to contentSkip to conversation

Add initial support for Broadcom Cygnus SoC

PATCH Superseded Scott Branden 23 participants 265 messages Oct 8, 2014 – Dec 22, 2015 1 message not in the archive Page 1 of 2

Subsystems (20)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): Scott Branden <[email protected]

Scott Branden

author maintainer
#1 lore raw

v3 cover Add initial support for Broadcom Cygnus SoC

This patchset contains initial support for Broadcom's Cygnus SoC based on our iProc architecture. Initial support is minimal and includes just the mach platform code, clock driver, and a basic device tree configuration. Peripheral drivers will be submitted soon, as will device tree configurations for other Cygnus board variants.

Changes from v2:
- rebased to 3.17 kernel

Changes from v1:
- Address code review comments as per previous responses.
- Copyright headers updated to remove Broadcom URL.
- mach platform code still contains hard coded addresses. These address are the same for all Cygnus variants. Could you please provide guidance on where they should go if you would still like them changed. There does not seem to be a reason to change them to device tree as they do not change.

Jonathan Richardson (6):
ARM: cygnus: Initial support for Broadcom Cygnus SoC
clk: Clock driver support for Broadcom Cygnus SoC
dt-bindings: Document Broadcom Cygnus SoC and clock driver
ARM: cygnus defconfig : Initial defconfig for Broadcom Cygnus SoC
ARM: dts: Enable Broadcom Cygnus SoC
MAINTAINERS: Entry for Cygnus/iproc arm architecture and clock
drivers

 Documentation/devicetree/bindings/arm/cygnus.txt   |   12 +
 .../devicetree/bindings/clock/clk-cygnus.txt       |  121 ++
 .../devicetree/bindings/clock/clk-iproc.txt        |   48 +
 MAINTAINERS                                        |   15 +
 arch/arm/boot/dts/Makefile                         |    1 +
 arch/arm/boot/dts/bcm-cygnus.dtsi                  |  349 ++++++
 arch/arm/boot/dts/bcm911360_entphn.dts             |   22 +
 arch/arm/configs/bcm_cygnus_defconfig              |  222 ++++
 arch/arm/mach-bcm/Kconfig                          |   31 +
 arch/arm/mach-bcm/Makefile                         |    3 +
 arch/arm/mach-bcm/bcm_cygnus.c                     |  166 +++
 drivers/clk/Makefile                               |    1 +
 drivers/clk/bcm/Makefile                           |    2 +
 drivers/clk/bcm/clk-cygnus.c                       | 1186 ++++++++++++++++++++
 drivers/clk/bcm/clk-iproc.c                        |  451 ++++++++
 15 files changed, 2630 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/arm/cygnus.txt
 create mode 100644 Documentation/devicetree/bindings/clock/clk-cygnus.txt
 create mode 100644 Documentation/devicetree/bindings/clock/clk-iproc.txt
 create mode 100644 arch/arm/boot/dts/bcm-cygnus.dtsi
 create mode 100644 arch/arm/boot/dts/bcm911360_entphn.dts
 create mode 100644 arch/arm/configs/bcm_cygnus_defconfig
 create mode 100644 arch/arm/mach-bcm/bcm_cygnus.c
 create mode 100644 drivers/clk/bcm/clk-cygnus.c
 create mode 100644 drivers/clk/bcm/clk-iproc.c
Signature · 1 line
1.7.9.5
author maintainer
#2 lore raw

PATCH v3 1/6 ARM: cygnus: Initial support for Broadcom Cygnus SoC

From: Jonathan Richardson <[email protected]>

Adds initial support for the Cygnus SoC based on Broadcom?s iProc series.

---
 arch/arm/mach-bcm/Kconfig      |   31 ++++++++
 arch/arm/mach-bcm/Makefile     |    3 +
 arch/arm/mach-bcm/bcm_cygnus.c |  166 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 200 insertions(+)
 create mode 100644 arch/arm/mach-bcm/bcm_cygnus.c
arch/arm/mach-bcm/Kconfig +31 -0
index fc93800..2dd3f78 100644
@@ -5,6 +5,37 @@ menuconfig ARCH_BCM
 
 if ARCH_BCM
 
+config ARCH_BCM_IPROC
+	bool "Broadcom ARMv7 iProc boards" if ARCH_MULTI_V7
+	select ARM_GIC
+	select CACHE_L2X0
+	select HAVE_ARM_TWD if LOCAL_TIMERS
+	select HAVE_CLK
+	select CLKSRC_OF
+	select CLKSRC_MMIO
+	select GENERIC_CLOCKEVENTS
+	select ARM_GLOBAL_TIMER
+	select ARCH_REQUIRE_GPIOLIB
+	select ARM_AMBA
+	select PINCTRL
+	select DEBUG_UART_8250
+	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.
+
+menu "iProc SoC based Machine types"
+	depends on ARCH_BCM_IPROC
+
+	config ARCH_BCM_CYGNUS
+		bool "Support Broadcom Cygnus board"
+		select USB_ARCH_HAS_EHCI if USB_SUPPORT
+		help
+		  Support for Broadcom Cygnus SoC.
+endmenu
+
 config ARCH_BCM_MOBILE
 	bool "Broadcom Mobile SoC Support" if ARCH_MULTI_V7
 	select ARCH_REQUIRE_GPIOLIB
arch/arm/mach-bcm/Makefile +3 -0
index b19a396..46e092a 100644
@@ -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
 
arch/arm/mach-bcm/bcm_cygnus.c new file +166 -0

166 lines not on this page · raw message

Signature · 1 line
1.7.9.5
maintainer
#3 lore raw

Re: [PATCH 1/6] ARM: cygnus: Initial support for Broadcom Cygnus SoC

Quoted 28 lines · On Tuesday 07 October 2014 22:27:00 Scott Branden wrote:

From: Jonathan Richardson <[email protected]>

Adds initial support for the Cygnus SoC based on Broadcom?s iProc series.

---
 arch/arm/mach-bcm/Kconfig      |   31 ++++++++
 arch/arm/mach-bcm/Makefile     |    3 +
 arch/arm/mach-bcm/bcm_cygnus.c |  166 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 200 insertions(+)
 create mode 100644 arch/arm/mach-bcm/bcm_cygnus.c
arch/arm/mach-bcm/Kconfig +4 -0
index fc93800..2dd3f78 100644
@@ -5,6 +5,37 @@ menuconfig ARCH_BCM
 
 if ARCH_BCM
 
+config ARCH_BCM_IPROC
+	bool "Broadcom ARMv7 iProc boards" if ARCH_MULTI_V7
+	select ARM_GIC
+	select CACHE_L2X0

arch/arm/mach-bcm/Kconfig menuconfig ARCH_BCM · line 21

Quoted 10 lines
arch/arm/mach-bcm/Kconfig +10 -0
+	select HAVE_ARM_TWD if LOCAL_TIMERS
+	select HAVE_CLK
+	select CLKSRC_OF
+	select CLKSRC_MMIO
+	select GENERIC_CLOCKEVENTS
+	select ARM_GLOBAL_TIMER
+	select ARCH_REQUIRE_GPIOLIB
+	select ARM_AMBA
+	select PINCTRL
+	select DEBUG_UART_8250

A lot of these are implied by ARCH_MULTI_V7, just drop them here.

Some others like DEBUG_UART_8250 should remain user-selectable, if the platform works without them.

Quoted 6 lines
arch/arm/mach-bcm/Kconfig +6 -0
+	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.

arch/arm/mach-bcm/Kconfig menuconfig ARCH_BCM · line 37

Quoted 10 lines
arch/arm/mach-bcm/Kconfig +10 -0
+
+menu "iProc SoC based Machine types"
+	depends on ARCH_BCM_IPROC
+
+	config ARCH_BCM_CYGNUS
+		bool "Support Broadcom Cygnus board"
+		select USB_ARCH_HAS_EHCI if USB_SUPPORT
+		help
+		  Support for Broadcom Cygnus SoC.
+endmenu

I don't think you need per-board config options. The main option above should be enough.

arch/arm/mach-bcm/Kconfig menuconfig ARCH_BCM · line 40

Quoted 3 lines
arch/arm/mach-bcm/Kconfig +3 -0
+
+#define CRMU_MAIL_BOX1      0x03024028
+#define CRMU_SOFT_RESET_CMD 0xFFFFFFFF

Never hardcode physical register locations in source. This should come from DT, and get moved into a regular 'reset' device driver.

You probably want to use drivers/power/reset/syscon-reboot.c

Quoted 15 lines
arch/arm/mach-bcm/Kconfig +15 -0
+/* CRU_RESET register */
+static void * __iomem crmu_mail_box1_reg;
+
+#ifdef CONFIG_NEON
+
+#define CRU_BASE                  0x1800e000
+#define CRU_SIZE                  0x34
+#define CRU_CONTROL_OFFSET        0x0
+#define CRU_PWRDWN_EN_OFFSET      0x4
+#define CRU_PWRDWN_STATUS_OFFSET  0x8
+#define CRU_NEON0_HW_RESET  6
+#define CRU_CLAMP_ON_NEON0  20
+#define CRU_PWRONIN_NEON0   21
+#define CRU_PWRONOUT_NEON0  21
+#define CRU_PWROKIN_NEON0   22

arch/arm/mach-bcm/Kconfig menuconfig ARCH_BCM

Quoted 10 lines
arch/arm/mach-bcm/Kconfig +10 -0
+#define CRU_PWROKOUT_NEON0  22
+#define CRU_STATUS_DELAY_NS 500
+#define CRU_MAX_RETRY_COUNT 10
+#define CRU_RETRY_INTVL_US  1
+
+/* Power up the NEON/VFPv3 block. */
+static void bcm_cygnus_powerup_neon(void)
+{
+	void * __iomem cru_base = ioremap(CRU_BASE, CRU_SIZE);
+	u32 reg, i;

Same thing here: this should really use the device node for CRU.

Can you describe what the CRU is? Is this specific to NEON or is it some general-purpose power management unit?

arch/arm/mach-bcm/Kconfig

Quoted 5 lines
arch/arm/mach-bcm/Kconfig +5 -0
+static void __init bcm_cygnus_init(void)
+{
+	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+
+	l2x0_of_init(0, ~0UL);

The l2x0_of_init can be removed now, just move the arguments into the respective fields of the machine descriptor.

arch/arm/mach-bcm/Kconfig

Quoted 7 lines
arch/arm/mach-bcm/Kconfig +7 -0
+	crmu_mail_box1_reg = ioremap(CRMU_MAIL_BOX1, SZ_4);
+	WARN_ON(!crmu_mail_box1_reg);
+
+#ifdef CONFIG_NEON
+	bcm_cygnus_powerup_neon();
+#endif
+}

In general, try to avoid #ifdef, use

	if (IS_ENABLED(CONFIG_NEON))
		bcm_cygnus_powerup_neon();

instead.

arch/arm/mach-bcm/Kconfig

Quoted 12 lines
arch/arm/mach-bcm/Kconfig +12 -0
+
+static const char const *bcm_cygnus_dt_compat[] = {
+	"brcm,cygnus",
+	NULL,
+};
+
+DT_MACHINE_START(BCM_CYGNUS_DT, "Broadcom Cygnus SoC")
+	.init_machine = bcm_cygnus_init,
+	.map_io = debug_ll_io_init,
+	.dt_compat = bcm_cygnus_dt_compat,
+	.restart   = bcm_cygnus_restart
+MACHINE_END

The map_io pointer is unnecessary, and the restart pointer should get set by the reset driver. I hope we can find a way to avoid the bcm_cygnus_init callback as well.

Arnd

author maintainer
#4 lore raw

Re: [PATCH 1/6] ARM: cygnus: Initial support for Broadcom Cygnus SoC

Thanks for the review - comments inline.

Quoted 42 lines · Arnd Bergmann
Quoted 28 lines · On Tuesday 07 October 2014 22:27:00 Scott Branden wrote:

From: Jonathan Richardson <[email protected]>

Adds initial support for the Cygnus SoC based on Broadcom?s iProc series.

---
  arch/arm/mach-bcm/Kconfig      |   31 ++++++++
  arch/arm/mach-bcm/Makefile     |    3 +
  arch/arm/mach-bcm/bcm_cygnus.c |  166 ++++++++++++++++++++++++++++++++++++++++
  3 files changed, 200 insertions(+)

create mode 100644 arch/arm/mach-bcm/bcm_cygnus.c

arch/arm/mach-bcm/Kconfig +4 -0
index fc93800..2dd3f78 100644
@@ -5,6 +5,37 @@ menuconfig ARCH_BCM
 
  if ARCH_BCM
 
+config ARCH_BCM_IPROC
+	bool "Broadcom ARMv7 iProc boards" if ARCH_MULTI_V7
+	select ARM_GIC
+	select CACHE_L2X0

arch/arm/mach-bcm/Kconfig menuconfig ARCH_BCM · line 21

Quoted 10 lines
arch/arm/mach-bcm/Kconfig +10 -0
+	select HAVE_ARM_TWD if LOCAL_TIMERS
+	select HAVE_CLK
+	select CLKSRC_OF
+	select CLKSRC_MMIO
+	select GENERIC_CLOCKEVENTS
+	select ARM_GLOBAL_TIMER
+	select ARCH_REQUIRE_GPIOLIB
+	select ARM_AMBA
+	select PINCTRL
+	select DEBUG_UART_8250

A lot of these are implied by ARCH_MULTI_V7, just drop them here.

Quoted 3 lines

Some others like DEBUG_UART_8250 should remain user-selectable, if the platform works without them.

Will review. It looks like DEBUG_UART_8250 actually has to move to Kconfig.debug as that is where everyone else selects it.

Quoted 11 lines
Quoted 11 lines
arch/arm/mach-bcm/Kconfig +11 -0
+	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.
+
+menu "iProc SoC based Machine types"
+	depends on ARCH_BCM_IPROC
+
+	config ARCH_BCM_CYGNUS
Quoted 8 lines

arch/arm/mach-bcm/Kconfig menuconfig ARCH_BCM · line 37

Quoted 5 lines
arch/arm/mach-bcm/Kconfig +5 -0
+		bool "Support Broadcom Cygnus board"
+		select USB_ARCH_HAS_EHCI if USB_SUPPORT
+		help
+		  Support for Broadcom Cygnus SoC.
+endmenu

I don't think you need per-board config options. The main option above should be enough.

This is not a per-board config option. This is actually a per-SoC uArchtecture selection. More major uArchectures will be added to the IPROC. Will Change comment to "Support Broadcom Cygnus SoC"

Quoted 10 lines

arch/arm/mach-bcm/Kconfig menuconfig ARCH_BCM · line 40

Quoted 4 lines
arch/arm/mach-bcm/Kconfig +3 -0
+
+#define CRMU_MAIL_BOX1      0x03024028
+#define CRMU_SOFT_RESET_CMD 0xFFFFFFFF

Never hardcode physical register locations in source. This should come from DT, and get moved into a regular 'reset' device driver.

You probably want to use drivers/power/reset/syscon-reboot.c

OK, thanks for advice on where to put reset device driver. Will investigate.

Quoted 28 lines
Quoted 15 lines
arch/arm/mach-bcm/Kconfig +15 -0
+/* CRU_RESET register */
+static void * __iomem crmu_mail_box1_reg;
+
+#ifdef CONFIG_NEON
+
+#define CRU_BASE                  0x1800e000
+#define CRU_SIZE                  0x34
+#define CRU_CONTROL_OFFSET        0x0
+#define CRU_PWRDWN_EN_OFFSET      0x4
+#define CRU_PWRDWN_STATUS_OFFSET  0x8
+#define CRU_NEON0_HW_RESET  6
+#define CRU_CLAMP_ON_NEON0  20
+#define CRU_PWRONIN_NEON0   21
+#define CRU_PWRONOUT_NEON0  21
+#define CRU_PWROKIN_NEON0   22

arch/arm/mach-bcm/Kconfig menuconfig ARCH_BCM

Quoted 10 lines
arch/arm/mach-bcm/Kconfig +10 -0
+#define CRU_PWROKOUT_NEON0  22
+#define CRU_STATUS_DELAY_NS 500
+#define CRU_MAX_RETRY_COUNT 10
+#define CRU_RETRY_INTVL_US  1
+
+/* Power up the NEON/VFPv3 block. */
+static void bcm_cygnus_powerup_neon(void)
+{
+	void * __iomem cru_base = ioremap(CRU_BASE, CRU_SIZE);
+	u32 reg, i;

Same thing here: this should really use the device node for CRU.

Quoted 3 lines

Can you describe what the CRU is? Is this specific to NEON or is it some general-purpose power management unit?

It's a central resource unit with a lot of random registers to perform various operations. To reduce confusion I'll probably move this out of the kernel init and into the bootloader. This will simplify the kernel init.

Quoted 9 lines

arch/arm/mach-bcm/Kconfig

Quoted 5 lines
arch/arm/mach-bcm/Kconfig +5 -0
+static void __init bcm_cygnus_init(void)
+{
+	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+
+	l2x0_of_init(0, ~0UL);

The l2x0_of_init can be removed now, just move the arguments into the respective fields of the machine descriptor.

Yes, thanks for pointing this out.

Quoted 15 lines

arch/arm/mach-bcm/Kconfig

Quoted 7 lines
arch/arm/mach-bcm/Kconfig +7 -0
+	crmu_mail_box1_reg = ioremap(CRMU_MAIL_BOX1, SZ_4);
+	WARN_ON(!crmu_mail_box1_reg);
+
+#ifdef CONFIG_NEON
+	bcm_cygnus_powerup_neon();
+#endif
+}

In general, try to avoid #ifdef, use

	if (IS_ENABLED(CONFIG_NEON))
		bcm_cygnus_powerup_neon();

instead.

Quoted 16 lines

arch/arm/mach-bcm/Kconfig

Quoted 12 lines
arch/arm/mach-bcm/Kconfig +12 -0
+
+static const char const *bcm_cygnus_dt_compat[] = {
+	"brcm,cygnus",
+	NULL,
+};
+
+DT_MACHINE_START(BCM_CYGNUS_DT, "Broadcom Cygnus SoC")
+	.init_machine = bcm_cygnus_init,
+	.map_io = debug_ll_io_init,
+	.dt_compat = bcm_cygnus_dt_compat,
+	.restart   = bcm_cygnus_restart
+MACHINE_END

The map_io pointer is unnecessary, and the restart pointer should get set by the reset driver. I hope we can find a way to avoid the bcm_cygnus_init callback as well.

bcm_cygnus_init callback can be removed by moving initialization to bootloader.

Quoted 3 lines

Arnd

maintainer
#5 lore raw

Re: [PATCH 1/6] ARM: cygnus: Initial support for Broadcom Cygnus SoC

Quoted 25 lines · On Wednesday 08 October 2014 05:27:24 Scott Branden wrote:
Quoted 25 lines
Quoted 12 lines
arch/arm/mach-bcm/Kconfig +4 -0
index fc93800..2dd3f78 100644
@@ -5,6 +5,37 @@ menuconfig ARCH_BCM
 
  if ARCH_BCM
 
+config ARCH_BCM_IPROC
+	bool "Broadcom ARMv7 iProc boards" if ARCH_MULTI_V7
+	select ARM_GIC
+	select CACHE_L2X0

arch/arm/mach-bcm/Kconfig menuconfig ARCH_BCM · line 21

Quoted 10 lines
arch/arm/mach-bcm/Kconfig +10 -0
+	select HAVE_ARM_TWD if LOCAL_TIMERS
+	select HAVE_CLK
+	select CLKSRC_OF
+	select CLKSRC_MMIO
+	select GENERIC_CLOCKEVENTS
+	select ARM_GLOBAL_TIMER
+	select ARCH_REQUIRE_GPIOLIB
+	select ARM_AMBA
+	select PINCTRL
+	select DEBUG_UART_8250

A lot of these are implied by ARCH_MULTI_V7, just drop them here.

Quoted 5 lines
Quoted 3 lines

Some others like DEBUG_UART_8250 should remain user-selectable, if the platform works without them.

Will review. It looks like DEBUG_UART_8250 actually has to move to Kconfig.debug as that is where everyone else selects it.

Actually I think you also need to use DEBUG_LL_UART_8250 rather than DEBUG_UART_8250.

Quoted 19 lines
Quoted 11 lines
Quoted 11 lines
arch/arm/mach-bcm/Kconfig +11 -0
+	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.
+
+menu "iProc SoC based Machine types"
+	depends on ARCH_BCM_IPROC
+
+	config ARCH_BCM_CYGNUS
Quoted 8 lines

arch/arm/mach-bcm/Kconfig menuconfig ARCH_BCM · line 37

Quoted 5 lines
arch/arm/mach-bcm/Kconfig +5 -0
+		bool "Support Broadcom Cygnus board"
+		select USB_ARCH_HAS_EHCI if USB_SUPPORT
+		help
+		  Support for Broadcom Cygnus SoC.
+endmenu

I don't think you need per-board config options. The main option above should be enough.

Quoted 3 lines

This is not a per-board config option. This is actually a per-SoC uArchtecture selection. More major uArchectures will be added to the IPROC. Will Change comment to "Support Broadcom Cygnus SoC"

Ok, sounds fine, but remove ARCH_BCM_IPROC then. There should be no need for a three-level deep hierarchy (BCM -> IPROC -> CYGNUS)

Quoted 28 lines
Quoted 28 lines
Quoted 15 lines
arch/arm/mach-bcm/Kconfig +15 -0
+/* CRU_RESET register */
+static void * __iomem crmu_mail_box1_reg;
+
+#ifdef CONFIG_NEON
+
+#define CRU_BASE                  0x1800e000
+#define CRU_SIZE                  0x34
+#define CRU_CONTROL_OFFSET        0x0
+#define CRU_PWRDWN_EN_OFFSET      0x4
+#define CRU_PWRDWN_STATUS_OFFSET  0x8
+#define CRU_NEON0_HW_RESET  6
+#define CRU_CLAMP_ON_NEON0  20
+#define CRU_PWRONIN_NEON0   21
+#define CRU_PWRONOUT_NEON0  21
+#define CRU_PWROKIN_NEON0   22

arch/arm/mach-bcm/Kconfig menuconfig ARCH_BCM

Quoted 10 lines
arch/arm/mach-bcm/Kconfig +10 -0
+#define CRU_PWROKOUT_NEON0  22
+#define CRU_STATUS_DELAY_NS 500
+#define CRU_MAX_RETRY_COUNT 10
+#define CRU_RETRY_INTVL_US  1
+
+/* Power up the NEON/VFPv3 block. */
+static void bcm_cygnus_powerup_neon(void)
+{
+	void * __iomem cru_base = ioremap(CRU_BASE, CRU_SIZE);
+	u32 reg, i;

Same thing here: this should really use the device node for CRU.

Quoted 7 lines
Quoted 3 lines

Can you describe what the CRU is? Is this specific to NEON or is it some general-purpose power management unit?

It's a central resource unit with a lot of random registers to perform various operations. To reduce confusion I'll probably move this out of the kernel init and into the bootloader. This will simplify the kernel init.

That would help too, yes.

Quoted 16 lines
Quoted 8 lines
Quoted 8 lines
arch/arm/mach-bcm/Kconfig +8 -0
+
+static const char const *bcm_cygnus_dt_compat[] = {
+	"brcm,cygnus",
+	NULL,
+};
+
+DT_MACHINE_START(BCM_CYGNUS_DT, "Broadcom Cygnus SoC")
+	.init_machine = bcm_cygnus_init,
Quoted 8 lines

arch/arm/mach-bcm/Kconfig

Quoted 4 lines
arch/arm/mach-bcm/Kconfig +4 -0
+	.map_io = debug_ll_io_init,
+	.dt_compat = bcm_cygnus_dt_compat,
+	.restart   = bcm_cygnus_restart
+MACHINE_END

The map_io pointer is unnecessary, and the restart pointer should get set by the reset driver. I hope we can find a way to avoid the bcm_cygnus_init callback as well.

Quoted 2 lines

bcm_cygnus_init callback can be removed by moving initialization to bootloader.

Ok, perfect!

Arnd

author maintainer
#6 lore raw

Re: [PATCH 1/6] ARM: cygnus: Initial support for Broadcom Cygnus SoC

Quoted 54 lines · Arnd Bergmann
Quoted 25 lines · On Wednesday 08 October 2014 05:27:24 Scott Branden wrote:
Quoted 25 lines
Quoted 12 lines
arch/arm/mach-bcm/Kconfig +4 -0
index fc93800..2dd3f78 100644
@@ -5,6 +5,37 @@ menuconfig ARCH_BCM
 
   if ARCH_BCM
 
+config ARCH_BCM_IPROC
+	bool "Broadcom ARMv7 iProc boards" if ARCH_MULTI_V7
+	select ARM_GIC
+	select CACHE_L2X0

arch/arm/mach-bcm/Kconfig menuconfig ARCH_BCM · line 21

Quoted 10 lines
arch/arm/mach-bcm/Kconfig +10 -0
+	select HAVE_ARM_TWD if LOCAL_TIMERS
+	select HAVE_CLK
+	select CLKSRC_OF
+	select CLKSRC_MMIO
+	select GENERIC_CLOCKEVENTS
+	select ARM_GLOBAL_TIMER
+	select ARCH_REQUIRE_GPIOLIB
+	select ARM_AMBA
+	select PINCTRL
+	select DEBUG_UART_8250

A lot of these are implied by ARCH_MULTI_V7, just drop them here.

Quoted 5 lines
Quoted 3 lines

Some others like DEBUG_UART_8250 should remain user-selectable, if the platform works without them.

Will review. It looks like DEBUG_UART_8250 actually has to move to Kconfig.debug as that is where everyone else selects it.

Actually I think you also need to use DEBUG_LL_UART_8250 rather than DEBUG_UART_8250.

Quoted 19 lines
Quoted 19 lines
Quoted 6 lines
arch/arm/mach-bcm/Kconfig +6 -0
+	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.

arch/arm/mach-bcm/Kconfig menuconfig ARCH_BCM · line 37

Quoted 10 lines
arch/arm/mach-bcm/Kconfig +10 -0
+
+menu "iProc SoC based Machine types"
+	depends on ARCH_BCM_IPROC
+
+	config ARCH_BCM_CYGNUS
+		bool "Support Broadcom Cygnus board"
+		select USB_ARCH_HAS_EHCI if USB_SUPPORT
+		help
+		  Support for Broadcom Cygnus SoC.
+endmenu

I don't think you need per-board config options. The main option above should be enough.

Quoted 7 lines
Quoted 3 lines

This is not a per-board config option. This is actually a per-SoC uArchtecture selection. More major uArchectures will be added to the IPROC. Will Change comment to "Support Broadcom Cygnus SoC"

Ok, sounds fine, but remove ARCH_BCM_IPROC then. There should be no need for a three-level deep hierarchy (BCM -> IPROC -> CYGNUS)

I do not need a 3-deep hierarchy, I need a 2-deep hierarchy for IPROC and CYGNUS (and future SoCs that have IPROC Architecture in common). I can move IPROC out of the mach-bcm directory if you like a create a new directory? But it looks like the purpose of mach-bcm is to consolidate all Broadcom chipsets in it?

Quoted 62 lines
Quoted 29 lines
Quoted 29 lines
Quoted 16 lines
arch/arm/mach-bcm/Kconfig +15 -0
+/* CRU_RESET register */
+static void * __iomem crmu_mail_box1_reg;
+
+#ifdef CONFIG_NEON
+
+#define CRU_BASE                  0x1800e000
+#define CRU_SIZE                  0x34
+#define CRU_CONTROL_OFFSET        0x0
+#define CRU_PWRDWN_EN_OFFSET      0x4
+#define CRU_PWRDWN_STATUS_OFFSET  0x8
+#define CRU_NEON0_HW_RESET  6
+#define CRU_CLAMP_ON_NEON0  20
+#define CRU_PWRONIN_NEON0   21
+#define CRU_PWRONOUT_NEON0  21
+#define CRU_PWROKIN_NEON0   22

arch/arm/mach-bcm/Kconfig menuconfig ARCH_BCM

Quoted 10 lines
arch/arm/mach-bcm/Kconfig +10 -0
+#define CRU_PWROKOUT_NEON0  22
+#define CRU_STATUS_DELAY_NS 500
+#define CRU_MAX_RETRY_COUNT 10
+#define CRU_RETRY_INTVL_US  1
+
+/* Power up the NEON/VFPv3 block. */
+static void bcm_cygnus_powerup_neon(void)
+{
+	void * __iomem cru_base = ioremap(CRU_BASE, CRU_SIZE);
+	u32 reg, i;

Same thing here: this should really use the device node for CRU.

Quoted 7 lines
Quoted 3 lines

Can you describe what the CRU is? Is this specific to NEON or is it some general-purpose power management unit?

It's a central resource unit with a lot of random registers to perform various operations. To reduce confusion I'll probably move this out of the kernel init and into the bootloader. This will simplify the kernel init.

That would help too, yes.

Quoted 16 lines
Quoted 8 lines
Quoted 8 lines
arch/arm/mach-bcm/Kconfig +8 -0
+
+static const char const *bcm_cygnus_dt_compat[] = {
+	"brcm,cygnus",
+	NULL,
+};
+
+DT_MACHINE_START(BCM_CYGNUS_DT, "Broadcom Cygnus SoC")
+	.init_machine = bcm_cygnus_init,
Quoted 8 lines

arch/arm/mach-bcm/Kconfig

Quoted 4 lines
arch/arm/mach-bcm/Kconfig +4 -0
+	.map_io = debug_ll_io_init,
+	.dt_compat = bcm_cygnus_dt_compat,
+	.restart   = bcm_cygnus_restart
+MACHINE_END

The map_io pointer is unnecessary, and the restart pointer should get set by the reset driver. I hope we can find a way to avoid the bcm_cygnus_init callback as well.

Quoted 2 lines

bcm_cygnus_init callback can be removed by moving initialization to bootloader.

Ok, perfect!

Arnd

maintainer
#7 lore raw

Re: [PATCH 1/6] ARM: cygnus: Initial support for Broadcom Cygnus SoC

Quoted 9 lines · On Wednesday 08 October 2014 09:27:08 Scott Branden wrote:
Quoted 8 lines · Arnd Bergmann
Quoted 6 lines · On Wednesday 08 October 2014 05:27:24 Scott Branden wrote:
Quoted 3 lines

I don't think you need per-board config options. The main option above should be enough.

This is not a per-board config option. This is actually a per-SoC uArchtecture selection. More major uArchectures will be added to the IPROC. Will Change comment to "Support Broadcom Cygnus SoC"

Quoted 8 lines
Quoted 3 lines

Ok, sounds fine, but remove ARCH_BCM_IPROC then. There should be no need for a three-level deep hierarchy (BCM -> IPROC -> CYGNUS)

I do not need a 3-deep hierarchy, I need a 2-deep hierarchy for IPROC and CYGNUS (and future SoCs that have IPROC Architecture in common). I can move IPROC out of the mach-bcm directory if you like a create a new directory? But it looks like the purpose of mach-bcm is to consolidate all Broadcom chipsets in it?

Yes, better leave it all in mach-bcm. You really shouldn't need much code at all that is soc specific, so adding new directories is not encouraged. We have some platforms that need no code at all, and on arm64 that is required.

Isn't Northstar also IPROC? That one didn't seem to need the symbol.

Could you make ARCH_BCM_IPROC a silent symbol that is just selected by each SoC family specific symbol?

Arnd

author maintainer
#8 lore raw

Re: [PATCH 1/6] ARM: cygnus: Initial support for Broadcom Cygnus SoC

Quoted 19 lines · Arnd Bergmann
Quoted 9 lines · On Wednesday 08 October 2014 09:27:08 Scott Branden wrote:
Quoted 8 lines · Arnd Bergmann
Quoted 6 lines · On Wednesday 08 October 2014 05:27:24 Scott Branden wrote:
Quoted 3 lines

I don't think you need per-board config options. The main option above should be enough.

This is not a per-board config option. This is actually a per-SoC uArchtecture selection. More major uArchectures will be added to the IPROC. Will Change comment to "Support Broadcom Cygnus SoC"

Quoted 8 lines
Quoted 3 lines

Ok, sounds fine, but remove ARCH_BCM_IPROC then. There should be no need for a three-level deep hierarchy (BCM -> IPROC -> CYGNUS)

I do not need a 3-deep hierarchy, I need a 2-deep hierarchy for IPROC and CYGNUS (and future SoCs that have IPROC Architecture in common). I can move IPROC out of the mach-bcm directory if you like a create a new directory? But it looks like the purpose of mach-bcm is to consolidate all Broadcom chipsets in it?

Quoted 6 lines

Yes, better leave it all in mach-bcm. You really shouldn't need much code at all that is soc specific, so adding new directories is not encouraged. We have some platforms that need no code at all, and on arm64 that is required.

Isn't Northstar also IPROC? That one didn't seem to need the symbol.

Yes, Northstar is an older version of IPROC. We may be able to consolidate it under the IPROC family as we upstream additional SoCs and drivers. Have the commonality with ARCH_BCM_IPROC will allow this.

Quoted 3 lines

Could you make ARCH_BCM_IPROC a silent symbol that is just selected by each SoC family specific symbol?

OK, I will make ARCH_BCM_IPROC a silent symbol.

Quoted 3 lines

Arnd

author maintainer
#9 lore raw

Re: [PATCH 1/6] ARM: cygnus: Initial support for Broadcom Cygnus SoC

In reply to Arnd Bergmann
Quoted 24 lines · Arnd Bergmann
Quoted 9 lines · On Wednesday 08 October 2014 09:27:08 Scott Branden wrote:
Quoted 8 lines · Arnd Bergmann
Quoted 6 lines · On Wednesday 08 October 2014 05:27:24 Scott Branden wrote:
Quoted 3 lines

I don't think you need per-board config options. The main option above should be enough.

This is not a per-board config option. This is actually a per-SoC uArchtecture selection. More major uArchectures will be added to the IPROC. Will Change comment to "Support Broadcom Cygnus SoC"

Quoted 8 lines
Quoted 3 lines

Ok, sounds fine, but remove ARCH_BCM_IPROC then. There should be no need for a three-level deep hierarchy (BCM -> IPROC -> CYGNUS)

I do not need a 3-deep hierarchy, I need a 2-deep hierarchy for IPROC and CYGNUS (and future SoCs that have IPROC Architecture in common). I can move IPROC out of the mach-bcm directory if you like a create a new directory? But it looks like the purpose of mach-bcm is to consolidate all Broadcom chipsets in it?

Yes, better leave it all in mach-bcm. You really shouldn't need much code at all that is soc specific, so adding new directories is not encouraged. We have some platforms that need no code at all, and on arm64 that is required.

Quoted 4 lines

Isn't Northstar also IPROC? That one didn't seem to need the symbol.

Could you make ARCH_BCM_IPROC a silent symbol that is just selected by each SoC family specific symbol?

It looks like I will also be able to add Northstar under the ARCH_BCM_IPROC. This will be good momentum to cleaning up and consolidate support going forward.
I will change the Kconfig such that ARCH_BCM_5301X selects ARCH_BCM_IPROC.

Thanks.

Quoted 3 lines

Arnd

maintainer
#10 lore raw

Re: [PATCH 1/6] ARM: cygnus: Initial support for Broadcom Cygnus SoC

Quoted 6 lines · On Wednesday 08 October 2014 15:16:55 Scott Branden wrote:

It looks like I will also be able to add Northstar under the ARCH_BCM_IPROC. This will be good momentum to cleaning up and consolidate support going forward.
I will change the Kconfig such that ARCH_BCM_5301X selects ARCH_BCM_IPROC.

Ok, sounds good.

Arnd

#11 lore raw

Re: [PATCH 1/6] ARM: cygnus: Initial support for Broadcom Cygnus SoC

In reply to Scott Branden

arch/arm/mach-bcm/bcm_cygnus.c line 130

Quoted 5 lines · Scott Branden
arch/arm/mach-bcm/bcm_cygnus.c new file +5 -0
+static void __init bcm_cygnus_init(void)
+{
+	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+
+	l2x0_of_init(0, ~0UL);

Please don't explicitly call l2x0 initialisation. Instead, set the appropriate l2c members here:

arch/arm/mach-bcm/bcm_cygnus.c line 166

Quoted 6 lines
arch/arm/mach-bcm/bcm_cygnus.c new file +6 -0
+DT_MACHINE_START(BCM_CYGNUS_DT, "Broadcom Cygnus SoC")
+	.init_machine = bcm_cygnus_init,
+	.map_io = debug_ll_io_init,
+	.dt_compat = bcm_cygnus_dt_compat,
+	.restart   = bcm_cygnus_restart
+MACHINE_END

and let the core code call it at the appropriate time. Thanks.

Signature · 2 lines
FTTC broadband for 0.8mile line: currently at 9.5Mbps down 400kbps up
according to speedtest.net.
author maintainer
#12 lore raw

Re: [PATCH 1/6] ARM: cygnus: Initial support for Broadcom Cygnus SoC

Quoted 10 lines · Russell King - ARM Linux

arch/arm/mach-bcm/bcm_cygnus.c line 130

Quoted 5 lines · Scott Branden
arch/arm/mach-bcm/bcm_cygnus.c new file +5 -0
+static void __init bcm_cygnus_init(void)
+{
+	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+
+	l2x0_of_init(0, ~0UL);

Please don't explicitly call l2x0 initialisation. Instead, set the appropriate l2c members here:

Quoted 9 lines

arch/arm/mach-bcm/bcm_cygnus.c line 166

Quoted 6 lines
arch/arm/mach-bcm/bcm_cygnus.c new file +6 -0
+DT_MACHINE_START(BCM_CYGNUS_DT, "Broadcom Cygnus SoC")
+	.init_machine = bcm_cygnus_init,
+	.map_io = debug_ll_io_init,
+	.dt_compat = bcm_cygnus_dt_compat,
+	.restart   = bcm_cygnus_restart
+MACHINE_END

and let the core code call it at the appropriate time. Thanks.

Thanks - was unaware of this functionality. Will add .l2c_aux_val and .l2c_aux mask to DT_MATCHINE_START. BUT, what happens when we need to add trustzone support and make SMC call to secure monitor?

#13 lore raw

Re: [PATCH 1/6] ARM: cygnus: Initial support for Broadcom Cygnus SoC

Quoted 3 lines · Scott Branden

Thanks - was unaware of this functionality. Will add .l2c_aux_val and .l2c_aux mask to DT_MATCHINE_START. BUT, what happens when we need to add trustzone support and make SMC call to secure monitor?

You will then need to implement the .l2c_write_sec initialiser in the same place.

Note that there's work to revise the trustzone support in this area which will probably be merged for 3.19.

Signature · 2 lines
FTTC broadband for 0.8mile line: currently at 9.5Mbps down 400kbps up
according to speedtest.net.
#14 lore raw

Re: [PATCH 1/6] ARM: cygnus: Initial support for Broadcom Cygnus SoC

In reply to Scott Branden
Quoted 21 lines · Scott Branden

From: Jonathan Richardson <[email protected]>

Adds initial support for the Cygnus SoC based on Broadcom?s iProc series.

---
 arch/arm/mach-bcm/Kconfig      |   31 ++++++++
 arch/arm/mach-bcm/Makefile     |    3 +
 arch/arm/mach-bcm/bcm_cygnus.c |  166 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 200 insertions(+)
 create mode 100644 arch/arm/mach-bcm/bcm_cygnus.c
arch/arm/mach-bcm/Kconfig +0 -0
index fc93800..2dd3f78 100644

arch/arm/mach-bcm/Kconfig menuconfig ARCH_BCM · line 12

Quoted 8 lines
arch/arm/mach-bcm/Kconfig +5 -0
@@ -5,6 +5,37 @@ menuconfig ARCH_BCM
 
 if ARCH_BCM
 
+config ARCH_BCM_IPROC
+       bool "Broadcom ARMv7 iProc boards" if ARCH_MULTI_V7
+       select ARM_GIC
+       select CACHE_L2X0
+       select HAVE_ARM_TWD if LOCAL_TIMERS

LOCAL_TIMERS does not exist anymore.

arch/arm/mach-bcm/Kconfig menuconfig ARCH_BCM · line 13

Quoted 1 line
arch/arm/mach-bcm/Kconfig +1 -0
+       select HAVE_CLK

Selected already by multi-platform.

arch/arm/mach-bcm/Kconfig menuconfig ARCH_BCM · line 15

Quoted 2 lines
arch/arm/mach-bcm/Kconfig +2 -0
+       select CLKSRC_OF
+       select CLKSRC_MMIO

These should be selected by the timers that need these rather than the platform.

arch/arm/mach-bcm/Kconfig menuconfig ARCH_BCM · line 16

Quoted 1 line
arch/arm/mach-bcm/Kconfig +1 -0
+       select GENERIC_CLOCKEVENTS

Selected already by multi-platform.

arch/arm/mach-bcm/Kconfig menuconfig ARCH_BCM · line 21

Quoted 5 lines
arch/arm/mach-bcm/Kconfig +5 -0
+       select ARM_GLOBAL_TIMER
+       select ARCH_REQUIRE_GPIOLIB
+       select ARM_AMBA
+       select PINCTRL
+       select DEBUG_UART_8250

This entry should not be a select. It will break multi-platform.

Sort the select entries alphabetically.

Quoted 154 lines
arch/arm/mach-bcm/Kconfig +17 -0
+       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.
+
+menu "iProc SoC based Machine types"
+       depends on ARCH_BCM_IPROC
+
+       config ARCH_BCM_CYGNUS
+               bool "Support Broadcom Cygnus board"
+               select USB_ARCH_HAS_EHCI if USB_SUPPORT
+               help
+                 Support for Broadcom Cygnus SoC.
+endmenu
+
 config ARCH_BCM_MOBILE
        bool "Broadcom Mobile SoC Support" if ARCH_MULTI_V7
        select ARCH_REQUIRE_GPIOLIB
arch/arm/mach-bcm/Makefile +3 -0
index b19a396..46e092a 100644
@@ -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
 
arch/arm/mach-bcm/bcm_cygnus.c new file +114 -0
new file mode 100644
index 0000000..8e430ed
@@ -0,0 +1,166 @@
+/*
+ * 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 <linux/of_address.h>
+#include <linux/of_platform.h>
+#include <linux/clocksource.h>
+#include <linux/clk-provider.h>
+#include <linux/delay.h>
+#include <asm/mach/arch.h>
+#include <asm/mach/map.h>
+#include <asm/proc-fns.h>
+#include <asm/hardware/cache-l2x0.h>
+
+#define CRMU_MAIL_BOX1      0x03024028
+#define CRMU_SOFT_RESET_CMD 0xFFFFFFFF
+
+/* CRU_RESET register */
+static void * __iomem crmu_mail_box1_reg;
+
+#ifdef CONFIG_NEON
+
+#define CRU_BASE                  0x1800e000
+#define CRU_SIZE                  0x34
+#define CRU_CONTROL_OFFSET        0x0
+#define CRU_PWRDWN_EN_OFFSET      0x4
+#define CRU_PWRDWN_STATUS_OFFSET  0x8
+#define CRU_NEON0_HW_RESET  6
+#define CRU_CLAMP_ON_NEON0  20
+#define CRU_PWRONIN_NEON0   21
+#define CRU_PWRONOUT_NEON0  21
+#define CRU_PWROKIN_NEON0   22
+#define CRU_PWROKOUT_NEON0  22
+#define CRU_STATUS_DELAY_NS 500
+#define CRU_MAX_RETRY_COUNT 10
+#define CRU_RETRY_INTVL_US  1
+
+/* Power up the NEON/VFPv3 block. */
+static void bcm_cygnus_powerup_neon(void)
+{
+       void * __iomem cru_base = ioremap(CRU_BASE, CRU_SIZE);
+       u32 reg, i;
+
+       if (WARN_ON(!cru_base))
+               return;
+
+       /* De-assert the neon hardware block reset */
+       reg = readl(cru_base + CRU_CONTROL_OFFSET);
+       reg &= ~(1 << CRU_NEON0_HW_RESET);
+       writel(reg, cru_base + CRU_CONTROL_OFFSET);
+
+       /* Assert the power ON register bit */
+       reg = readl(cru_base + CRU_PWRDWN_EN_OFFSET);
+       reg |= (1 << CRU_PWRONIN_NEON0);
+       writel(reg, cru_base + CRU_PWRDWN_EN_OFFSET);
+
+       /*
+        * Wait up to 10 usec in 1 usec increments for the
+        * status register to acknowledge the power ON assert
+        */
+       for (i = 0; i < CRU_MAX_RETRY_COUNT; i++) {
+               reg = readl(cru_base + CRU_PWRDWN_STATUS_OFFSET);
+               if (reg & CRU_PWRONOUT_NEON0)
+                       break;
+
+               udelay(CRU_RETRY_INTVL_US);
+       }
+
+       if (WARN_ON(i == CRU_MAX_RETRY_COUNT))
+               goto neon_unmap;
+
+       /* Wait 0.5 usec = 500 nsec */
+       ndelay(CRU_STATUS_DELAY_NS);
+
+       /* Assert the power OK register bit */
+       reg = readl(cru_base + CRU_PWRDWN_EN_OFFSET);
+       reg |= (1 << CRU_PWROKIN_NEON0);
+       writel(reg, cru_base + CRU_PWRDWN_EN_OFFSET);
+
+       /*
+        * Wait up to 10 usec in 1 usec increments for the
+        * status register to acknowledge the power OK assert
+        */
+       for (i = 0; i < CRU_MAX_RETRY_COUNT; i++) {
+               reg = readl(cru_base + CRU_PWRDWN_STATUS_OFFSET);
+               if (reg & CRU_PWROKOUT_NEON0)
+                       break;
+
+               udelay(CRU_RETRY_INTVL_US);
+       }
+
+       if (WARN_ON(i == CRU_MAX_RETRY_COUNT))
+               goto neon_unmap;
+
+       /* Wait 0.5 usec = 500 nsec */
+       ndelay(CRU_STATUS_DELAY_NS);
+
+       /* Set the logic clamp for the neon block */
+       reg = readl(cru_base + CRU_PWRDWN_EN_OFFSET);
+       reg &= ~(1 << CRU_CLAMP_ON_NEON0);
+       writel(reg, cru_base + CRU_PWRDWN_EN_OFFSET);
+
+       /* Wait 0.5 usec = 500 nsec */
+       ndelay(CRU_STATUS_DELAY_NS);

arch/arm/mach-bcm/bcm_cygnus.c line 124

Quoted 10 lines
arch/arm/mach-bcm/bcm_cygnus.c new file +10 -0
+
+       /* Reset the neon hardware block */
+       reg = readl(cru_base + CRU_CONTROL_OFFSET);
+       reg |= (1 << CRU_NEON0_HW_RESET);
+       writel(reg, cru_base + CRU_CONTROL_OFFSET);
+
+neon_unmap:
+       iounmap(cru_base);
+}
+#endif /* CONFIG_NEON */

Is this a single core chip? If not, it seems like all this would change when you add SMP support.

Rob

author maintainer
#15 lore raw

Re: [PATCH 1/6] ARM: cygnus: Initial support for Broadcom Cygnus SoC

Thanks for comments - inline.

Quoted 25 lines · Rob Herring
Quoted 24 lines · Scott Branden

From: Jonathan Richardson <[email protected]>

Adds initial support for the Cygnus SoC based on Broadcom?s iProc series.

---
  arch/arm/mach-bcm/Kconfig      |   31 ++++++++
  arch/arm/mach-bcm/Makefile     |    3 +
  arch/arm/mach-bcm/bcm_cygnus.c |  166 ++++++++++++++++++++++++++++++++++++++++
  3 files changed, 200 insertions(+)

create mode 100644 arch/arm/mach-bcm/bcm_cygnus.c

arch/arm/mach-bcm/Kconfig +0 -0
index fc93800..2dd3f78 100644
@@ -5,6 +5,37 @@ menuconfig ARCH_BCM
 
  if ARCH_BCM
 
Quoted 7 lines

arch/arm/mach-bcm/Kconfig menuconfig ARCH_BCM · line 12

Quoted 5 lines
arch/arm/mach-bcm/Kconfig +5 -0
+config ARCH_BCM_IPROC
+       bool "Broadcom ARMv7 iProc boards" if ARCH_MULTI_V7
+       select ARM_GIC
+       select CACHE_L2X0
+       select HAVE_ARM_TWD if LOCAL_TIMERS

LOCAL_TIMERS does not exist anymore.

Will change to if SMP so it will work for other iproc chips that have SMP going forward.

Quoted 10 lines

arch/arm/mach-bcm/Kconfig menuconfig ARCH_BCM · line 13

Quoted 2 lines
arch/arm/mach-bcm/Kconfig +1 -0
+       select HAVE_CLK

Selected already by multi-platform.

arch/arm/mach-bcm/Kconfig menuconfig ARCH_BCM · line 15

Quoted 2 lines
arch/arm/mach-bcm/Kconfig +2 -0
+       select CLKSRC_OF
+       select CLKSRC_MMIO

These should be selected by the timers that need these rather than the platform.

OK

Quoted 11 lines

arch/arm/mach-bcm/Kconfig menuconfig ARCH_BCM · line 16

Quoted 1 line
arch/arm/mach-bcm/Kconfig +1 -0
+       select GENERIC_CLOCKEVENTS

Selected already by multi-platform.

arch/arm/mach-bcm/Kconfig menuconfig ARCH_BCM · line 21

Quoted 5 lines
arch/arm/mach-bcm/Kconfig +5 -0
+       select ARM_GLOBAL_TIMER
+       select ARCH_REQUIRE_GPIOLIB
+       select ARM_AMBA
+       select PINCTRL
+       select DEBUG_UART_8250

This entry should not be a select. It will break multi-platform.

Yes, this select will be removed from here in next version and moved to kconfig.debug as other platforms do.

Quoted 162 lines

Sort the select entries alphabetically.

Quoted 159 lines
arch/arm/mach-bcm/Kconfig +17 -0
+       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.
+
+menu "iProc SoC based Machine types"
+       depends on ARCH_BCM_IPROC
+
+       config ARCH_BCM_CYGNUS
+               bool "Support Broadcom Cygnus board"
+               select USB_ARCH_HAS_EHCI if USB_SUPPORT
+               help
+                 Support for Broadcom Cygnus SoC.
+endmenu
+
  config ARCH_BCM_MOBILE
         bool "Broadcom Mobile SoC Support" if ARCH_MULTI_V7
         select ARCH_REQUIRE_GPIOLIB
arch/arm/mach-bcm/Makefile +3 -0
index b19a396..46e092a 100644
@@ -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
 
arch/arm/mach-bcm/bcm_cygnus.c new file +119 -0
new file mode 100644
index 0000000..8e430ed
@@ -0,0 +1,166 @@
+/*
+ * 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 <linux/of_address.h>
+#include <linux/of_platform.h>
+#include <linux/clocksource.h>
+#include <linux/clk-provider.h>
+#include <linux/delay.h>
+#include <asm/mach/arch.h>
+#include <asm/mach/map.h>
+#include <asm/proc-fns.h>
+#include <asm/hardware/cache-l2x0.h>
+
+#define CRMU_MAIL_BOX1      0x03024028
+#define CRMU_SOFT_RESET_CMD 0xFFFFFFFF
+
+/* CRU_RESET register */
+static void * __iomem crmu_mail_box1_reg;
+
+#ifdef CONFIG_NEON
+
+#define CRU_BASE                  0x1800e000
+#define CRU_SIZE                  0x34
+#define CRU_CONTROL_OFFSET        0x0
+#define CRU_PWRDWN_EN_OFFSET      0x4
+#define CRU_PWRDWN_STATUS_OFFSET  0x8
+#define CRU_NEON0_HW_RESET  6
+#define CRU_CLAMP_ON_NEON0  20
+#define CRU_PWRONIN_NEON0   21
+#define CRU_PWRONOUT_NEON0  21
+#define CRU_PWROKIN_NEON0   22
+#define CRU_PWROKOUT_NEON0  22
+#define CRU_STATUS_DELAY_NS 500
+#define CRU_MAX_RETRY_COUNT 10
+#define CRU_RETRY_INTVL_US  1
+
+/* Power up the NEON/VFPv3 block. */
+static void bcm_cygnus_powerup_neon(void)
+{
+       void * __iomem cru_base = ioremap(CRU_BASE, CRU_SIZE);
+       u32 reg, i;
+
+       if (WARN_ON(!cru_base))
+               return;
+
+       /* De-assert the neon hardware block reset */
+       reg = readl(cru_base + CRU_CONTROL_OFFSET);
+       reg &= ~(1 << CRU_NEON0_HW_RESET);
+       writel(reg, cru_base + CRU_CONTROL_OFFSET);
+
+       /* Assert the power ON register bit */
+       reg = readl(cru_base + CRU_PWRDWN_EN_OFFSET);
+       reg |= (1 << CRU_PWRONIN_NEON0);
+       writel(reg, cru_base + CRU_PWRDWN_EN_OFFSET);
+
+       /*
+        * Wait up to 10 usec in 1 usec increments for the
+        * status register to acknowledge the power ON assert
+        */
+       for (i = 0; i < CRU_MAX_RETRY_COUNT; i++) {
+               reg = readl(cru_base + CRU_PWRDWN_STATUS_OFFSET);
+               if (reg & CRU_PWRONOUT_NEON0)
+                       break;
+
+               udelay(CRU_RETRY_INTVL_US);
+       }
+
+       if (WARN_ON(i == CRU_MAX_RETRY_COUNT))
+               goto neon_unmap;
+
+       /* Wait 0.5 usec = 500 nsec */
+       ndelay(CRU_STATUS_DELAY_NS);
+
+       /* Assert the power OK register bit */
+       reg = readl(cru_base + CRU_PWRDWN_EN_OFFSET);
+       reg |= (1 << CRU_PWROKIN_NEON0);
+       writel(reg, cru_base + CRU_PWRDWN_EN_OFFSET);
+
+       /*
+        * Wait up to 10 usec in 1 usec increments for the
+        * status register to acknowledge the power OK assert
+        */
+       for (i = 0; i < CRU_MAX_RETRY_COUNT; i++) {
+               reg = readl(cru_base + CRU_PWRDWN_STATUS_OFFSET);
+               if (reg & CRU_PWROKOUT_NEON0)
+                       break;
+
+               udelay(CRU_RETRY_INTVL_US);
+       }
+
+       if (WARN_ON(i == CRU_MAX_RETRY_COUNT))
+               goto neon_unmap;
+
+       /* Wait 0.5 usec = 500 nsec */
+       ndelay(CRU_STATUS_DELAY_NS);
+
+       /* Set the logic clamp for the neon block */
+       reg = readl(cru_base + CRU_PWRDWN_EN_OFFSET);
+       reg &= ~(1 << CRU_CLAMP_ON_NEON0);
+       writel(reg, cru_base + CRU_PWRDWN_EN_OFFSET);
+
+       /* Wait 0.5 usec = 500 nsec */
+       ndelay(CRU_STATUS_DELAY_NS);
+
+       /* Reset the neon hardware block */
+       reg = readl(cru_base + CRU_CONTROL_OFFSET);
+       reg |= (1 << CRU_NEON0_HW_RESET);
+       writel(reg, cru_base + CRU_CONTROL_OFFSET);
Quoted 8 lines

arch/arm/mach-bcm/bcm_cygnus.c line 124

Quoted 5 lines
arch/arm/mach-bcm/bcm_cygnus.c new file +5 -0
+
+neon_unmap:
+       iounmap(cru_base);
+}
+#endif /* CONFIG_NEON */

Is this a single core chip? If not, it seems like all this would change when you add SMP support.

Cygnus is a single core chip. There are other chips in the IPROC family that are multi-core. But they are not part of the Cygnus sub-architecture and would have different ways of powering up. These will be added in a different patch in the future.

Quoted 3 lines

Rob

author maintainer
#16 lore raw

PATCH v3 2/6 clk: Clock driver support for Broadcom Cygnus SoC

In reply to Scott Branden

From: Jonathan Richardson <[email protected]>

The iProc clock driver controls PLLs common across iProc chips. The cygnus driver controls cygnus specific features and variations.

---
 drivers/clk/Makefile         |    1 +
 drivers/clk/bcm/Makefile     |    2 +
 drivers/clk/bcm/clk-cygnus.c | 1186 ++++++++++++++++++++++++++++++++++++++++++
 drivers/clk/bcm/clk-iproc.c  |  451 ++++++++++++++++
 4 files changed, 1640 insertions(+)
 create mode 100644 drivers/clk/bcm/clk-cygnus.c
 create mode 100644 drivers/clk/bcm/clk-iproc.c
drivers/clk/Makefile +1 -0
index f537a0b..8ac0a31 100644
@@ -37,6 +37,7 @@ obj-$(CONFIG_ARCH_VT8500)		+= clk-vt8500.o
 obj-$(CONFIG_COMMON_CLK_WM831X)		+= clk-wm831x.o
 obj-$(CONFIG_COMMON_CLK_XGENE)		+= clk-xgene.o
 obj-$(CONFIG_COMMON_CLK_AT91)		+= at91/
+obj-$(CONFIG_ARCH_BCM_IPROC)	+= bcm/
 obj-$(CONFIG_ARCH_BCM_MOBILE)		+= bcm/
 obj-$(CONFIG_ARCH_BERLIN)		+= berlin/
 obj-$(CONFIG_ARCH_HI3xxx)		+= hisilicon/
drivers/clk/bcm/Makefile +2 -0
index 6297d05..f803919 100644
@@ -2,3 +2,5 @@ obj-$(CONFIG_CLK_BCM_KONA)	+= clk-kona.o
 obj-$(CONFIG_CLK_BCM_KONA)	+= clk-kona-setup.o
 obj-$(CONFIG_CLK_BCM_KONA)	+= clk-bcm281xx.o
 obj-$(CONFIG_CLK_BCM_KONA)	+= clk-bcm21664.o
+obj-$(CONFIG_ARCH_BCM_IPROC)	+= clk-iproc.o
+obj-$(CONFIG_ARCH_BCM_CYGNUS)	+= clk-cygnus.o
drivers/clk/bcm/clk-cygnus.c new file +1186 -0

1,186 lines not on this page · raw message

drivers/clk/bcm/clk-iproc.c new file +451 -0

451 lines not on this page · raw message

Signature · 1 line
1.7.9.5
author maintainer
#17 lore raw

PATCH v3 3/6 dt-bindings: Document Broadcom Cygnus SoC and clock driver

In reply to Scott Branden

From: Jonathan Richardson <[email protected]>

---
 Documentation/devicetree/bindings/arm/cygnus.txt   |   12 ++
 .../devicetree/bindings/clock/clk-cygnus.txt       |  121 ++++++++++++++++++++
 .../devicetree/bindings/clock/clk-iproc.txt        |   48 ++++++++
 3 files changed, 181 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/arm/cygnus.txt
 create mode 100644 Documentation/devicetree/bindings/clock/clk-cygnus.txt
 create mode 100644 Documentation/devicetree/bindings/clock/clk-iproc.txt
Documentation/devicetree/bindings/arm/cygnus.txt new file +12 -0
new file mode 100644
index 0000000..a210377
@@ -0,0 +1,12 @@
+Broadcom Cygnus device tree bindings
+------------------------------------
+
+All Cygnus boards shall have the following properties:
+
+Required root node property:
+	- compatible = "brcm,cygnus";
+
+Boards variants shall have the following additional properties:
+
+Required root node property for the BCM911360_ENTPHN board:
+	- compatible = "brcm,bcm911360_entphn";
Documentation/devicetree/bindings/clock/clk-cygnus.txt new file +121 -0

121 lines not on this page · raw message

Documentation/devicetree/bindings/clock/clk-iproc.txt new file +48 -0

48 lines not on this page · raw message

Signature · 1 line
1.7.9.5
maintainer
#18 lore raw

Re: [PATCH 3/6] dt-bindings: Document Broadcom Cygnus SoC and clock driver

Documentation/devicetree/bindings/arm/cygnus.txt line 7

Quoted 13 lines · On Tuesday 07 October 2014 22:27:02 Scott Branden wrote:
Documentation/devicetree/bindings/arm/cygnus.txt new file +7 -0
new file mode 100644
index 0000000..a210377
@@ -0,0 +1,12 @@
+Broadcom Cygnus device tree bindings
+------------------------------------
+
+All Cygnus boards shall have the following properties:
+
+Required root node property:
+       - compatible = "brcm,cygnus";

Can you add a more specific model number for the soc as well? I assume that cygnus refers to more than one model, so you should probably list both the family and the individual SoC type here.

Documentation/devicetree/bindings/arm/cygnus.txt line 12

Quoted 5 lines
Documentation/devicetree/bindings/arm/cygnus.txt new file +4 -0
+Boards variants shall have the following additional properties:
+
+Required root node property for the BCM911360_ENTPHN board:
+       - compatible = "brcm,bcm911360_entphn";

We normally don't list specific boards here, since it's hard to keep up.

Arnd

author maintainer
#19 lore raw

Re: [PATCH 3/6] dt-bindings: Document Broadcom Cygnus SoC and clock driver

Quoted 11 lines · Arnd Bergmann
Quoted 10 lines · On Tuesday 07 October 2014 22:27:02 Scott Branden wrote:
Documentation/devicetree/bindings/arm/cygnus.txt new file +4 -0
new file mode 100644
index 0000000..a210377
@@ -0,0 +1,12 @@
+Broadcom Cygnus device tree bindings
+------------------------------------
+
+All Cygnus boards shall have the following properties:
Quoted 8 lines

Documentation/devicetree/bindings/arm/cygnus.txt line 7

Quoted 3 lines
Documentation/devicetree/bindings/arm/cygnus.txt new file +3 -0
+
+Required root node property:
+       - compatible = "brcm,cygnus";

Can you add a more specific model number for the soc as well? I assume that cygnus refers to more than one model, so you should probably list both the family and the individual SoC type here.

Add specific model numbers does not seem necessary because they are not needed to be specified in the device tree for compatible purposes for the kernel to work. Plus, the list of model numbers will continue to grow over time and compatible strings would need to be added to the kernel for no apparent reason?

Quoted 9 lines

Documentation/devicetree/bindings/arm/cygnus.txt line 12

Quoted 6 lines
Documentation/devicetree/bindings/arm/cygnus.txt new file +4 -0
+Boards variants shall have the following additional properties:
+
+Required root node property for the BCM911360_ENTPHN board:
+       - compatible = "brcm,bcm911360_entphn";

We normally don't list specific boards here, since it's hard to keep up.

Thanks - removed specific boards from file and moved the cygnus.txt file to devicetree/bindings/arm/bcm/cygnus.txt in next version. This seems to be like the appropriate place to put this document. We will need to add back in board specific bindings when ALSA support is added. But that will be a later commit to deal with.

Quoted 3 lines

Arnd

maintainer
#20 lore raw

Re: [PATCH 3/6] dt-bindings: Document Broadcom Cygnus SoC and clock driver

Quoted 20 lines · On Wednesday 08 October 2014 03:58:15 Scott Branden wrote:
Quoted 11 lines · Arnd Bergmann
Quoted 10 lines · On Tuesday 07 October 2014 22:27:02 Scott Branden wrote:
Documentation/devicetree/bindings/arm/cygnus.txt new file +4 -0
new file mode 100644
index 0000000..a210377
@@ -0,0 +1,12 @@
+Broadcom Cygnus device tree bindings
+------------------------------------
+
+All Cygnus boards shall have the following properties:
Quoted 8 lines

Documentation/devicetree/bindings/arm/cygnus.txt line 7

Quoted 3 lines
Documentation/devicetree/bindings/arm/cygnus.txt new file +3 -0
+
+Required root node property:
+       - compatible = "brcm,cygnus";

Can you add a more specific model number for the soc as well? I assume that cygnus refers to more than one model, so you should probably list both the family and the individual SoC type here.

Quoted 5 lines

Add specific model numbers does not seem necessary because they are not needed to be specified in the device tree for compatible purposes for the kernel to work. Plus, the list of model numbers will continue to grow over time and compatible strings would need to be added to the kernel for no apparent reason?

It's always helpful to have them in the DT though, in case you ever need to add a workaround for one of the SoCs.

You can change the description to just state the format of the more specific model number so you don't need to add the particular type to the binding, but I'd definitely recommend listing both a generic and a more specific name here, such as

	compatible = "brcm,bcm123456", "brcm,cygnus";
Quoted 8 lines
Quoted 8 lines

Documentation/devicetree/bindings/arm/cygnus.txt line 12

Quoted 5 lines
Documentation/devicetree/bindings/arm/cygnus.txt new file +4 -0
+Boards variants shall have the following additional properties:
+
+Required root node property for the BCM911360_ENTPHN board:
+       - compatible = "brcm,bcm911360_entphn";

We normally don't list specific boards here, since it's hard to keep up.

Quoted 5 lines

Thanks - removed specific boards from file and moved the cygnus.txt file to devicetree/bindings/arm/bcm/cygnus.txt in next version. This seems to be like the appropriate place to put this document. We will need to add back in board specific bindings when ALSA support is added. But that will be a later commit to deal with.

I believe most new alsa drivers can now use the binding from Documentation/devicetree/bindings/sound/simple-card.txt so you should no longer need a board specific driver or binding for those.

Arnd

author maintainer
#21 lore raw

PATCH v3 4/6 ARM: cygnus defconfig : Initial defconfig for Broadcom Cygnus SoC

In reply to Scott Branden

From: Jonathan Richardson <[email protected]>

---
 arch/arm/configs/bcm_cygnus_defconfig |  222 +++++++++++++++++++++++++++++++++
 1 file changed, 222 insertions(+)
 create mode 100644 arch/arm/configs/bcm_cygnus_defconfig
arch/arm/configs/bcm_cygnus_defconfig new file +222 -0
new file mode 100644
index 0000000..d148f2d
@@ -0,0 +1,222 @@
+CONFIG_KERNEL_XZ=y
+# CONFIG_SWAP is not set
+CONFIG_SYSVIPC=y
+CONFIG_IRQ_DOMAIN_DEBUG=y
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_BSD_PROCESS_ACCT=y
+CONFIG_BSD_PROCESS_ACCT_V3=y
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_LOG_BUF_SHIFT=19
+CONFIG_CGROUPS=y
+CONFIG_CGROUP_FREEZER=y
+CONFIG_CGROUP_DEVICE=y
+CONFIG_CGROUP_CPUACCT=y
+CONFIG_RESOURCE_COUNTERS=y
+CONFIG_CGROUP_SCHED=y
+CONFIG_BLK_CGROUP=y
+CONFIG_NAMESPACES=y
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_EMBEDDED=y
+CONFIG_PERF_EVENTS=y
+# CONFIG_COMPAT_BRK is not set
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_BLK_DEV_BSG is not set
+CONFIG_PARTITION_ADVANCED=y
+CONFIG_ARCH_BCM=y
+CONFIG_ARCH_BCM_IPROC=y
+CONFIG_ARCH_BCM_CYGNUS=y
+CONFIG_ARM_THUMBEE=y
+CONFIG_PREEMPT=y
+CONFIG_AEABI=y
+CONFIG_HIGHMEM=y
+# CONFIG_COMPACTION is not set
+# CONFIG_ATAGS is not set
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_ARM_APPENDED_DTB=y
+CONFIG_CPU_IDLE=y
+CONFIG_VFP=y
+CONFIG_NEON=y
+# CONFIG_SUSPEND is not set
+CONFIG_NET=y
+CONFIG_PACKET=y
+CONFIG_UNIX=y
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+CONFIG_IP_ADVANCED_ROUTER=y
+CONFIG_IP_MULTIPLE_TABLES=y
+CONFIG_IP_ROUTE_MULTIPATH=y
+CONFIG_IP_ROUTE_VERBOSE=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_MROUTE=y
+CONFIG_IP_MROUTE_MULTIPLE_TABLES=y
+CONFIG_SYN_COOKIES=y
+# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
+# CONFIG_INET_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_BEET is not set
+# CONFIG_INET_LRO is not set
+# CONFIG_INET_DIAG is not set
+CONFIG_TCP_CONG_ADVANCED=y
+# CONFIG_TCP_CONG_BIC is not set
+# CONFIG_TCP_CONG_WESTWOOD is not set
+# CONFIG_TCP_CONG_HTCP is not set
+CONFIG_IPV6=y
+# CONFIG_INET6_XFRM_MODE_TRANSPORT is not set
+# CONFIG_INET6_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET6_XFRM_MODE_BEET is not set
+# CONFIG_IPV6_SIT is not set
+CONFIG_IPV6_MULTIPLE_TABLES=y
+CONFIG_IPV6_SUBTREES=y
+CONFIG_IPV6_MROUTE=y
+CONFIG_NETFILTER=y
+# CONFIG_BRIDGE_NETFILTER is not set
+CONFIG_NF_CONNTRACK=y
+# CONFIG_NF_CONNTRACK_PROCFS is not set
+CONFIG_NF_CONNTRACK_FTP=y
+CONFIG_NF_CONNTRACK_IPV4=y
+CONFIG_IP_NF_IPTABLES=y
+CONFIG_IP_NF_FILTER=y
+CONFIG_IP_NF_TARGET_REJECT=y
+CONFIG_IP_NF_NAT=y
+CONFIG_IP_NF_TARGET_MASQUERADE=y
+CONFIG_IP_NF_TARGET_REDIRECT=y
+CONFIG_IP_NF_MANGLE=y
+CONFIG_IP_NF_RAW=y
+CONFIG_NF_CONNTRACK_IPV6=y
+CONFIG_IP6_NF_IPTABLES=y
+CONFIG_IP6_NF_MATCH_AH=y
+CONFIG_IP6_NF_MATCH_EUI64=y
+CONFIG_IP6_NF_MATCH_FRAG=y
+CONFIG_IP6_NF_MATCH_OPTS=y
+CONFIG_IP6_NF_MATCH_IPV6HEADER=y
+CONFIG_IP6_NF_MATCH_MH=y
+CONFIG_IP6_NF_MATCH_RT=y
+CONFIG_IP6_NF_FILTER=y
+CONFIG_IP6_NF_TARGET_REJECT=y
+CONFIG_IP6_NF_MANGLE=y
+CONFIG_IP6_NF_RAW=y
+CONFIG_BRIDGE=y
+# CONFIG_BRIDGE_IGMP_SNOOPING is not set
+CONFIG_VLAN_8021Q=y
+CONFIG_NET_SCHED=y
+CONFIG_NET_SCH_FQ_CODEL=y
+CONFIG_DEVTMPFS=y
+CONFIG_DEVTMPFS_MOUNT=y
+# CONFIG_FIRMWARE_IN_KERNEL is not set
+CONFIG_MTD=y
+CONFIG_MTD_CMDLINE_PARTS=y
+CONFIG_MTD_BLOCK=y
+CONFIG_MTD_NAND=y
+CONFIG_MTD_UBI=y
+# CONFIG_BLK_DEV is not set
+CONFIG_SCSI=y
+CONFIG_BLK_DEV_SD=y
+CONFIG_NETDEVICES=y
+# CONFIG_NET_CADENCE is not set
+# CONFIG_NET_VENDOR_CIRRUS is not set
+# CONFIG_NET_VENDOR_FARADAY is not set
+# CONFIG_NET_VENDOR_INTEL is not set
+# CONFIG_NET_VENDOR_MARVELL is not set
+# CONFIG_NET_VENDOR_MICREL is not set
+# CONFIG_NET_VENDOR_NATSEMI is not set
+# CONFIG_NET_VENDOR_SEEQ is not set
+# CONFIG_NET_VENDOR_SMSC is not set
+# CONFIG_NET_VENDOR_STMICRO is not set
+# CONFIG_NET_VENDOR_WIZNET is not set
+CONFIG_PHYLIB=y
+CONFIG_BROADCOM_PHY=y
+# CONFIG_INPUT_MOUSEDEV is not set
+# CONFIG_KEYBOARD_ATKBD is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_SERIO is not set
+# CONFIG_LEGACY_PTYS is not set
+CONFIG_SERIAL_8250=y
+# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_8250_NR_UARTS=2
+CONFIG_SERIAL_8250_RUNTIME_UARTS=2
+CONFIG_SERIAL_8250_DW=y
+CONFIG_SERIAL_OF_PLATFORM=y
+# CONFIG_HW_RANDOM is not set
+CONFIG_I2C=y
+CONFIG_I2C_CHARDEV=y
+# CONFIG_I2C_HELPER_AUTO is not set
+CONFIG_I2C_SMBUS=y
+CONFIG_SPI=y
+CONFIG_SPI_PL022=y
+CONFIG_SPI_SPIDEV=y
+CONFIG_GPIO_SYSFS=y
+# CONFIG_HWMON is not set
+CONFIG_WATCHDOG=y
+CONFIG_ARM_SP805_WATCHDOG=y
+CONFIG_FB=y
+CONFIG_FB_ARMCLCD=y
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+# CONFIG_LCD_CLASS_DEVICE is not set
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+# CONFIG_BACKLIGHT_GENERIC is not set
+CONFIG_BACKLIGHT_PWM=y
+CONFIG_SOUND=y
+CONFIG_SND=y
+CONFIG_SND_DYNAMIC_MINORS=y
+CONFIG_SND_VERBOSE_PRINTK=y
+CONFIG_SND_DEBUG=y
+CONFIG_SND_USB_AUDIO=y
+CONFIG_SND_SOC=y
+CONFIG_USB=y
+CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_EHCI_ROOT_HUB_TT=y
+CONFIG_USB_EHCI_HCD_PLATFORM=y
+CONFIG_USB_STORAGE=y
+CONFIG_MMC=y
+CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_PLTFM=y
+CONFIG_PWM=y
+CONFIG_EXT4_FS=y
+CONFIG_MSDOS_FS=y
+CONFIG_VFAT_FS=y
+CONFIG_NTFS_FS=y
+CONFIG_TMPFS=y
+CONFIG_TMPFS_POSIX_ACL=y
+CONFIG_UBIFS_FS=y
+CONFIG_NFS_FS=y
+CONFIG_ROOT_NFS=y
+CONFIG_NLS_CODEPAGE_437=y
+CONFIG_NLS_ISO8859_1=y
+CONFIG_NLS_UTF8=y
+CONFIG_DYNAMIC_DEBUG=y
+CONFIG_DEBUG_INFO=y
+CONFIG_DEBUG_INFO_REDUCED=y
+CONFIG_STRIP_ASM_SYMS=y
+CONFIG_DEBUG_FS=y
+CONFIG_MAGIC_SYSRQ=y
+CONFIG_DEBUG_OBJECTS=y
+CONFIG_DEBUG_OBJECTS_RCU_HEAD=y
+CONFIG_SLUB_DEBUG_ON=y
+CONFIG_DEBUG_MEMORY_INIT=y
+CONFIG_DEBUG_SHIRQ=y
+CONFIG_DETECT_HUNG_TASK=y
+CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=110
+CONFIG_BOOTPARAM_HUNG_TASK_PANIC=y
+# CONFIG_SCHED_DEBUG is not set
+CONFIG_SCHEDSTATS=y
+CONFIG_DEBUG_RT_MUTEXES=y
+CONFIG_PROVE_LOCKING=y
+CONFIG_DEBUG_ATOMIC_SLEEP=y
+# CONFIG_DEBUG_BUGVERBOSE is not set
+CONFIG_DEBUG_SG=y
+CONFIG_DEBUG_NOTIFIERS=y
+CONFIG_DEBUG_CREDENTIALS=y
+CONFIG_PROVE_RCU=y
+CONFIG_DEBUG_USER=y
+CONFIG_DEBUG_LL=y
+CONFIG_DEBUG_LL_UART_8250=y
+CONFIG_DEBUG_UART_PHYS=0x18023000
+CONFIG_DEBUG_UART_VIRT=0xf1023000
+CONFIG_EARLY_PRINTK=y
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
Signature · 1 line
1.7.9.5
maintainer
#22 lore raw

Re: [PATCH 4/6] ARM: cygnus defconfig : Initial defconfig for Broadcom Cygnus SoC

Quoted 5 lines · On Tuesday 07 October 2014 22:27:03 Scott Branden wrote:

From: Jonathan Richardson <[email protected]>

Do you actually need a separate defconfig?

If possible, just add your drivers to multi_v7_defconfig, otherwise include a justification in the patch changelog why your platform should have its own defconfig file.

Arnd

author maintainer
#23 lore raw

Re: [PATCH 4/6] ARM: cygnus defconfig : Initial defconfig for Broadcom Cygnus SoC

Quoted 7 lines · Arnd Bergmann
Quoted 5 lines · On Tuesday 07 October 2014 22:27:03 Scott Branden wrote:

From: Jonathan Richardson <[email protected]>

Quoted 5 lines

Do you actually need a separate defconfig?

If possible, just add your drivers to multi_v7_defconfig, otherwise include a justification in the patch changelog why your platform should have its own defconfig file.

We need a separate defconfig so that customers and developers have some chance of understanding what kernel drivers apply to their SoC. That way they can optimize kernel size if desired. Will update patch changelog in next version.

Quoted 3 lines

Arnd

author maintainer
#24 lore raw

PATCH v3 5/6 ARM: dts: Enable Broadcom Cygnus SoC

In reply to Scott Branden

From: Jonathan Richardson <[email protected]>

DT files to enable cygnus consisting of the enterprise phone board variant and cygnus core configuration.

---
 arch/arm/boot/dts/Makefile             |    1 +
 arch/arm/boot/dts/bcm-cygnus.dtsi      |  349 ++++++++++++++++++++++++++++++++
 arch/arm/boot/dts/bcm911360_entphn.dts |   22 ++
 3 files changed, 372 insertions(+)
 create mode 100644 arch/arm/boot/dts/bcm-cygnus.dtsi
 create mode 100644 arch/arm/boot/dts/bcm911360_entphn.dts
arch/arm/boot/dts/Makefile +1 -0
index b8c5cd3..b95d41d 100644
@@ -52,6 +52,7 @@ dtb-$(CONFIG_ARCH_AT91)	+= sama5d36ek.dtb
 dtb-$(CONFIG_ARCH_ATLAS6) += atlas6-evb.dtb
 dtb-$(CONFIG_ARCH_AXXIA) += axm5516-amarillo.dtb
 dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b.dtb
+dtb-$(CONFIG_ARCH_BCM_CYGNUS) += bcm911360_entphn.dtb
 dtb-$(CONFIG_ARCH_BCM_5301X) += bcm4708-netgear-r6250.dtb
 dtb-$(CONFIG_ARCH_BCM_MOBILE) += bcm28155-ap.dtb \
 	bcm21664-garnet.dtb
arch/arm/boot/dts/bcm-cygnus.dtsi new file +349 -0

349 lines not on this page · raw message

arch/arm/boot/dts/bcm911360_entphn.dts new file +22 -0
new file mode 100644
index 0000000..cee4aff
@@ -0,0 +1,22 @@
+/*
+ * 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.
+ */
+
+/dts-v1/;
+
+#include "bcm-cygnus.dtsi"
+
+/ {
+	model = "Cygnus Enterprise Phone (BCM911360_ENTPHN)";
+	compatible = "brcm,bcm911360_entphn", "brcm,cygnus";
+};
Signature · 1 line
1.7.9.5
author maintainer
#25 lore raw

PATCH v3 6/6 MAINTAINERS: Entry for Cygnus/iproc arm architecture and clock drivers

In reply to Scott Branden

From: Jonathan Richardson <[email protected]>

---
 MAINTAINERS |   15 +++++++++++++++
 1 file changed, 15 insertions(+)
MAINTAINERS +15 -0
index a12edf2..9024bac 100644
@@ -2071,6 +2071,21 @@ L:	linux-scsi at vger.kernel.org
 S:	Supported
 F:	drivers/scsi/bnx2i/
 
+BROADCOM CYGNUS/IPROC ARM ARCHITECTURE
+M:	Jonathan Richardson <[email protected]>
+M:	Scott Branden <[email protected]>
+L:	linux-arm-kernel at lists.infradead.org (moderated for non-subscribers)
+S:	Maintained
+F:	Documentation/devicetree/bindings/arm/cygnus.txt
+F:	arch/arm/boot/dts/bcm-cygnus.dtsi
+F:	arch/arm/boot/dts/bcm911360_entphn.dts
+F:	arch/arm/configs/bcm_cygnus_defconfig
+F:	arch/arm/mach-bcm/board_bcm_cygnus.c
+F:	Documentation/devicetree/bindings/clock/clk-cygnus.txt
+F:	Documentation/devicetree/bindings/clock/clk-iproc.txt
+F:	drivers/clk/bcm/clk-cygnus.c
+F:	drivers/clk/bcm/clk-iproc.c
+
 BROADCOM KONA GPIO DRIVER
 M:	Ray Jui <[email protected]>
 L:	bcm-kernel-feedback-list at broadcom.com
Signature · 1 line
1.7.9.5
author maintainer
#26 lore raw

v4 cover Add initial support for Broadcom Cygnus SoC

In reply to a message not in the archive

This patchset contains initial support for Broadcom's Cygnus SoC based on our iProc architecture. Initial support is minimal and includes just the mach platform code, clock driver, and a basic device tree configuration. Peripheral drivers will be submitted soon, as will device tree configurations for other Cygnus board variants.

Changes from v3:
- restart functionality removed. Will be added in a different patchset in drivers/power
- removed NEON init sequence. Will be moved to bootloader
- cleaned up Kconfigs for ARCH_BCM_CYGNUS by removing unnecessary selects
- consolidated ARCH_BCM_IPROC with select from ARCH_BCM_CYGNUS and ARCH_BCM5301X
- removed bcm911360_entphn binding
- added documentation for SoCs currently supported in Cygnus family

Changes from v2:
- rebased to 3.17 kernel

Changes from v1:
- Address code review comments as per previous responses.
- Copyright headers updated to remove Broadcom URL.
- mach platform code still contains hard coded addresses. These address are the same for all Cygnus variants. Could you please provide guidance on where they should go if you would still like them changed. There does not seem to be a reason to change them to device tree as they do not change.

Jonathan Richardson (5):
ARM: cygnus: Initial support for Broadcom Cygnus SoC
clk: Clock driver support for Broadcom Cygnus SoC
dt-bindings: Document Broadcom Cygnus SoC and clock driver
ARM: cygnus defconfig : Initial defconfig for Broadcom Cygnus SoC
ARM: dts: Enable Broadcom Cygnus SoC

Scott Branden (2):
MAINTAINERS: Entry for Cygnus/iproc arm architecture and clock
drivers
ARM: multi_v7_defconfig: Enable ARCH_BCM_CYGNUS config

 .../devicetree/bindings/arm/bcm/cygnus.txt         |   31 +
 .../devicetree/bindings/clock/clk-cygnus.txt       |  121 ++
 .../devicetree/bindings/clock/clk-iproc.txt        |   48 +
 MAINTAINERS                                        |   17 +-
 arch/arm/Kconfig.debug                             |    2 +-
 arch/arm/boot/dts/Makefile                         |    1 +
 arch/arm/boot/dts/bcm-cygnus.dtsi                  |  349 ++++++
 arch/arm/boot/dts/bcm911360_entphn.dts             |   22 +
 arch/arm/configs/bcm_cygnus_defconfig              |  221 ++++
 arch/arm/configs/multi_v7_defconfig                |    1 +
 arch/arm/mach-bcm/Kconfig                          |   68 +-
 arch/arm/mach-bcm/Makefile                         |    3 +
 arch/arm/mach-bcm/bcm_cygnus.c                     |   26 +
 drivers/clk/Makefile                               |    1 +
 drivers/clk/bcm/Makefile                           |    2 +
 drivers/clk/bcm/clk-cygnus.c                       | 1186 ++++++++++++++++++++
 drivers/clk/bcm/clk-iproc.c                        |  451 ++++++++
 17 files changed, 2527 insertions(+), 23 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/arm/bcm/cygnus.txt
 create mode 100644 Documentation/devicetree/bindings/clock/clk-cygnus.txt
 create mode 100644 Documentation/devicetree/bindings/clock/clk-iproc.txt
 create mode 100644 arch/arm/boot/dts/bcm-cygnus.dtsi
 create mode 100644 arch/arm/boot/dts/bcm911360_entphn.dts
 create mode 100644 arch/arm/configs/bcm_cygnus_defconfig
 create mode 100644 arch/arm/mach-bcm/bcm_cygnus.c
 create mode 100644 drivers/clk/bcm/clk-cygnus.c
 create mode 100644 drivers/clk/bcm/clk-iproc.c
Signature · 1 line
1.7.9.5
author maintainer
#27 lore raw

PATCH v4 1/7 ARM: cygnus: Initial support for Broadcom Cygnus SoC

From: Jonathan Richardson <[email protected]>

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

---
 arch/arm/Kconfig.debug         |    2 +-
 arch/arm/mach-bcm/Kconfig      |   68 +++++++++++++++++++++++++++-------------
 arch/arm/mach-bcm/Makefile     |    3 ++
 arch/arm/mach-bcm/bcm_cygnus.c |   26 +++++++++++++++
 4 files changed, 77 insertions(+), 22 deletions(-)
 create mode 100644 arch/arm/mach-bcm/bcm_cygnus.c
arch/arm/Kconfig.debug +1 -1
index b11ad54..85363de 100644
@@ -1051,7 +1051,7 @@ config DEBUG_UART_PL01X
 
 # Compatibility options for 8250
 config DEBUG_UART_8250
-	def_bool ARCH_DOVE || ARCH_EBSA110 || \
+	def_bool ARCH_BCM_IPROC || ARCH_DOVE || ARCH_EBSA110 || \
 		(FOOTBRIDGE && !DEBUG_DC21285_PORT) || \
 		ARCH_GEMINI || ARCH_IOP13XX || ARCH_IOP32X || \
 		ARCH_IOP33X || ARCH_IXP4XX || \
arch/arm/mach-bcm/Kconfig +47 -21

80 lines not on this page · raw message

arch/arm/mach-bcm/Makefile +3 -0
index b19a396..46e092a 100644
@@ -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
 
arch/arm/mach-bcm/bcm_cygnus.c new file +26 -0
new file mode 100644
index 0000000..41b4933
@@ -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
Signature · 1 line
1.7.9.5
maintainer
#28 lore raw

Re: [PATCH V4 1/7] ARM: cygnus: Initial support for Broadcom Cygnus SoC

Quoted 10 lines · On Thursday 09 October 2014 15:44:25 Scott Branden wrote:

From: Jonathan Richardson <[email protected]>

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

No signoff from the Author?

arch/arm/Kconfig.debug config DEBUG_UART_PL01X · line 1057

Quoted 13 lines
arch/arm/Kconfig.debug +1 -1
index b11ad54..85363de 100644
@@ -1051,7 +1051,7 @@ config DEBUG_UART_PL01X
 
 # Compatibility options for 8250
 config DEBUG_UART_8250
-	def_bool ARCH_DOVE || ARCH_EBSA110 || \
+	def_bool ARCH_BCM_IPROC || ARCH_DOVE || ARCH_EBSA110 || \
 		(FOOTBRIDGE && !DEBUG_DC21285_PORT) || \
 		ARCH_GEMINI || ARCH_IOP13XX || ARCH_IOP32X || \
 		ARCH_IOP33X || ARCH_IXP4XX || \

As I mentioned before, this is the wrong option. Please use DEBUG_LL_UART_8250 like all the modern platforms do.

arch/arm/mach-bcm/Kconfig menuconfig ARCH_BCM · line 11

Quoted 12 lines
arch/arm/mach-bcm/Kconfig +4 -0
index fc93800..b2b6752 100644
@@ -5,6 +5,53 @@ menuconfig ARCH_BCM
 
 if ARCH_BCM
 
+menu "iProc SoC based Machine types"
+	config ARCH_BCM_IPROC
+		bool "Broadcom ARMv7 iProc boards" if ARCH_MULTI_V7
+		depends on ARCH_BCM_CYGNUS || ARCH_BCM_5301X

Please make this a silent option by dropping the text after 'bool', and the 'depends on' line.

Quoted 13 lines
arch/arm/mach-bcm/Kconfig +12 -0
+		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
 
+
+static const char const *bcm_cygnus_dt_compat[] = {

arch/arm/mach-bcm/Kconfig menuconfig ARCH_BCM

Quoted 10 lines
arch/arm/mach-bcm/Kconfig +9 -0
+	"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 now.

Arnd

author maintainer
#29 lore raw

Re: [PATCH V4 1/7] ARM: cygnus: Initial support for Broadcom Cygnus SoC

Quoted 6 lines · Arnd Bergmann
Quoted 5 lines · On Thursday 09 October 2014 15:44:25 Scott Branden wrote:

From: Jonathan Richardson <[email protected]>

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

Quoted 7 lines
Quoted 5 lines

No signoff from the Author?

It is a collaborative effort. Jonathan is on 2 month leave so I have taken over pushing this through or change Author.

Quoted 7 lines
Quoted 7 lines
arch/arm/Kconfig.debug +0 -0
index b11ad54..85363de 100644
@@ -1051,7 +1051,7 @@ config DEBUG_UART_PL01X
 
Quoted 10 lines

arch/arm/Kconfig.debug config DEBUG_UART_PL01X · line 1057

Quoted 7 lines
arch/arm/Kconfig.debug +1 -1
  # Compatibility options for 8250
  config DEBUG_UART_8250
-	def_bool ARCH_DOVE || ARCH_EBSA110 || \
+	def_bool ARCH_BCM_IPROC || ARCH_DOVE || ARCH_EBSA110 || \
  		(FOOTBRIDGE && !DEBUG_DC21285_PORT) || \
  		ARCH_GEMINI || ARCH_IOP13XX || ARCH_IOP32X || \
  		ARCH_IOP33X || ARCH_IXP4XX || \

As I mentioned before, this is the wrong option. Please use DEBUG_LL_UART_8250 like all the modern platforms do.

ok, will remove

Quoted 9 lines
Quoted 9 lines
arch/arm/mach-bcm/Kconfig +0 -0
index fc93800..b2b6752 100644
@@ -5,6 +5,53 @@ menuconfig ARCH_BCM
 
  if ARCH_BCM
 
Quoted 8 lines

arch/arm/mach-bcm/Kconfig menuconfig ARCH_BCM · line 11

Quoted 4 lines
arch/arm/mach-bcm/Kconfig +4 -0
+menu "iProc SoC based Machine types"
+	config ARCH_BCM_IPROC
+		bool "Broadcom ARMv7 iProc boards" if ARCH_MULTI_V7
+		depends on ARCH_BCM_CYGNUS || ARCH_BCM_5301X

Please make this a silent option by dropping the text after 'bool', and the 'depends on' line.

ok, will change, thanks

Quoted 28 lines
Quoted 13 lines
arch/arm/mach-bcm/Kconfig +12 -0
+		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
 
+
+static const char const *bcm_cygnus_dt_compat[] = {

arch/arm/mach-bcm/Kconfig menuconfig ARCH_BCM

Quoted 10 lines
arch/arm/mach-bcm/Kconfig +9 -0
+	"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 now.

Arnd

author maintainer
#30 lore raw

PATCH v4 2/7 clk: Clock driver support for Broadcom Cygnus SoC

In reply to Scott Branden

From: Jonathan Richardson <[email protected]>

The iProc clock driver controls PLLs common across iProc chips. The cygnus driver controls cygnus specific features and variations.

---
 drivers/clk/Makefile         |    1 +
 drivers/clk/bcm/Makefile     |    2 +
 drivers/clk/bcm/clk-cygnus.c | 1186 ++++++++++++++++++++++++++++++++++++++++++
 drivers/clk/bcm/clk-iproc.c  |  451 ++++++++++++++++
 4 files changed, 1640 insertions(+)
 create mode 100644 drivers/clk/bcm/clk-cygnus.c
 create mode 100644 drivers/clk/bcm/clk-iproc.c
drivers/clk/Makefile +1 -0
index f537a0b..8ac0a31 100644
@@ -37,6 +37,7 @@ obj-$(CONFIG_ARCH_VT8500)		+= clk-vt8500.o
 obj-$(CONFIG_COMMON_CLK_WM831X)		+= clk-wm831x.o
 obj-$(CONFIG_COMMON_CLK_XGENE)		+= clk-xgene.o
 obj-$(CONFIG_COMMON_CLK_AT91)		+= at91/
+obj-$(CONFIG_ARCH_BCM_IPROC)	+= bcm/
 obj-$(CONFIG_ARCH_BCM_MOBILE)		+= bcm/
 obj-$(CONFIG_ARCH_BERLIN)		+= berlin/
 obj-$(CONFIG_ARCH_HI3xxx)		+= hisilicon/
drivers/clk/bcm/Makefile +2 -0
index 6297d05..f803919 100644
@@ -2,3 +2,5 @@ obj-$(CONFIG_CLK_BCM_KONA)	+= clk-kona.o
 obj-$(CONFIG_CLK_BCM_KONA)	+= clk-kona-setup.o
 obj-$(CONFIG_CLK_BCM_KONA)	+= clk-bcm281xx.o
 obj-$(CONFIG_CLK_BCM_KONA)	+= clk-bcm21664.o
+obj-$(CONFIG_ARCH_BCM_IPROC)	+= clk-iproc.o
+obj-$(CONFIG_ARCH_BCM_CYGNUS)	+= clk-cygnus.o
drivers/clk/bcm/clk-cygnus.c new file +1186 -0

1,186 lines not on this page · raw message

drivers/clk/bcm/clk-iproc.c new file +451 -0

451 lines not on this page · raw message

Signature · 1 line
1.7.9.5
author maintainer
#31 lore raw

PATCH v4 3/7 dt-bindings: Document Broadcom Cygnus SoC and clock driver

In reply to Scott Branden

From: Jonathan Richardson <[email protected]>

---
 .../devicetree/bindings/arm/bcm/cygnus.txt         |   31 +++++
 .../devicetree/bindings/clock/clk-cygnus.txt       |  121 ++++++++++++++++++++
 .../devicetree/bindings/clock/clk-iproc.txt        |   48 ++++++++
 3 files changed, 200 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/arm/bcm/cygnus.txt
 create mode 100644 Documentation/devicetree/bindings/clock/clk-cygnus.txt
 create mode 100644 Documentation/devicetree/bindings/clock/clk-iproc.txt
Documentation/devicetree/bindings/arm/bcm/cygnus.txt new file +31 -0
new file mode 100644
index 0000000..4c77169
@@ -0,0 +1,31 @@
+Broadcom Cygnus device tree bindings
+------------------------------------
+
+
+Boards with Cygnus SoCs shall have the following properties:
+
+Required root node property:
+
+BCM11300
+compatible = "brcm,bcm11300", "brcm,cygnus";
+
+BCM11320
+compatible = "brcm,bcm11320", "brcm,cygnus";
+
+BCM11350
+compatible = "brcm,bcm11350", "brcm,cygnus";
+
+BCM11360
+compatible = "brcm,bcm11360", "brcm,cygnus";
+
+BCM58300
+compatible = "brcm,bcm58300", "brcm,cygnus";
+
+BCM58302
+compatible = "brcm,bcm58302", "brcm,cygnus";
+
+BCM58303
+compatible = "brcm,bcm58303", "brcm,cygnus";
+
+BCM58305
+compatible = "brcm,bcm58305", "brcm,cygnus";
Documentation/devicetree/bindings/clock/clk-cygnus.txt new file +121 -0

121 lines not on this page · raw message

Documentation/devicetree/bindings/clock/clk-iproc.txt new file +48 -0

48 lines not on this page · raw message

Signature · 1 line
1.7.9.5
author maintainer
#32 lore raw

PATCH v4 4/7 ARM: cygnus defconfig : Initial defconfig for Broadcom Cygnus SoC

In reply to Scott Branden

From: Jonathan Richardson <[email protected]>

This defconfig is utilized so a customer or developer can understand what kernel drivers are utilized by the Cygnus SoC. It also enables debug configs which should be disabled if optimal performance is desired.

---
 arch/arm/configs/bcm_cygnus_defconfig |  221 +++++++++++++++++++++++++++++++++
 1 file changed, 221 insertions(+)
 create mode 100644 arch/arm/configs/bcm_cygnus_defconfig
arch/arm/configs/bcm_cygnus_defconfig new file +221 -0
new file mode 100644
index 0000000..cf4c107
@@ -0,0 +1,221 @@
+CONFIG_KERNEL_XZ=y
+# CONFIG_SWAP is not set
+CONFIG_SYSVIPC=y
+CONFIG_IRQ_DOMAIN_DEBUG=y
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_BSD_PROCESS_ACCT=y
+CONFIG_BSD_PROCESS_ACCT_V3=y
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_LOG_BUF_SHIFT=19
+CONFIG_CGROUPS=y
+CONFIG_CGROUP_FREEZER=y
+CONFIG_CGROUP_DEVICE=y
+CONFIG_CGROUP_CPUACCT=y
+CONFIG_RESOURCE_COUNTERS=y
+CONFIG_CGROUP_SCHED=y
+CONFIG_BLK_CGROUP=y
+CONFIG_NAMESPACES=y
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_EMBEDDED=y
+CONFIG_PERF_EVENTS=y
+# CONFIG_COMPAT_BRK is not set
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_BLK_DEV_BSG is not set
+CONFIG_PARTITION_ADVANCED=y
+CONFIG_ARCH_BCM=y
+CONFIG_ARCH_BCM_CYGNUS=y
+CONFIG_ARM_THUMBEE=y
+CONFIG_PREEMPT=y
+CONFIG_AEABI=y
+CONFIG_HIGHMEM=y
+# CONFIG_COMPACTION is not set
+# CONFIG_ATAGS is not set
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_ARM_APPENDED_DTB=y
+CONFIG_CPU_IDLE=y
+CONFIG_VFP=y
+CONFIG_NEON=y
+# CONFIG_SUSPEND is not set
+CONFIG_NET=y
+CONFIG_PACKET=y
+CONFIG_UNIX=y
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+CONFIG_IP_ADVANCED_ROUTER=y
+CONFIG_IP_MULTIPLE_TABLES=y
+CONFIG_IP_ROUTE_MULTIPATH=y
+CONFIG_IP_ROUTE_VERBOSE=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_MROUTE=y
+CONFIG_IP_MROUTE_MULTIPLE_TABLES=y
+CONFIG_SYN_COOKIES=y
+# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
+# CONFIG_INET_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_BEET is not set
+# CONFIG_INET_LRO is not set
+# CONFIG_INET_DIAG is not set
+CONFIG_TCP_CONG_ADVANCED=y
+# CONFIG_TCP_CONG_BIC is not set
+# CONFIG_TCP_CONG_WESTWOOD is not set
+# CONFIG_TCP_CONG_HTCP is not set
+CONFIG_IPV6=y
+# CONFIG_INET6_XFRM_MODE_TRANSPORT is not set
+# CONFIG_INET6_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET6_XFRM_MODE_BEET is not set
+# CONFIG_IPV6_SIT is not set
+CONFIG_IPV6_MULTIPLE_TABLES=y
+CONFIG_IPV6_SUBTREES=y
+CONFIG_IPV6_MROUTE=y
+CONFIG_NETFILTER=y
+# CONFIG_BRIDGE_NETFILTER is not set
+CONFIG_NF_CONNTRACK=y
+# CONFIG_NF_CONNTRACK_PROCFS is not set
+CONFIG_NF_CONNTRACK_FTP=y
+CONFIG_NF_CONNTRACK_IPV4=y
+CONFIG_IP_NF_IPTABLES=y
+CONFIG_IP_NF_FILTER=y
+CONFIG_IP_NF_TARGET_REJECT=y
+CONFIG_IP_NF_NAT=y
+CONFIG_IP_NF_TARGET_MASQUERADE=y
+CONFIG_IP_NF_TARGET_REDIRECT=y
+CONFIG_IP_NF_MANGLE=y
+CONFIG_IP_NF_RAW=y
+CONFIG_NF_CONNTRACK_IPV6=y
+CONFIG_IP6_NF_IPTABLES=y
+CONFIG_IP6_NF_MATCH_AH=y
+CONFIG_IP6_NF_MATCH_EUI64=y
+CONFIG_IP6_NF_MATCH_FRAG=y
+CONFIG_IP6_NF_MATCH_OPTS=y
+CONFIG_IP6_NF_MATCH_IPV6HEADER=y
+CONFIG_IP6_NF_MATCH_MH=y
+CONFIG_IP6_NF_MATCH_RT=y
+CONFIG_IP6_NF_FILTER=y
+CONFIG_IP6_NF_TARGET_REJECT=y
+CONFIG_IP6_NF_MANGLE=y
+CONFIG_IP6_NF_RAW=y
+CONFIG_BRIDGE=y
+# CONFIG_BRIDGE_IGMP_SNOOPING is not set
+CONFIG_VLAN_8021Q=y
+CONFIG_NET_SCHED=y
+CONFIG_NET_SCH_FQ_CODEL=y
+CONFIG_DEVTMPFS=y
+CONFIG_DEVTMPFS_MOUNT=y
+# CONFIG_FIRMWARE_IN_KERNEL is not set
+CONFIG_MTD=y
+CONFIG_MTD_CMDLINE_PARTS=y
+CONFIG_MTD_BLOCK=y
+CONFIG_MTD_NAND=y
+CONFIG_MTD_UBI=y
+# CONFIG_BLK_DEV is not set
+CONFIG_SCSI=y
+CONFIG_BLK_DEV_SD=y
+CONFIG_NETDEVICES=y
+# CONFIG_NET_CADENCE is not set
+# CONFIG_NET_VENDOR_CIRRUS is not set
+# CONFIG_NET_VENDOR_FARADAY is not set
+# CONFIG_NET_VENDOR_INTEL is not set
+# CONFIG_NET_VENDOR_MARVELL is not set
+# CONFIG_NET_VENDOR_MICREL is not set
+# CONFIG_NET_VENDOR_NATSEMI is not set
+# CONFIG_NET_VENDOR_SEEQ is not set
+# CONFIG_NET_VENDOR_SMSC is not set
+# CONFIG_NET_VENDOR_STMICRO is not set
+# CONFIG_NET_VENDOR_WIZNET is not set
+CONFIG_PHYLIB=y
+CONFIG_BROADCOM_PHY=y
+# CONFIG_INPUT_MOUSEDEV is not set
+# CONFIG_KEYBOARD_ATKBD is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_SERIO is not set
+# CONFIG_LEGACY_PTYS is not set
+CONFIG_SERIAL_8250=y
+# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_8250_NR_UARTS=2
+CONFIG_SERIAL_8250_RUNTIME_UARTS=2
+CONFIG_SERIAL_8250_DW=y
+CONFIG_SERIAL_OF_PLATFORM=y
+# CONFIG_HW_RANDOM is not set
+CONFIG_I2C=y
+CONFIG_I2C_CHARDEV=y
+# CONFIG_I2C_HELPER_AUTO is not set
+CONFIG_I2C_SMBUS=y
+CONFIG_SPI=y
+CONFIG_SPI_PL022=y
+CONFIG_SPI_SPIDEV=y
+CONFIG_GPIO_SYSFS=y
+# CONFIG_HWMON is not set
+CONFIG_WATCHDOG=y
+CONFIG_ARM_SP805_WATCHDOG=y
+CONFIG_FB=y
+CONFIG_FB_ARMCLCD=y
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+# CONFIG_LCD_CLASS_DEVICE is not set
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+# CONFIG_BACKLIGHT_GENERIC is not set
+CONFIG_BACKLIGHT_PWM=y
+CONFIG_SOUND=y
+CONFIG_SND=y
+CONFIG_SND_DYNAMIC_MINORS=y
+CONFIG_SND_VERBOSE_PRINTK=y
+CONFIG_SND_DEBUG=y
+CONFIG_SND_USB_AUDIO=y
+CONFIG_SND_SOC=y
+CONFIG_USB=y
+CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_EHCI_ROOT_HUB_TT=y
+CONFIG_USB_EHCI_HCD_PLATFORM=y
+CONFIG_USB_STORAGE=y
+CONFIG_MMC=y
+CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_PLTFM=y
+CONFIG_PWM=y
+CONFIG_EXT4_FS=y
+CONFIG_MSDOS_FS=y
+CONFIG_VFAT_FS=y
+CONFIG_NTFS_FS=y
+CONFIG_TMPFS=y
+CONFIG_TMPFS_POSIX_ACL=y
+CONFIG_UBIFS_FS=y
+CONFIG_NFS_FS=y
+CONFIG_ROOT_NFS=y
+CONFIG_NLS_CODEPAGE_437=y
+CONFIG_NLS_ISO8859_1=y
+CONFIG_NLS_UTF8=y
+CONFIG_DYNAMIC_DEBUG=y
+CONFIG_DEBUG_INFO=y
+CONFIG_DEBUG_INFO_REDUCED=y
+CONFIG_STRIP_ASM_SYMS=y
+CONFIG_DEBUG_FS=y
+CONFIG_MAGIC_SYSRQ=y
+CONFIG_DEBUG_OBJECTS=y
+CONFIG_DEBUG_OBJECTS_RCU_HEAD=y
+CONFIG_SLUB_DEBUG_ON=y
+CONFIG_DEBUG_MEMORY_INIT=y
+CONFIG_DEBUG_SHIRQ=y
+CONFIG_DETECT_HUNG_TASK=y
+CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=110
+CONFIG_BOOTPARAM_HUNG_TASK_PANIC=y
+# CONFIG_SCHED_DEBUG is not set
+CONFIG_SCHEDSTATS=y
+CONFIG_DEBUG_RT_MUTEXES=y
+CONFIG_PROVE_LOCKING=y
+CONFIG_DEBUG_ATOMIC_SLEEP=y
+# CONFIG_DEBUG_BUGVERBOSE is not set
+CONFIG_DEBUG_SG=y
+CONFIG_DEBUG_NOTIFIERS=y
+CONFIG_DEBUG_CREDENTIALS=y
+CONFIG_PROVE_RCU=y
+CONFIG_DEBUG_USER=y
+CONFIG_DEBUG_LL=y
+CONFIG_DEBUG_LL_UART_8250=y
+CONFIG_DEBUG_UART_PHYS=0x18023000
+CONFIG_DEBUG_UART_VIRT=0xf1023000
+CONFIG_EARLY_PRINTK=y
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
Signature · 1 line
1.7.9.5
author maintainer
#33 lore raw

PATCH v4 5/7 ARM: dts: Enable Broadcom Cygnus SoC

In reply to Scott Branden

From: Jonathan Richardson <[email protected]>

DT files to enable cygnus consisting of the enterprise phone board variant and cygnus core configuration.

---
 arch/arm/boot/dts/Makefile             |    1 +
 arch/arm/boot/dts/bcm-cygnus.dtsi      |  349 ++++++++++++++++++++++++++++++++
 arch/arm/boot/dts/bcm911360_entphn.dts |   22 ++
 3 files changed, 372 insertions(+)
 create mode 100644 arch/arm/boot/dts/bcm-cygnus.dtsi
 create mode 100644 arch/arm/boot/dts/bcm911360_entphn.dts
arch/arm/boot/dts/Makefile +1 -0
index b8c5cd3..b95d41d 100644
@@ -52,6 +52,7 @@ dtb-$(CONFIG_ARCH_AT91)	+= sama5d36ek.dtb
 dtb-$(CONFIG_ARCH_ATLAS6) += atlas6-evb.dtb
 dtb-$(CONFIG_ARCH_AXXIA) += axm5516-amarillo.dtb
 dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b.dtb
+dtb-$(CONFIG_ARCH_BCM_CYGNUS) += bcm911360_entphn.dtb
 dtb-$(CONFIG_ARCH_BCM_5301X) += bcm4708-netgear-r6250.dtb
 dtb-$(CONFIG_ARCH_BCM_MOBILE) += bcm28155-ap.dtb \
 	bcm21664-garnet.dtb
arch/arm/boot/dts/bcm-cygnus.dtsi new file +349 -0

349 lines not on this page · raw message

arch/arm/boot/dts/bcm911360_entphn.dts new file +22 -0
new file mode 100644
index 0000000..c5188d7
@@ -0,0 +1,22 @@
+/*
+ * 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.
+ */
+
+/dts-v1/;
+
+#include "bcm-cygnus.dtsi"
+
+/ {
+	model = "Cygnus Enterprise Phone (BCM911360_ENTPHN)";
+	compatible = "brcm,bcm11360", "brcm,cygnus";
+};
Signature · 1 line
1.7.9.5
maintainer
#34 lore raw

Re: [PATCH V4 5/7] ARM: dts: Enable Broadcom Cygnus SoC

Quoted 7 lines · On Thursday 09 October 2014 15:44:29 Scott Branden wrote:
arch/arm/boot/dts/bcm-cygnus.dtsi new file +7 -0
+
+               lcpll: lcpll at 0301d02c {
+                       #clock-cells = <0>;
+                       compatible = "brcm,cygnus-lcpll-clk";
+                       reg = <0x0301d02c 0x1c>;
+                       clocks = <&osc>;
+               };

arch/arm/boot/dts/bcm-cygnus.dtsi line 72

Quoted 10 lines
arch/arm/boot/dts/bcm-cygnus.dtsi new file +10 -0
+
+               genpll: genpll at 0301d000 {
+                       #clock-cells = <0>;
+                       compatible = "brcm,cygnus-genpll-clk";
+                       reg = <0x0301d000 0x2c>,
+                                 <0x180AA024 0x4>,
+                                 <0x0301C020 0x4>;
+                       clocks = <&osc>;
+               };
+

To be honest, I'm not too happy about the way you specify a single register for each clock as a global 'reg' property.

Presumably each of these registers is part of an IP block that does multiple things, so it would be better to start out with a binding for each IP block. How many of these blocks are used for clocks, and what do they do?

Arnd

author maintainer
#35 lore raw

Re: [PATCH V4 5/7] ARM: dts: Enable Broadcom Cygnus SoC

Quoted 13 lines · Arnd Bergmann
Quoted 12 lines · On Thursday 09 October 2014 15:44:29 Scott Branden wrote:
arch/arm/boot/dts/bcm-cygnus.dtsi new file +12 -0
+
+               lcpll: lcpll at 0301d02c {
+                       #clock-cells = <0>;
+                       compatible = "brcm,cygnus-lcpll-clk";
+                       reg = <0x0301d02c 0x1c>;
+                       clocks = <&osc>;
+               };
+
+               genpll: genpll at 0301d000 {
+                       #clock-cells = <0>;
+                       compatible = "brcm,cygnus-genpll-clk";
+                       reg = <0x0301d000 0x2c>,
Quoted 8 lines

arch/arm/boot/dts/bcm-cygnus.dtsi line 72

Quoted 5 lines
arch/arm/boot/dts/bcm-cygnus.dtsi new file +5 -0
+                                 <0x180AA024 0x4>,
+                                 <0x0301C020 0x4>;
+                       clocks = <&osc>;
+               };
+

To be honest, I'm not too happy about the way you specify a single register for each clock as a global 'reg' property.

I'm not happy with this either. Will rework.

Quoted 5 lines

Presumably each of these registers is part of an IP block that does multiple things, so it would be better to start out with a binding for each IP block. How many of these blocks are used for clocks, and what do they do?

Clocks are a little scattered in the chip and don't make a lot of sense for easy software programming. Will look at how to change bindings so they are flexible to work on other generations.

Quoted 3 lines

Arnd

author maintainer
#36 lore raw

PATCH v4 6/7 MAINTAINERS: Entry for Cygnus/iproc arm architecture and clock drivers

In reply to Scott Branden
---
 MAINTAINERS |   17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)
MAINTAINERS +16 -1
index a12edf2..0900082 100644
@@ -2071,9 +2071,24 @@ L:	linux-scsi at vger.kernel.org
 S:	Supported
 F:	drivers/scsi/bnx2i/
 
-BROADCOM KONA GPIO DRIVER
+BROADCOM CYGNUS/IPROC ARM ARCHITECTURE
 M:	Ray Jui <[email protected]>
+M:	Scott Branden <[email protected]>
+L:	linux-arm-kernel at lists.infradead.org (moderated for non-subscribers)
 L:	bcm-kernel-feedback-list at broadcom.com
+S:	Maintained
+F:	Documentation/devicetree/bindings/arm/bcm/cygnus.txt
+F:	arch/arm/boot/dts/bcm-cygnus.dtsi
+F:	arch/arm/boot/dts/bcm911360_entphn.dts
+F:	arch/arm/configs/bcm_cygnus_defconfig
+F:	arch/arm/mach-bcm/bcm_cygnus.c
+F:	Documentation/devicetree/bindings/clock/clk-cygnus.txt
+F:	Documentation/devicetree/bindings/clock/clk-iproc.txt
+F:	drivers/clk/bcm/clk-cygnus.c
+F:	drivers/clk/bcm/clk-iproc.c
+
+BROADCOM KONA GPIO DRIVER
+M:	Ray Jui <[email protected]>
 S:	Supported
 F:	drivers/gpio/gpio-bcm-kona.c
 F:	Documentation/devicetree/bindings/gpio/gpio-bcm-kona.txt
Signature · 1 line
1.7.9.5
#37 lore raw

Re: [PATCH V4 6/7] MAINTAINERS: Entry for Cygnus/iproc arm architecture and clock drivers

Quoted 26 lines · Scott Branden
---
 MAINTAINERS |   17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)
MAINTAINERS +9 -1
index a12edf2..0900082 100644
@@ -2071,9 +2071,24 @@ L:	linux-scsi at vger.kernel.org
 S:	Supported
 F:	drivers/scsi/bnx2i/
 
-BROADCOM KONA GPIO DRIVER
+BROADCOM CYGNUS/IPROC ARM ARCHITECTURE
 M:	Ray Jui <[email protected]>
+M:	Scott Branden <[email protected]>
+L:	linux-arm-kernel at lists.infradead.org (moderated for non-subscribers)
 L:	bcm-kernel-feedback-list at broadcom.com
+S:	Maintained
+F:	Documentation/devicetree/bindings/arm/bcm/cygnus.txt
+F:	arch/arm/boot/dts/bcm-cygnus.dtsi
+F:	arch/arm/boot/dts/bcm911360_entphn.dts
+F:	arch/arm/configs/bcm_cygnus_defconfig
+F:	arch/arm/mach-bcm/bcm_cygnus.c

MAINTAINERS L: linux-scsi at vger.kernel.org · line 2094

Quoted 10 lines
MAINTAINERS +7 -0
+F:	Documentation/devicetree/bindings/clock/clk-cygnus.txt
+F:	Documentation/devicetree/bindings/clock/clk-iproc.txt
+F:	drivers/clk/bcm/clk-cygnus.c
+F:	drivers/clk/bcm/clk-iproc.c
+
+BROADCOM KONA GPIO DRIVER
+M:	Ray Jui <[email protected]>
 S:	Supported
 F:	drivers/gpio/gpio-bcm-kona.c
 F:	Documentation/devicetree/bindings/gpio/gpio-bcm-kona.txt

This drops this L line from BROADCOM KONA GPIO DRIVER
L: bcm-kernel-feedback-list at broadcom.com

Is that what you want?

author maintainer
#38 lore raw

Re: [PATCH V4 6/7] MAINTAINERS: Entry for Cygnus/iproc arm architecture and clock drivers

Quoted 41 lines · Joe Perches
Quoted 26 lines · Scott Branden
---
  MAINTAINERS |   17 ++++++++++++++++-
  1 file changed, 16 insertions(+), 1 deletion(-)
MAINTAINERS +9 -1
index a12edf2..0900082 100644
@@ -2071,9 +2071,24 @@ L:	linux-scsi at vger.kernel.org
  S:	Supported
  F:	drivers/scsi/bnx2i/
 
-BROADCOM KONA GPIO DRIVER
+BROADCOM CYGNUS/IPROC ARM ARCHITECTURE
  M:	Ray Jui <[email protected]>
+M:	Scott Branden <[email protected]>
+L:	linux-arm-kernel at lists.infradead.org (moderated for non-subscribers)
  L:	bcm-kernel-feedback-list at broadcom.com
+S:	Maintained
+F:	Documentation/devicetree/bindings/arm/bcm/cygnus.txt
+F:	arch/arm/boot/dts/bcm-cygnus.dtsi
+F:	arch/arm/boot/dts/bcm911360_entphn.dts
+F:	arch/arm/configs/bcm_cygnus_defconfig
+F:	arch/arm/mach-bcm/bcm_cygnus.c

MAINTAINERS L: linux-scsi at vger.kernel.org · line 2094

Quoted 10 lines
MAINTAINERS +7 -0
+F:	Documentation/devicetree/bindings/clock/clk-cygnus.txt
+F:	Documentation/devicetree/bindings/clock/clk-iproc.txt
+F:	drivers/clk/bcm/clk-cygnus.c
+F:	drivers/clk/bcm/clk-iproc.c
+
+BROADCOM KONA GPIO DRIVER
+M:	Ray Jui <[email protected]>
  S:	Supported
  F:	drivers/gpio/gpio-bcm-kona.c
  F:	Documentation/devicetree/bindings/gpio/gpio-bcm-kona.txt

This drops this L line from BROADCOM KONA GPIO DRIVER
L: bcm-kernel-feedback-list at broadcom.com

Quoted 1 line

Is that what you want?

Wow, sorry. I'll correct after further comments.

Quoted 1 line
author maintainer
#39 lore raw

PATCH v4 7/7 ARM: multi_v7_defconfig: Enable ARCH_BCM_CYGNUS config

In reply to Scott Branden

Enabled Broadcom Cygnus SoC family in multi_v7_defconfig by using CONFIG_ARCH_BCM_CYGNUS=y.

---
 arch/arm/configs/multi_v7_defconfig |    1 +
 1 file changed, 1 insertion(+)
arch/arm/configs/multi_v7_defconfig +1 -0
index 5fb95fb..d02f56d 100644
@@ -17,6 +17,7 @@ CONFIG_MACH_ARMADA_38X=y
 CONFIG_MACH_ARMADA_XP=y
 CONFIG_MACH_DOVE=y
 CONFIG_ARCH_BCM=y
+CONFIG_ARCH_BCM_CYGNUS=y
 CONFIG_ARCH_BCM_MOBILE=y
 CONFIG_ARCH_BCM_5301X=y
 CONFIG_ARCH_BRCMSTB=y
Signature · 1 line
1.7.9.5
maintainer
#40 lore raw

Re: [PATCH V4 7/7] ARM: multi_v7_defconfig: Enable ARCH_BCM_CYGNUS config

Quoted 14 lines · On Thursday 09 October 2014 15:44:31 Scott Branden wrote:

Enabled Broadcom Cygnus SoC family in multi_v7_defconfig by using CONFIG_ARCH_BCM_CYGNUS=y.

---
 arch/arm/configs/multi_v7_defconfig |    1 +
 1 file changed, 1 insertion(+)
arch/arm/configs/multi_v7_defconfig +0 -0
index 5fb95fb..d02f56d 100644

arch/arm/configs/multi_v7_defconfig CONFIG_MACH_ARMADA_38X=y · line 23

Quoted 7 lines
arch/arm/configs/multi_v7_defconfig +1 -0
@@ -17,6 +17,7 @@ CONFIG_MACH_ARMADA_38X=y
 CONFIG_MACH_ARMADA_XP=y
 CONFIG_MACH_DOVE=y
 CONFIG_ARCH_BCM=y
+CONFIG_ARCH_BCM_CYGNUS=y
 CONFIG_ARCH_BCM_MOBILE=y
 CONFIG_ARCH_BCM_5301X=y
 CONFIG_ARCH_BRCMSTB=y

Does this contain all the drivers you need that are enabled in cygnus_defconfig?

Arnd

author maintainer
#41 lore raw

Re: [PATCH V4 7/7] ARM: multi_v7_defconfig: Enable ARCH_BCM_CYGNUS config

Quoted 9 lines · Arnd Bergmann
Quoted 8 lines · On Thursday 09 October 2014 15:44:31 Scott Branden wrote:

Enabled Broadcom Cygnus SoC family in multi_v7_defconfig by using CONFIG_ARCH_BCM_CYGNUS=y.

---
  arch/arm/configs/multi_v7_defconfig |    1 +
  1 file changed, 1 insertion(+)
Quoted 15 lines

arch/arm/configs/multi_v7_defconfig CONFIG_MACH_ARMADA_38X=y · line 23

Quoted 13 lines
arch/arm/configs/multi_v7_defconfig +1 -0
index 5fb95fb..d02f56d 100644
@@ -17,6 +17,7 @@ CONFIG_MACH_ARMADA_38X=y
  CONFIG_MACH_ARMADA_XP=y
  CONFIG_MACH_DOVE=y
  CONFIG_ARCH_BCM=y
+CONFIG_ARCH_BCM_CYGNUS=y
  CONFIG_ARCH_BCM_MOBILE=y
  CONFIG_ARCH_BCM_5301X=y
  CONFIG_ARCH_BRCMSTB=y

Does this contain all the drivers you need that are enabled in cygnus_defconfig?

Will enable more - thanks for reminding.

Quoted 3 lines

Arnd

author maintainer
#42 lore raw

cover sdhci-bcm2835: added quirk and removed udelay in write ops

In reply to a message not in the archive

This patch contains driver cleanup of sdhci-bcm2835. Please note that this has not actually been tested on bcm2835 yet. Testing comes from other devices with the same sdhci controller.

This patch is being put out for testing and acceptance on the 2835. Please test and comment.

Scott Branden (1):
mmc: sdhci-bcm2835: added quirk and removed udelay in write ops

 drivers/mmc/host/sdhci-bcm2835.c |  139 ++++++++++++++++++--------------------
 1 file changed, 66 insertions(+), 73 deletions(-)
Signature · 1 line
1.7.9.5
author maintainer
#43 lore raw

PATCH 1/1 mmc: sdhci-bcm2835: added quirk and removed udelay in write ops

Added quirk SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12 present in controller. Removed udelay in write ops by using shadow registers for 16 bit accesses to 32-bit registers (where necessary).
Optimized 32-bit operations when doing 8/16 register accesses.

---
 drivers/mmc/host/sdhci-bcm2835.c |  139 ++++++++++++++++++--------------------
 1 file changed, 66 insertions(+), 73 deletions(-)
drivers/mmc/host/sdhci-bcm2835.c +66 -73
index 439d259..d967a4f 100644
@@ -25,42 +25,28 @@
 #include "sdhci-pltfm.h"
 
 /*
- * 400KHz is max freq for card ID etc. Use that as min card clock. We need to
- * know the min to enable static calculation of max BCM2835_SDHCI_WRITE_DELAY.
- */
-#define MIN_FREQ 400000
-
-/*
  * The Arasan has a bugette whereby it may lose the content of successive
- * writes to registers that are within two SD-card clock cycles of each other
- * (a clock domain crossing problem). It seems, however, that the data
- * register does not have this problem, which is just as well - otherwise we'd
- * have to nobble the DMA engine too.
+ * writes to the same register that are within two SD-card clock cycles of
+ * each other (a clock domain crossing problem).  Problem does not happen with
+ * data.
+ * This wouldn't be a problem with the code except that we can only write the
+ * controller with 32-bit writes.  So two different 16-bit registers in the
+ * written back to back creates the problem.
  *
- * This should probably be dynamically calculated based on the actual card
- * frequency. However, this is the longest we'll have to wait, and doesn't
- * seem to slow access down too much, so the added complexity doesn't seem
- * worth it for now.
- *
- * 1/MIN_FREQ is (max) time per tick of eMMC clock.
- * 2/MIN_FREQ is time for two ticks.
- * Multiply by 1000000 to get uS per two ticks.
- * *1000000 for uSecs.
- * +1 for hack rounding.
+ * In reality, this only happens when a SDHCI_BLOCK_SIZE and SDHCI_BLOCK_COUNT
+ * are written followed by SDHCI_TRANSFER_MODE and SDHCI_COMMAND.
+ * The BLOCK_SIZE and BLOCK_COUNT are meaningless until a command issued so
+ * the work around can be further optimized. We can keep shadow values of
+ * BLOCK_SIZE, BLOCK_COUNT, and TRANSFER_MODE until a COMMAND is issued.
+ * Then, write the BLOCK_SIZE+BLOCK_COUNT in a single 32-bit write followed
+ * by the TRANSFER+COMMAND in another 32-bit write.
  */
-#define BCM2835_SDHCI_WRITE_DELAY	(((2 * 1000000) / MIN_FREQ) + 1)
 
-struct bcm2835_sdhci {
-	u32 shadow;
+struct bcm2835_sdhci_host {
+	u32 shadow_cmd;
+	u32 shadow_blk;
 };
 
-static void bcm2835_sdhci_writel(struct sdhci_host *host, u32 val, int reg)
-{
-	writel(val, host->ioaddr + reg);
-
-	udelay(BCM2835_SDHCI_WRITE_DELAY);
-}
-
 static inline u32 bcm2835_sdhci_readl(struct sdhci_host *host, int reg)
 {
 	u32 val = readl(host->ioaddr + reg);
@@ -71,76 +57,83 @@ static inline u32 bcm2835_sdhci_readl(struct sdhci_host *host, int reg)
 	return val;
 }
 
-static void bcm2835_sdhci_writew(struct sdhci_host *host, u16 val, int reg)
-{
-	struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
-	struct bcm2835_sdhci *bcm2835_host = pltfm_host->priv;
-	u32 oldval = (reg == SDHCI_COMMAND) ? bcm2835_host->shadow :
-		bcm2835_sdhci_readl(host, reg & ~3);
-	u32 word_num = (reg >> 1) & 1;
-	u32 word_shift = word_num * 16;
-	u32 mask = 0xffff << word_shift;
-	u32 newval = (oldval & ~mask) | (val << word_shift);
-
-	if (reg == SDHCI_TRANSFER_MODE)
-		bcm2835_host->shadow = newval;
-	else
-		bcm2835_sdhci_writel(host, newval, reg & ~3);
-}
-
 static u16 bcm2835_sdhci_readw(struct sdhci_host *host, int reg)
 {
-	u32 val = bcm2835_sdhci_readl(host, (reg & ~3));
-	u32 word_num = (reg >> 1) & 1;
-	u32 word_shift = word_num * 16;
-	u32 word = (val >> word_shift) & 0xffff;
-
+	u32 val = bcm2835_sdhci_readl(host->ioaddr, (reg & ~3));
+	u16 word = val >> (reg << 3 & 0x18) & 0xffff;
 	return word;
 }
 
-static void bcm2835_sdhci_writeb(struct sdhci_host *host, u8 val, int reg)
+static u8 bcm2835_sdhci_readb(struct sdhci_host *host, int reg)
 {
-	u32 oldval = bcm2835_sdhci_readl(host, reg & ~3);
-	u32 byte_num = reg & 3;
-	u32 byte_shift = byte_num * 8;
-	u32 mask = 0xff << byte_shift;
-	u32 newval = (oldval & ~mask) | (val << byte_shift);
+	u32 val = bcm2835_sdhci_readl(host->ioaddr, (reg & ~3));
+	u8 byte = val >> (reg << 3 & 0x18) & 0xff;
+	return byte;
+}
 
-	bcm2835_sdhci_writel(host, newval, reg & ~3);
+static void bcm2835_sdhci_writel(struct sdhci_host *host, u32 val, int reg)
+{
+	writel(val, host->ioaddr + reg);
 }
 
-static u8 bcm2835_sdhci_readb(struct sdhci_host *host, int reg)
+static void bcm2835_sdhci_writew(struct sdhci_host *host, u16 val, int reg)
 {
-	u32 val = bcm2835_sdhci_readl(host, (reg & ~3));
-	u32 byte_num = reg & 3;
-	u32 byte_shift = byte_num * 8;
-	u32 byte = (val >> byte_shift) & 0xff;
+	struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
+	struct bcm2835_sdhci_host *bcm2835_host = pltfm_host->priv;
+	u32 word_shift = reg << 3 & 0x18;
+	u32 mask = 0xffff << word_shift;
+	u32 oldval;
+	u32 newval;
+
+	if (reg == SDHCI_COMMAND) {
+		if (bcm2835_host->shadow_blk != 0) {
+			writel(bcm2835_host->shadow_blk,
+			       host->ioaddr + SDHCI_BLOCK_SIZE);
+			bcm2835_host->shadow_blk = 0;
+		}
+		oldval = bcm2835_host->shadow_cmd;
+	} else if (reg == SDHCI_BLOCK_SIZE || reg == SDHCI_BLOCK_COUNT) {
+		oldval = bcm2835_host->shadow_blk;
+	} else {
+		oldval = readl(host->ioaddr + (reg & ~3));
+	}
+	newval = (oldval & ~mask) | (val << word_shift);
 
-	return byte;
+	if (reg == SDHCI_TRANSFER_MODE)
+		bcm2835_host->shadow_cmd = newval;
+	else if (reg == SDHCI_BLOCK_SIZE || reg == SDHCI_BLOCK_COUNT)
+		bcm2835_host->shadow_blk = newval;
+	else
+		writel(newval, host->ioaddr + (reg & ~3));
 }
 
-static unsigned int bcm2835_sdhci_get_min_clock(struct sdhci_host *host)
+static void bcm2835_sdhci_writeb(struct sdhci_host *host, u8 val, int reg)
 {
-	return MIN_FREQ;
+	u32 oldval = readl(host->ioaddr + (reg & ~3));
+	u32 byte_shift = reg << 3 & 0x18;
+	u32 mask = 0xff << byte_shift;
+	u32 newval = (oldval & ~mask) | (val << byte_shift);
+
+	writel(newval, host->ioaddr + (reg & ~3));
 }
 
 static const struct sdhci_ops bcm2835_sdhci_ops = {
-	.write_l = bcm2835_sdhci_writel,
-	.write_w = bcm2835_sdhci_writew,
-	.write_b = bcm2835_sdhci_writeb,
 	.read_l = bcm2835_sdhci_readl,
 	.read_w = bcm2835_sdhci_readw,
 	.read_b = bcm2835_sdhci_readb,
+	.write_l = bcm2835_sdhci_writel,
+	.write_w = bcm2835_sdhci_writew,
+	.write_b = bcm2835_sdhci_writeb,
 	.set_clock = sdhci_set_clock,
 	.get_max_clock = sdhci_pltfm_clk_get_max_clock,
-	.get_min_clock = bcm2835_sdhci_get_min_clock,
 	.set_bus_width = sdhci_set_bus_width,
 	.reset = sdhci_reset,
 	.set_uhs_signaling = sdhci_set_uhs_signaling,
 };
 
 static const struct sdhci_pltfm_data bcm2835_sdhci_pdata = {
-	.quirks = SDHCI_QUIRK_BROKEN_CARD_DETECTION |
+	.quirks = SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12 |
+		  SDHCI_QUIRK_BROKEN_CARD_DETECTION |
 		  SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK,
 	.ops = &bcm2835_sdhci_ops,
 };
@@ -148,7 +141,7 @@ static const struct sdhci_pltfm_data bcm2835_sdhci_pdata = {
 static int bcm2835_sdhci_probe(struct platform_device *pdev)
 {
 	struct sdhci_host *host;
-	struct bcm2835_sdhci *bcm2835_host;
+	struct bcm2835_sdhci_host *bcm2835_host;
 	struct sdhci_pltfm_host *pltfm_host;
 	int ret;
 
Signature · 1 line
1.7.9.5
#44 lore raw

Re: [PATCH 1/1] mmc: sdhci-bcm2835: added quirk and removed udelay in write ops

Quoted 4 lines · Scott Branden

Added quirk SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12 present in controller. Removed udelay in write ops by using shadow registers for 16 bit accesses to 32-bit registers (where necessary).
Optimized 32-bit operations when doing 8/16 register accesses.

I'm going to assume this is identical to the patch you sent 8/15? So, I'll ignore this copy...

author maintainer
#45 lore raw

v5 cover Add initial support for Broadcom Cygnus SoC

In reply to a message not in the archive

This patchset contains initial support for Broadcom's Cygnus SoC based on our iProc architecture. Initial support is minimal and includes just the mach platform code, clock driver, and a basic device tree configuration. Peripheral drivers will be submitted soon, as will device tree configurations for other Cygnus board variants.

Changes from v4:
- simple clock tree used. reworked clock driver will be submitted later
- fixed MAINTAINERS patchset error
- removed DEBUG_UART_8250 Kconfig.debug legacy support
- made ARCH_BCM_IPROC a silent Kconfig option
- removed multi_v7_defconfig as it is not needed at this time, can support in future patchset but does not seem optimal configs for our current usage.

Changes from v3:
- restart functionality removed. Will be added in a different patchset in drivers/power
- removed NEON init sequence. Will be moved to bootloader
- cleaned up Kconfigs for ARCH_BCM_CYGNUS by removing unnecessary selects
- consolidated ARCH_BCM_IPROC with select from ARCH_BCM_CYGNUS and ARCH_BCM5301X
- removed bcm911360_entphn binding
- added documentation for SoCs currently supported in Cygnus family

Changes from v2:
- rebased to 3.17 kernel

Changes from v1:
- Address code review comments as per previous responses.
- Copyright headers updated to remove Broadcom URL.
- mach platform code still contains hard coded addresses. These address are the same for all Cygnus variants. Could you please provide guidance on where they should go if you would still like them changed. There does not seem to be a reason to change them to device tree as they do not change.

Jonathan Richardson (3):
ARM: cygnus: Initial support for Broadcom Cygnus SoC
dt-bindings: Document Broadcom Cygnus SoC and clocks
ARM: cygnus defconfig : Initial defconfig for Broadcom Cygnus SoC

Scott Branden (3):
ARM: dts: Enable Broadcom Cygnus SoC
MAINTAINERS: Entry for Cygnus/iproc arm architecture
ARM: mach-bcm: Consolidate currently supported IPROC SoCs

 .../devicetree/bindings/arm/bcm/cygnus.txt         |   31 +++
 .../devicetree/bindings/clock/bcm-cygnus-clock.txt |   34 +++
 MAINTAINERS                                        |   15 ++
 arch/arm/boot/dts/Makefile                         |    4 +
 arch/arm/boot/dts/bcm-cygnus-clock.dtsi            |   73 ++++++
 arch/arm/boot/dts/bcm-cygnus.dtsi                  |  109 +++++++++
 arch/arm/boot/dts/bcm911360_entphn.dts             |   22 ++
 arch/arm/boot/dts/bcm911360k.dts                   |   22 ++
 arch/arm/boot/dts/bcm958300k.dts                   |   22 ++
 arch/arm/configs/bcm_cygnus_defconfig              |  243 ++++++++++++++++++++
 arch/arm/mach-bcm/Kconfig                          |   67 ++++--
 arch/arm/mach-bcm/Makefile                         |    3 +
 arch/arm/mach-bcm/bcm_cygnus.c                     |   26 +++
 13 files changed, 650 insertions(+), 21 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/arm/bcm/cygnus.txt
 create mode 100644 Documentation/devicetree/bindings/clock/bcm-cygnus-clock.txt
 create mode 100644 arch/arm/boot/dts/bcm-cygnus-clock.dtsi
 create mode 100644 arch/arm/boot/dts/bcm-cygnus.dtsi
 create mode 100644 arch/arm/boot/dts/bcm911360_entphn.dts
 create mode 100644 arch/arm/boot/dts/bcm911360k.dts
 create mode 100644 arch/arm/boot/dts/bcm958300k.dts
 create mode 100644 arch/arm/configs/bcm_cygnus_defconfig
 create mode 100644 arch/arm/mach-bcm/bcm_cygnus.c
Signature · 1 line
1.7.9.5
author maintainer
#46 lore raw

PATCH v5 1/6 ARM: cygnus: Initial support for Broadcom Cygnus SoC

From: Jonathan Richardson <[email protected]>

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

---
 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
arch/arm/mach-bcm/Kconfig +30 -0
index 2abad74..ecc544a 100644
@@ -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
arch/arm/mach-bcm/Makefile +3 -0
index 300ae4b..34d45ba 100644
@@ -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
 
arch/arm/mach-bcm/bcm_cygnus.c new file +26 -0
new file mode 100644
index 0000000..41b4933
@@ -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
Signature · 1 line
1.7.9.5
maintainer
#47 lore raw

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

Quoted 14 lines · On Tuesday 14 October 2014 19:58:51 Scott Branden wrote:

if ARCH_BCM

arch/arm/mach-bcm/Kconfig +12 -0
+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

arch/arm/mach-bcm/Kconfig menuconfig ARCH_BCM · line 29

Quoted 10 lines
arch/arm/mach-bcm/Kconfig +10 -0
+               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.

arch/arm/mach-bcm/bcm_cygnus.c line 26

Quoted 11 lines
arch/arm/mach-bcm/bcm_cygnus.c new file +10 -0
+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

author maintainer
#48 lore raw

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

Quoted 19 lines · Arnd Bergmann
Quoted 18 lines · On Tuesday 14 October 2014 19:58:51 Scott Branden wrote:

if ARCH_BCM

arch/arm/mach-bcm/Kconfig +16 -0
+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
Quoted 8 lines

arch/arm/mach-bcm/Kconfig menuconfig ARCH_BCM · line 29

Quoted 6 lines
arch/arm/mach-bcm/Kconfig +6 -0
+                 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?

Quoted 16 lines

arch/arm/mach-bcm/bcm_cygnus.c line 26

Quoted 12 lines
arch/arm/mach-bcm/bcm_cygnus.c new file +10 -0
+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

maintainer
#49 lore raw

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

Quoted 29 lines · On Monday 20 October 2014 15:59:45 Scott Branden wrote:
Quoted 19 lines · Arnd Bergmann
Quoted 18 lines · On Tuesday 14 October 2014 19:58:51 Scott Branden wrote:

if ARCH_BCM

arch/arm/mach-bcm/Kconfig +16 -0
+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
Quoted 8 lines

arch/arm/mach-bcm/Kconfig menuconfig ARCH_BCM · line 29

Quoted 6 lines
arch/arm/mach-bcm/Kconfig +6 -0
+                 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.

Quoted 7 lines

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

author maintainer
#50 lore raw

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

Quoted 35 lines · Arnd Bergmann
Quoted 34 lines · On Monday 20 October 2014 15:59:45 Scott Branden wrote:
Quoted 19 lines · Arnd Bergmann
Quoted 18 lines · On Tuesday 14 October 2014 19:58:51 Scott Branden wrote:

if ARCH_BCM

arch/arm/mach-bcm/Kconfig +16 -0
+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
Quoted 8 lines

arch/arm/mach-bcm/Kconfig menuconfig ARCH_BCM · line 29

Quoted 6 lines
arch/arm/mach-bcm/Kconfig +6 -0
+                 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.

Quoted 8 lines
Quoted 2 lines

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?

Quoted 5 lines

Get rid of one of them.

Arnd

maintainer
#51 lore raw

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

Quoted 7 lines · 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

author maintainer
#52 lore raw

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

Quoted 10 lines · Arnd Bergmann
Quoted 7 lines · 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.

Quoted 3 lines

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

Thanks - I will add this to my patchset.

Quoted 8 lines

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.

Quoted 3 lines

Arnd

author maintainer
#53 lore raw

PATCH v5 2/6 dt-bindings: Document Broadcom Cygnus SoC and clocks

In reply to Scott Branden

From: Jonathan Richardson <[email protected]>

---
 .../devicetree/bindings/arm/bcm/cygnus.txt         |   31 ++++++++++++++++++
 .../devicetree/bindings/clock/bcm-cygnus-clock.txt |   34 ++++++++++++++++++++
 2 files changed, 65 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/arm/bcm/cygnus.txt
 create mode 100644 Documentation/devicetree/bindings/clock/bcm-cygnus-clock.txt
Documentation/devicetree/bindings/arm/bcm/cygnus.txt new file +31 -0
new file mode 100644
index 0000000..4c77169
@@ -0,0 +1,31 @@
+Broadcom Cygnus device tree bindings
+------------------------------------
+
+
+Boards with Cygnus SoCs shall have the following properties:
+
+Required root node property:
+
+BCM11300
+compatible = "brcm,bcm11300", "brcm,cygnus";
+
+BCM11320
+compatible = "brcm,bcm11320", "brcm,cygnus";
+
+BCM11350
+compatible = "brcm,bcm11350", "brcm,cygnus";
+
+BCM11360
+compatible = "brcm,bcm11360", "brcm,cygnus";
+
+BCM58300
+compatible = "brcm,bcm58300", "brcm,cygnus";
+
+BCM58302
+compatible = "brcm,bcm58302", "brcm,cygnus";
+
+BCM58303
+compatible = "brcm,bcm58303", "brcm,cygnus";
+
+BCM58305
+compatible = "brcm,bcm58305", "brcm,cygnus";
Documentation/devicetree/bindings/clock/bcm-cygnus-clock.txt new file +34 -0
new file mode 100644
index 0000000..00d26ed
@@ -0,0 +1,34 @@
+Broadcom Cygnus Clocks
+
+This binding uses the common clock binding:
+Documentation/devicetree/bindings/clock/clock-bindings.txt
+
+Currently various "fixed" clocks are declared for peripheral drivers that use
+the common clock framework to reference their core clocks. Proper support of
+these clocks will be added later
+
+Device tree example:
+
+	clocks {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges;
+
+		osc: oscillator {
+			compatible = "fixed-clock";
+			#clock-cells = <1>;
+			clock-frequency = <25000000>;
+		};
+
+		apb_clk: apb_clk {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+			clock-frequency = <1000000000>;
+		};
+
+		periph_clk: periph_clk {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+			clock-frequency = <500000000>;
+		};
+	};
Signature · 1 line
1.7.9.5
author maintainer
#54 lore raw

PATCH v5 3/6 ARM: cygnus defconfig : Initial defconfig for Broadcom Cygnus SoC

In reply to Scott Branden

From: Jonathan Richardson <[email protected]>

This defconfig is utilized so a customer or developer can understand what kernel drivers are utilized by the Cygnus SoC. It also enables debug configs which should be disabled if optimal performance is desired.

---
 arch/arm/configs/bcm_cygnus_defconfig |  243 +++++++++++++++++++++++++++++++++
 1 file changed, 243 insertions(+)
 create mode 100644 arch/arm/configs/bcm_cygnus_defconfig
arch/arm/configs/bcm_cygnus_defconfig new file +243 -0
new file mode 100644
index 0000000..c8d6158
@@ -0,0 +1,243 @@
+CONFIG_KERNEL_XZ=y
+# CONFIG_SWAP is not set
+CONFIG_SYSVIPC=y
+CONFIG_FHANDLE=y
+CONFIG_IRQ_DOMAIN_DEBUG=y
+CONFIG_NO_HZ_IDLE=y
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_BSD_PROCESS_ACCT=y
+CONFIG_BSD_PROCESS_ACCT_V3=y
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_LOG_BUF_SHIFT=19
+CONFIG_CGROUPS=y
+CONFIG_CGROUP_FREEZER=y
+CONFIG_CGROUP_DEVICE=y
+CONFIG_CGROUP_CPUACCT=y
+CONFIG_RESOURCE_COUNTERS=y
+CONFIG_CGROUP_SCHED=y
+CONFIG_BLK_CGROUP=y
+CONFIG_NAMESPACES=y
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_EMBEDDED=y
+CONFIG_PERF_EVENTS=y
+# CONFIG_COMPAT_BRK is not set
+CONFIG_JUMP_LABEL=y
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_BLK_DEV_BSG is not set
+CONFIG_PARTITION_ADVANCED=y
+CONFIG_ARCH_BCM=y
+CONFIG_ARCH_BCM_CYGNUS=y
+CONFIG_ARM_THUMBEE=y
+CONFIG_PCI=y
+CONFIG_PCI_DEBUG=y
+CONFIG_PREEMPT=y
+CONFIG_AEABI=y
+CONFIG_HIGHMEM=y
+# CONFIG_COMPACTION is not set
+# CONFIG_ATAGS is not set
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_ARM_APPENDED_DTB=y
+CONFIG_CPU_IDLE=y
+CONFIG_VFP=y
+CONFIG_NEON=y
+# CONFIG_SUSPEND is not set
+CONFIG_NET=y
+CONFIG_PACKET=y
+CONFIG_UNIX=y
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+CONFIG_IP_ADVANCED_ROUTER=y
+CONFIG_IP_MULTIPLE_TABLES=y
+CONFIG_IP_ROUTE_MULTIPATH=y
+CONFIG_IP_ROUTE_VERBOSE=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_MROUTE=y
+CONFIG_IP_MROUTE_MULTIPLE_TABLES=y
+CONFIG_SYN_COOKIES=y
+# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
+# CONFIG_INET_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_BEET is not set
+# CONFIG_INET_LRO is not set
+# CONFIG_INET_DIAG is not set
+CONFIG_TCP_CONG_ADVANCED=y
+# CONFIG_TCP_CONG_BIC is not set
+# CONFIG_TCP_CONG_WESTWOOD is not set
+# CONFIG_TCP_CONG_HTCP is not set
+CONFIG_IPV6=y
+# CONFIG_INET6_XFRM_MODE_TRANSPORT is not set
+# CONFIG_INET6_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET6_XFRM_MODE_BEET is not set
+# CONFIG_IPV6_SIT is not set
+CONFIG_IPV6_MULTIPLE_TABLES=y
+CONFIG_IPV6_SUBTREES=y
+CONFIG_IPV6_MROUTE=y
+CONFIG_NETFILTER=y
+# CONFIG_BRIDGE_NETFILTER is not set
+CONFIG_NF_CONNTRACK=y
+# CONFIG_NF_CONNTRACK_PROCFS is not set
+CONFIG_NF_CONNTRACK_FTP=y
+CONFIG_NF_CONNTRACK_IPV4=y
+CONFIG_IP_NF_IPTABLES=y
+CONFIG_IP_NF_FILTER=y
+CONFIG_IP_NF_TARGET_REJECT=y
+CONFIG_IP_NF_NAT=y
+CONFIG_IP_NF_TARGET_MASQUERADE=y
+CONFIG_IP_NF_TARGET_REDIRECT=y
+CONFIG_IP_NF_MANGLE=y
+CONFIG_IP_NF_RAW=y
+CONFIG_NF_CONNTRACK_IPV6=y
+CONFIG_IP6_NF_IPTABLES=y
+CONFIG_IP6_NF_MATCH_AH=y
+CONFIG_IP6_NF_MATCH_EUI64=y
+CONFIG_IP6_NF_MATCH_FRAG=y
+CONFIG_IP6_NF_MATCH_OPTS=y
+CONFIG_IP6_NF_MATCH_IPV6HEADER=y
+CONFIG_IP6_NF_MATCH_MH=y
+CONFIG_IP6_NF_MATCH_RT=y
+CONFIG_IP6_NF_FILTER=y
+CONFIG_IP6_NF_TARGET_REJECT=y
+CONFIG_IP6_NF_MANGLE=y
+CONFIG_IP6_NF_RAW=y
+CONFIG_BRIDGE=y
+# CONFIG_BRIDGE_IGMP_SNOOPING is not set
+CONFIG_VLAN_8021Q=y
+CONFIG_NET_SCHED=y
+CONFIG_NET_SCH_FQ_CODEL=y
+CONFIG_CFG80211=y
+# CONFIG_CFG80211_DEFAULT_PS is not set
+CONFIG_CFG80211_WEXT=y
+CONFIG_RFKILL=y
+CONFIG_DEVTMPFS=y
+CONFIG_DEVTMPFS_MOUNT=y
+# CONFIG_FIRMWARE_IN_KERNEL is not set
+CONFIG_MTD=y
+CONFIG_MTD_CMDLINE_PARTS=y
+CONFIG_MTD_BLOCK=y
+CONFIG_MTD_NAND=y
+CONFIG_MTD_UBI=y
+CONFIG_BLK_DEV_LOOP=y
+CONFIG_SCSI=y
+CONFIG_BLK_DEV_SD=y
+CONFIG_BLK_DEV_SR=y
+CONFIG_NETDEVICES=y
+# CONFIG_NET_CADENCE is not set
+# CONFIG_NET_VENDOR_CIRRUS is not set
+# CONFIG_NET_VENDOR_FARADAY is not set
+# CONFIG_NET_VENDOR_INTEL is not set
+# CONFIG_NET_VENDOR_MARVELL is not set
+# CONFIG_NET_VENDOR_MICREL is not set
+# CONFIG_NET_VENDOR_NATSEMI is not set
+# CONFIG_NET_VENDOR_SEEQ is not set
+# CONFIG_NET_VENDOR_SMSC is not set
+# CONFIG_NET_VENDOR_STMICRO is not set
+# CONFIG_NET_VENDOR_WIZNET is not set
+CONFIG_PHYLIB=y
+CONFIG_BROADCOM_PHY=y
+# CONFIG_INPUT_MOUSEDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_KEYBOARD_ATKBD is not set
+# CONFIG_INPUT_MOUSE is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+# CONFIG_SERIO is not set
+# CONFIG_LEGACY_PTYS is not set
+CONFIG_SERIAL_8250=y
+# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_8250_NR_UARTS=2
+CONFIG_SERIAL_8250_RUNTIME_UARTS=2
+CONFIG_SERIAL_8250_DW=y
+CONFIG_SERIAL_OF_PLATFORM=y
+# CONFIG_HW_RANDOM is not set
+CONFIG_I2C_CHARDEV=y
+# CONFIG_I2C_HELPER_AUTO is not set
+CONFIG_I2C_SMBUS=y
+CONFIG_SPI=y
+CONFIG_SPI_PL022=y
+CONFIG_SPI_SPIDEV=y
+CONFIG_GPIO_SYSFS=y
+# CONFIG_HWMON is not set
+CONFIG_WATCHDOG=y
+CONFIG_ARM_SP805_WATCHDOG=y
+CONFIG_MEDIA_SUPPORT=y
+CONFIG_MEDIA_CAMERA_SUPPORT=y
+CONFIG_MEDIA_USB_SUPPORT=y
+CONFIG_USB_VIDEO_CLASS=y
+# CONFIG_USB_GSPCA is not set
+CONFIG_FB=y
+CONFIG_FB_ARMCLCD=y
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+# CONFIG_LCD_CLASS_DEVICE is not set
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+# CONFIG_BACKLIGHT_GENERIC is not set
+CONFIG_BACKLIGHT_PWM=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_SOUND=y
+CONFIG_SND=y
+CONFIG_SND_DYNAMIC_MINORS=y
+CONFIG_SND_VERBOSE_PRINTK=y
+CONFIG_SND_DEBUG=y
+CONFIG_SND_USB_AUDIO=y
+CONFIG_SND_SOC=y
+CONFIG_USB=y
+CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_EHCI_ROOT_HUB_TT=y
+CONFIG_USB_EHCI_HCD_PLATFORM=y
+CONFIG_USB_OHCI_HCD=y
+CONFIG_USB_OHCI_HCD_PLATFORM=y
+CONFIG_USB_STORAGE=y
+CONFIG_MMC=y
+CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_PLTFM=y
+CONFIG_MMC_SDHCI_OF_ARASAN=y
+CONFIG_RTC_CLASS=y
+CONFIG_PWM=y
+CONFIG_EXT4_FS=y
+CONFIG_AUTOFS4_FS=y
+CONFIG_MSDOS_FS=y
+CONFIG_VFAT_FS=y
+CONFIG_NTFS_FS=y
+CONFIG_TMPFS=y
+CONFIG_TMPFS_POSIX_ACL=y
+CONFIG_UBIFS_FS=y
+CONFIG_NFS_FS=y
+CONFIG_ROOT_NFS=y
+CONFIG_NLS_CODEPAGE_437=y
+CONFIG_NLS_ISO8859_1=y
+CONFIG_NLS_UTF8=y
+CONFIG_PRINTK_TIME=y
+CONFIG_DYNAMIC_DEBUG=y
+CONFIG_DEBUG_INFO=y
+CONFIG_STRIP_ASM_SYMS=y
+CONFIG_DEBUG_FS=y
+CONFIG_MAGIC_SYSRQ=y
+CONFIG_DEBUG_OBJECTS=y
+CONFIG_DEBUG_OBJECTS_RCU_HEAD=y
+CONFIG_SLUB_DEBUG_ON=y
+CONFIG_DEBUG_MEMORY_INIT=y
+CONFIG_DEBUG_SHIRQ=y
+CONFIG_DETECT_HUNG_TASK=y
+CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=110
+CONFIG_BOOTPARAM_HUNG_TASK_PANIC=y
+# CONFIG_SCHED_DEBUG is not set
+CONFIG_SCHEDSTATS=y
+CONFIG_DEBUG_RT_MUTEXES=y
+CONFIG_PROVE_LOCKING=y
+CONFIG_DEBUG_ATOMIC_SLEEP=y
+# CONFIG_DEBUG_BUGVERBOSE is not set
+CONFIG_DEBUG_SG=y
+CONFIG_DEBUG_NOTIFIERS=y
+CONFIG_DEBUG_CREDENTIALS=y
+CONFIG_PROVE_RCU=y
+CONFIG_DEBUG_USER=y
+CONFIG_DEBUG_LL=y
+CONFIG_DEBUG_LL_UART_8250=y
+CONFIG_DEBUG_UART_PHYS=0x18023000
+CONFIG_DEBUG_UART_VIRT=0xf1023000
+CONFIG_EARLY_PRINTK=y
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
Signature · 1 line
1.7.9.5
author maintainer
#55 lore raw

PATCH v5 4/6 ARM: dts: Enable Broadcom Cygnus SoC

In reply to Scott Branden

DT files to enable cygnus consisting on reference designs and cygnus core configuration.

---
 arch/arm/boot/dts/Makefile              |    4 ++
 arch/arm/boot/dts/bcm-cygnus-clock.dtsi |   73 +++++++++++++++++++++
 arch/arm/boot/dts/bcm-cygnus.dtsi       |  109 +++++++++++++++++++++++++++++++
 arch/arm/boot/dts/bcm911360_entphn.dts  |   22 +++++++
 arch/arm/boot/dts/bcm911360k.dts        |   22 +++++++
 arch/arm/boot/dts/bcm958300k.dts        |   22 +++++++
 6 files changed, 252 insertions(+)
 create mode 100644 arch/arm/boot/dts/bcm-cygnus-clock.dtsi
 create mode 100644 arch/arm/boot/dts/bcm-cygnus.dtsi
 create mode 100644 arch/arm/boot/dts/bcm911360_entphn.dts
 create mode 100644 arch/arm/boot/dts/bcm911360k.dts
 create mode 100644 arch/arm/boot/dts/bcm958300k.dts
arch/arm/boot/dts/Makefile +4 -0
index 7c80af9..a6b734a 100644
@@ -54,6 +54,10 @@ dtb-$(CONFIG_ARCH_AT91)	+= at91-sama5d4ek.dtb
 dtb-$(CONFIG_ARCH_ATLAS6) += atlas6-evb.dtb
 dtb-$(CONFIG_ARCH_AXXIA) += axm5516-amarillo.dtb
 dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b.dtb
+dtb-$(CONFIG_ARCH_BCM_CYGNUS) += \
+	bcm911360_entphn.dtb \
+	bcm911360k.dtb \
+	bcm958300k.dtb
 dtb-$(CONFIG_ARCH_BCM_5301X) += bcm4708-netgear-r6250.dtb
 dtb-$(CONFIG_ARCH_BCM_63XX) += bcm963138dvt.dtb
 dtb-$(CONFIG_ARCH_BCM_MOBILE) += bcm28155-ap.dtb \
arch/arm/boot/dts/bcm-cygnus-clock.dtsi new file +73 -0

73 lines not on this page · raw message

arch/arm/boot/dts/bcm-cygnus.dtsi new file +109 -0

109 lines not on this page · raw message

arch/arm/boot/dts/bcm911360_entphn.dts new file +22 -0
new file mode 100644
index 0000000..c5188d7
@@ -0,0 +1,22 @@
+/*
+ * 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.
+ */
+
+/dts-v1/;
+
+#include "bcm-cygnus.dtsi"
+
+/ {
+	model = "Cygnus Enterprise Phone (BCM911360_ENTPHN)";
+	compatible = "brcm,bcm11360", "brcm,cygnus";
+};
arch/arm/boot/dts/bcm911360k.dts new file +22 -0
new file mode 100644
index 0000000..866d1e1
@@ -0,0 +1,22 @@
+/*
+ * 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.
+ */
+
+/dts-v1/;
+
+#include "bcm-cygnus.dtsi"
+
+/ {
+	model = "Cygnus SVK (BCM911360K)";
+	compatible = "brcm,bcm11360", "brcm,cygnus";
+};
arch/arm/boot/dts/bcm958300k.dts new file +22 -0
new file mode 100644
index 0000000..8739751
@@ -0,0 +1,22 @@
+/*
+ * 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.
+ */
+
+/dts-v1/;
+
+#include "bcm-cygnus.dtsi"
+
+/ {
+	model = "Cygnus SVK (BCM958300K)";
+	compatible = "brcm,bcm58300", "brcm,cygnus";
+};
Signature · 1 line
1.7.9.5
author maintainer
#56 lore raw

PATCH v5 5/6 MAINTAINERS: Entry for Cygnus/iproc arm architecture

In reply to Scott Branden
---
 MAINTAINERS |   15 +++++++++++++++
 1 file changed, 15 insertions(+)
MAINTAINERS +15 -0
index ee1bc5b..794804a 100644
@@ -2125,6 +2125,21 @@ L:	linux-scsi at vger.kernel.org
 S:	Supported
 F:	drivers/scsi/bnx2i/
 
+BROADCOM CYGNUS/IPROC ARM ARCHITECTURE
+M:	Ray Jui <[email protected]>
+M:	Scott Branden <[email protected]>
+L:	linux-arm-kernel at lists.infradead.org (moderated for non-subscribers)
+L:	bcm-kernel-feedback-list at broadcom.com
+T:	git git://git.github.com/brcm/linux.git
+S:	Maintained
+F:	Documentation/devicetree/bindings/arm/bcm/cygnus.txt
+F:	Documentation/devicetree/bindings/clock/bcm-cygnus-clock.txt
+F:	arch/arm/boot/dts/*cygnus*
+F:	arch/arm/boot/dts/bcm9113*
+F:	arch/arm/boot/dts/bcm9583*
+F:	arch/arm/configs/bcm_cygnus_defconfig
+F:	arch/arm/mach-bcm/bcm_cygnus.c
+
 BROADCOM KONA GPIO DRIVER
 M:	Ray Jui <[email protected]>
 L:	bcm-kernel-feedback-list at broadcom.com
Signature · 1 line
1.7.9.5
author maintainer
#57 lore raw

PATCH v5 6/6 ARM: mach-bcm: Consolidate currently supported IPROC SoCs

In reply to Scott Branden

Move ARCH_BCM_5301X subarch under ARCH_IPROC architecture. Additional IPROC chipsets that share a lot of commonality should be added under ARCH_IPROC as well.

---
 arch/arm/mach-bcm/Kconfig |   37 ++++++++++++++++---------------------
 1 file changed, 16 insertions(+), 21 deletions(-)
arch/arm/mach-bcm/Kconfig +16 -21
index ecc544a..08e7103 100644
@@ -33,6 +33,22 @@ menu "iProc SoC based Machine types"
 		  which includes the following variants:
 		  BCM11300, BCM11320, BCM11350, BCM11360,
 		  BCM58300, BCM58302, BCM58303, BCM58305.
+
+	config ARCH_BCM_5301X
+		bool "Broadcom BCM470X / BCM5301X ARM SoC" if ARCH_MULTI_V7
+		select ARCH_BCM_IPROC
+		help
+		  Support for Broadcom BCM470X and BCM5301X SoCs with ARM CPU cores.
+
+		  This is a network SoC line mostly used in home routers and
+		  wifi access points, it's internal name is Northstar.
+		  This inclused the following SoC: BCM53010, BCM53011, BCM53012,
+		  BCM53014, BCM53015, BCM53016, BCM53017, BCM53018, BCM4707,
+		  BCM4708 and BCM4709.
+
+		  Do not confuse this with the BCM4760 which is a totally
+		  different SoC or with the older BCM47XX and BCM53XX based
+		  network SoC using a MIPS CPU, they are supported by arch/mips/bcm47xx
 endmenu
 
 config ARCH_BCM_MOBILE
@@ -108,27 +124,6 @@ config ARCH_BCM2835
 	  This enables support for the Broadcom BCM2835 SoC. This SoC is
 	  used in the Raspberry Pi and Roku 2 devices.
 
-config ARCH_BCM_5301X
-	bool "Broadcom BCM470X / BCM5301X ARM SoC" if ARCH_MULTI_V7
-	select ARM_GIC
-	select CACHE_L2X0
-	select HAVE_ARM_SCU if SMP
-	select HAVE_ARM_TWD if SMP
-	select ARM_GLOBAL_TIMER
-	select CLKSRC_ARM_GLOBAL_TIMER_SCHED_CLOCK
-	help
-	  Support for Broadcom BCM470X and BCM5301X SoCs with ARM CPU cores.
-
-	  This is a network SoC line mostly used in home routers and
-	  wifi access points, it's internal name is Northstar.
-	  This inclused the following SoC: BCM53010, BCM53011, BCM53012,
-	  BCM53014, BCM53015, BCM53016, BCM53017, BCM53018, BCM4707,
-	  BCM4708 and BCM4709.
-
-	  Do not confuse this with the BCM4760 which is a totally
-	  different SoC or with the older BCM47XX and BCM53XX based
-	  network SoC using a MIPS CPU, they are supported by arch/mips/bcm47xx
-
 config ARCH_BCM_63XX
 	bool "Broadcom BCM63xx DSL SoC" if ARCH_MULTI_V7
 	depends on MMU
Signature · 1 line
1.7.9.5
author maintainer
#58 lore raw

PATCH 1/1 MAINTAINERS: corrected bcm2835 search

In reply to a message not in the archive

Corrected bcm2835 maintainer info by using N: to specify any files with bcm2835 in are directed to the proper maintainer.
Also corrected minor mispelling of ARCHITECTURE in 2 comment locations.

---
 MAINTAINERS |    9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
MAINTAINERS +3 -6
index b0cf8c9..801beb1 100644
@@ -2056,17 +2056,14 @@ F:	arch/arm/configs/bcm_defconfig
 F:	drivers/mmc/host/sdhci-bcm-kona.c
 F:	drivers/clocksource/bcm_kona_timer.c
 
-BROADCOM BCM2835 ARM ARCHICTURE
+BROADCOM BCM2835 ARM ARCHITECTURE
 M:	Stephen Warren <[email protected]>
 L:	[email protected] (moderated for non-subscribers)
 T:	git git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-rpi.git
 S:	Maintained
-F:	arch/arm/mach-bcm/board_bcm2835.c
-F:	arch/arm/boot/dts/bcm2835*
-F:	arch/arm/configs/bcm2835_defconfig
-F:	drivers/*/*bcm2835*
+N:	bcm2835
 
-BROADCOM BCM5301X ARM ARCHICTURE
+BROADCOM BCM5301X ARM ARCHITECTURE
 M:	Hauke Mehrtens <[email protected]>
 L:	[email protected]
 S:	Maintained
Signature · 1 line
1.7.9.5
Acked-by on v1 1/1
#59 lore raw

Re: [PATCH 1/1] MAINTAINERS: corrected bcm2835 search

Quoted 3 lines · Scott Branden

Corrected bcm2835 maintainer info by using N: to specify any files with bcm2835 in are directed to the proper maintainer.
Also corrected minor mispelling of ARCHITECTURE in 2 comment locations.

Who should apply this? I guess I can forward it to arm-soc if you want me to take it.

author maintainer
#60 lore raw

PATCH 1/1 mmc: sdhci-bcm2835: added quirk and removed udelay in write ops

In reply to a message not in the archive

Added quirk SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12 present in controller. Removed udelay in write ops by using shadow registers for 16 bit accesses to 32-bit registers (where necessary).
Optimized 32-bit operations when doing 8/16 register accesses.

---
 drivers/mmc/host/sdhci-bcm2835.c |  139 ++++++++++++++++++--------------------
 1 file changed, 66 insertions(+), 73 deletions(-)
drivers/mmc/host/sdhci-bcm2835.c +66 -73
index 439d259..d967a4f 100644
@@ -25,42 +25,28 @@
 #include "sdhci-pltfm.h"
 
 /*
- * 400KHz is max freq for card ID etc. Use that as min card clock. We need to
- * know the min to enable static calculation of max BCM2835_SDHCI_WRITE_DELAY.
- */
-#define MIN_FREQ 400000
-
-/*
  * The Arasan has a bugette whereby it may lose the content of successive
- * writes to registers that are within two SD-card clock cycles of each other
- * (a clock domain crossing problem). It seems, however, that the data
- * register does not have this problem, which is just as well - otherwise we'd
- * have to nobble the DMA engine too.
+ * writes to the same register that are within two SD-card clock cycles of
+ * each other (a clock domain crossing problem).  Problem does not happen with
+ * data.
+ * This wouldn't be a problem with the code except that we can only write the
+ * controller with 32-bit writes.  So two different 16-bit registers in the
+ * written back to back creates the problem.
  *
- * This should probably be dynamically calculated based on the actual card
- * frequency. However, this is the longest we'll have to wait, and doesn't
- * seem to slow access down too much, so the added complexity doesn't seem
- * worth it for now.
- *
- * 1/MIN_FREQ is (max) time per tick of eMMC clock.
- * 2/MIN_FREQ is time for two ticks.
- * Multiply by 1000000 to get uS per two ticks.
- * *1000000 for uSecs.
- * +1 for hack rounding.
+ * In reality, this only happens when a SDHCI_BLOCK_SIZE and SDHCI_BLOCK_COUNT
+ * are written followed by SDHCI_TRANSFER_MODE and SDHCI_COMMAND.
+ * The BLOCK_SIZE and BLOCK_COUNT are meaningless until a command issued so
+ * the work around can be further optimized. We can keep shadow values of
+ * BLOCK_SIZE, BLOCK_COUNT, and TRANSFER_MODE until a COMMAND is issued.
+ * Then, write the BLOCK_SIZE+BLOCK_COUNT in a single 32-bit write followed
+ * by the TRANSFER+COMMAND in another 32-bit write.
  */
-#define BCM2835_SDHCI_WRITE_DELAY	(((2 * 1000000) / MIN_FREQ) + 1)
 
-struct bcm2835_sdhci {
-	u32 shadow;
+struct bcm2835_sdhci_host {
+	u32 shadow_cmd;
+	u32 shadow_blk;
 };
 
-static void bcm2835_sdhci_writel(struct sdhci_host *host, u32 val, int reg)
-{
-	writel(val, host->ioaddr + reg);
-
-	udelay(BCM2835_SDHCI_WRITE_DELAY);
-}
-
 static inline u32 bcm2835_sdhci_readl(struct sdhci_host *host, int reg)
 {
 	u32 val = readl(host->ioaddr + reg);
@@ -71,76 +57,83 @@ static inline u32 bcm2835_sdhci_readl(struct sdhci_host *host, int reg)
 	return val;
 }
 
-static void bcm2835_sdhci_writew(struct sdhci_host *host, u16 val, int reg)
-{
-	struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
-	struct bcm2835_sdhci *bcm2835_host = pltfm_host->priv;
-	u32 oldval = (reg == SDHCI_COMMAND) ? bcm2835_host->shadow :
-		bcm2835_sdhci_readl(host, reg & ~3);
-	u32 word_num = (reg >> 1) & 1;
-	u32 word_shift = word_num * 16;
-	u32 mask = 0xffff << word_shift;
-	u32 newval = (oldval & ~mask) | (val << word_shift);
-
-	if (reg == SDHCI_TRANSFER_MODE)
-		bcm2835_host->shadow = newval;
-	else
-		bcm2835_sdhci_writel(host, newval, reg & ~3);
-}
-
 static u16 bcm2835_sdhci_readw(struct sdhci_host *host, int reg)
 {
-	u32 val = bcm2835_sdhci_readl(host, (reg & ~3));
-	u32 word_num = (reg >> 1) & 1;
-	u32 word_shift = word_num * 16;
-	u32 word = (val >> word_shift) & 0xffff;
-
+	u32 val = bcm2835_sdhci_readl(host->ioaddr, (reg & ~3));
+	u16 word = val >> (reg << 3 & 0x18) & 0xffff;
 	return word;
 }
 
-static void bcm2835_sdhci_writeb(struct sdhci_host *host, u8 val, int reg)
+static u8 bcm2835_sdhci_readb(struct sdhci_host *host, int reg)
 {
-	u32 oldval = bcm2835_sdhci_readl(host, reg & ~3);
-	u32 byte_num = reg & 3;
-	u32 byte_shift = byte_num * 8;
-	u32 mask = 0xff << byte_shift;
-	u32 newval = (oldval & ~mask) | (val << byte_shift);
+	u32 val = bcm2835_sdhci_readl(host->ioaddr, (reg & ~3));
+	u8 byte = val >> (reg << 3 & 0x18) & 0xff;
+	return byte;
+}
 
-	bcm2835_sdhci_writel(host, newval, reg & ~3);
+static void bcm2835_sdhci_writel(struct sdhci_host *host, u32 val, int reg)
+{
+	writel(val, host->ioaddr + reg);
 }
 
-static u8 bcm2835_sdhci_readb(struct sdhci_host *host, int reg)
+static void bcm2835_sdhci_writew(struct sdhci_host *host, u16 val, int reg)
 {
-	u32 val = bcm2835_sdhci_readl(host, (reg & ~3));
-	u32 byte_num = reg & 3;
-	u32 byte_shift = byte_num * 8;
-	u32 byte = (val >> byte_shift) & 0xff;
+	struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
+	struct bcm2835_sdhci_host *bcm2835_host = pltfm_host->priv;
+	u32 word_shift = reg << 3 & 0x18;
+	u32 mask = 0xffff << word_shift;
+	u32 oldval;
+	u32 newval;
+
+	if (reg == SDHCI_COMMAND) {
+		if (bcm2835_host->shadow_blk != 0) {
+			writel(bcm2835_host->shadow_blk,
+			       host->ioaddr + SDHCI_BLOCK_SIZE);
+			bcm2835_host->shadow_blk = 0;
+		}
+		oldval = bcm2835_host->shadow_cmd;
+	} else if (reg == SDHCI_BLOCK_SIZE || reg == SDHCI_BLOCK_COUNT) {
+		oldval = bcm2835_host->shadow_blk;
+	} else {
+		oldval = readl(host->ioaddr + (reg & ~3));
+	}
+	newval = (oldval & ~mask) | (val << word_shift);
 
-	return byte;
+	if (reg == SDHCI_TRANSFER_MODE)
+		bcm2835_host->shadow_cmd = newval;
+	else if (reg == SDHCI_BLOCK_SIZE || reg == SDHCI_BLOCK_COUNT)
+		bcm2835_host->shadow_blk = newval;
+	else
+		writel(newval, host->ioaddr + (reg & ~3));
 }
 
-static unsigned int bcm2835_sdhci_get_min_clock(struct sdhci_host *host)
+static void bcm2835_sdhci_writeb(struct sdhci_host *host, u8 val, int reg)
 {
-	return MIN_FREQ;
+	u32 oldval = readl(host->ioaddr + (reg & ~3));
+	u32 byte_shift = reg << 3 & 0x18;
+	u32 mask = 0xff << byte_shift;
+	u32 newval = (oldval & ~mask) | (val << byte_shift);
+
+	writel(newval, host->ioaddr + (reg & ~3));
 }
 
 static const struct sdhci_ops bcm2835_sdhci_ops = {
-	.write_l = bcm2835_sdhci_writel,
-	.write_w = bcm2835_sdhci_writew,
-	.write_b = bcm2835_sdhci_writeb,
 	.read_l = bcm2835_sdhci_readl,
 	.read_w = bcm2835_sdhci_readw,
 	.read_b = bcm2835_sdhci_readb,
+	.write_l = bcm2835_sdhci_writel,
+	.write_w = bcm2835_sdhci_writew,
+	.write_b = bcm2835_sdhci_writeb,
 	.set_clock = sdhci_set_clock,
 	.get_max_clock = sdhci_pltfm_clk_get_max_clock,
-	.get_min_clock = bcm2835_sdhci_get_min_clock,
 	.set_bus_width = sdhci_set_bus_width,
 	.reset = sdhci_reset,
 	.set_uhs_signaling = sdhci_set_uhs_signaling,
 };
 
 static const struct sdhci_pltfm_data bcm2835_sdhci_pdata = {
-	.quirks = SDHCI_QUIRK_BROKEN_CARD_DETECTION |
+	.quirks = SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12 |
+		  SDHCI_QUIRK_BROKEN_CARD_DETECTION |
 		  SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK,
 	.ops = &bcm2835_sdhci_ops,
 };
@@ -148,7 +141,7 @@ static const struct sdhci_pltfm_data bcm2835_sdhci_pdata = {
 static int bcm2835_sdhci_probe(struct platform_device *pdev)
 {
 	struct sdhci_host *host;
-	struct bcm2835_sdhci *bcm2835_host;
+	struct bcm2835_sdhci_host *bcm2835_host;
 	struct sdhci_pltfm_host *pltfm_host;
 	int ret;
 
Signature · 1 line
1.7.9.5
#61 lore raw

Re: [PATCH 1/1] mmc: sdhci-bcm2835: added quirk and removed udelay in write ops

Quoted 4 lines · Scott Branden

Added quirk SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12 present in controller. Removed udelay in write ops by using shadow registers for 16 bit accesses to 32-bit registers (where necessary).
Optimized 32-bit operations when doing 8/16 register accesses.

That's 2 or 3 unrelated changes. They'd be better as separate patches, so that any issues that arise can be bisected down to the smaller changes.

drivers/mmc/host/sdhci-bcm2835.c line 30

Quoted 6 lines
drivers/mmc/host/sdhci-bcm2835.c +2 -0
 
 /*
  * The Arasan has a bugette whereby it may lose the content of successive
+ * writes to the same register that are within two SD-card clock cycles of
+ * each other (a clock domain crossing problem).  Problem does not happen with
                                                    ^ The?

See right >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ^

Quoted 1 line

+ * data.

Blank line to separate the paragraphs here, to be consistent with the other paragraph break below?

Quoted 6 lines

+ * This wouldn't be a problem with the code except that we can only write the
+ * controller with 32-bit writes. So two different 16-bit registers in the
+ * written back to back creates the problem.
*
+ * In reality, this only happens when a SDHCI_BLOCK_SIZE and SDHCI_BLOCK_COUNT
+ * are written followed by SDHCI_TRANSFER_MODE and SDHCI_COMMAND.

That seems like a rather risky assertion. Even if it's perfectly true with the MMC core code right now, does the MMC core document a guarantee that this will always be true? Even if we optimize the WAR for the issue as you've done, I think we should still have code that validates that the same register is never written back-to-back to detect this likely very hard-to-debug problem.

Quoted 6 lines

+ * The BLOCK_SIZE and BLOCK_COUNT are meaningless until a command issued so
+ * the work around can be further optimized. We can keep shadow values of
+ * BLOCK_SIZE, BLOCK_COUNT, and TRANSFER_MODE until a COMMAND is issued.
+ * Then, write the BLOCK_SIZE+BLOCK_COUNT in a single 32-bit write followed
+ * by the TRANSFER+COMMAND in another 32-bit write.
*/

After this patch, the entire WAR for this issue is contained within bcm2835_sdhci_writew(). It might be a good idea to move the comment next to that function so it's more at hand to explain the code that's there. Or at least add a comment to that function the to mention the location of the explanation for the complex code.

drivers/mmc/host/sdhci-bcm2835.c static inline u32 bcm2835_sdhci_readl(struct sdhci_host *host, int reg) · line 75

Quoted 9 lines

static inline u32 bcm2835_sdhci_readl(struct sdhci_host *host, int reg) {

drivers/mmc/host/sdhci-bcm2835.c +0 -2
 	u32 val = readl(host->ioaddr + reg);
@@ -71,76 +57,83 @@ static inline u32 bcm2835_sdhci_readl(struct sdhci_host *host, int reg)
 	return val;
 }
 
-static void bcm2835_sdhci_writew(struct sdhci_host *host, u16 val, int reg)
-{

... (entire function deleted)

drivers/mmc/host/sdhci-bcm2835.c static inline u32 bcm2835_sdhci_readl(struct sdhci_host *host, int reg) · line 76

Quoted 1 line
drivers/mmc/host/sdhci-bcm2835.c +0 -1
-}

This patch could be a lot smaller if it didn't re-order the functions at the same time. It makes the patch harder to understand. If you must re-order the functions, perhaps make that a separate patch that does nothing else, so that the actual code changes are easier to see?

drivers/mmc/host/sdhci-bcm2835.c static inline u32 bcm2835_sdhci_readl(struct sdhci_host *host, int reg) · line 62

Quoted 8 lines
drivers/mmc/host/sdhci-bcm2835.c +1 -5
 static u16 bcm2835_sdhci_readw(struct sdhci_host *host, int reg)
 {
-	u32 val = bcm2835_sdhci_readl(host, (reg & ~3));
-	u32 word_num = (reg >> 1) & 1;
-	u32 word_shift = word_num * 16;
-	u32 word = (val >> word_shift) & 0xffff;
-
+	u32 val = bcm2835_sdhci_readl(host->ioaddr, (reg & ~3));

The change from host to host->ioaddr ends up passing the wrong value to bcm2835_sdhci_readl(). This causes the kernel to crash during boot.

The compiler doesn't warn about this because host->ioaddr is void, so can be automatically converted to struct sdhci_host *.

drivers/mmc/host/sdhci-bcm2835.c static inline u32 bcm2835_sdhci_readl(struct sdhci_host *host, int reg) · line 65

Quoted 3 lines
drivers/mmc/host/sdhci-bcm2835.c +1 -0
+	u16 word = val >> (reg << 3 & 0x18) & 0xffff;
 	return word;
 }

To be honest, I think the existing code is a bit clearer, since it uses variables with names to explain all the intermediate values. Assuming the compiler is competent (which admittedly I haven't checked) I would expect the same code to be generated either way, or at least something pretty similar. Did you measure the benefit of the optimization?

Quoted 5 lines
drivers/mmc/host/sdhci-bcm2835.c +4 -0
+static void bcm2835_sdhci_writew(struct sdhci_host *host, u16 val, int reg)
 {
+	struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
+	struct bcm2835_sdhci_host *bcm2835_host = pltfm_host->priv;
+	u32 word_shift = reg << 3 & 0x18;

drivers/mmc/host/sdhci-bcm2835.c static inline u32 bcm2835_sdhci_readl(struct sdhci_host *host, int reg) · line 93

Quoted 10 lines
drivers/mmc/host/sdhci-bcm2835.c +10 -0
+	u32 mask = 0xffff << word_shift;
+	u32 oldval;
+	u32 newval;
+
+	if (reg == SDHCI_COMMAND) {
+		if (bcm2835_host->shadow_blk != 0) {
+			writel(bcm2835_host->shadow_blk,
+			       host->ioaddr + SDHCI_BLOCK_SIZE);
+			bcm2835_host->shadow_blk = 0;
+		}

Is it absolutely guaranteed that there's never a need to write 0 to that register? I can see that no data transfer command is likely to transfer 0 blocks. I assume no other type of command uses that register as a parameter?

author maintainer
#62 lore raw

Re: [PATCH 1/1] mmc: sdhci-bcm2835: added quirk and removed udelay in write ops

Great review - thanks.

Quoted 8 lines · Stephen Warren
Quoted 4 lines · Scott Branden

Added quirk SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12 present in controller. Removed udelay in write ops by using shadow registers for 16 bit accesses to 32-bit registers (where necessary).
Optimized 32-bit operations when doing 8/16 register accesses.

That's 2 or 3 unrelated changes. They'd be better as separate patches, so that any issues that arise can be bisected down to the smaller changes.

OK - I will split into smaller patches to bisect and understand better.

Quoted 7 lines

drivers/mmc/host/sdhci-bcm2835.c line 30

Quoted 7 lines
drivers/mmc/host/sdhci-bcm2835.c +2 -0
 
  /*
   * The Arasan has a bugette whereby it may lose the content of successive
+ * writes to the same register that are within two SD-card clock cycles of
+ * each other (a clock domain crossing problem).  Problem does not happen with
Quoted 7 lines
                                                     ^ The?

See right >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ^

Quoted 1 line

+ * data.

Blank line to separate the paragraphs here, to be consistent with the other paragraph break below?

I'll clean up the comment some more.

Quoted 8 lines
Quoted 7 lines

+ * This wouldn't be a problem with the code except that we can only write the
+ * controller with 32-bit writes. So two different 16-bit registers in the
+ * written back to back creates the problem.
*
+ * In reality, this only happens when a SDHCI_BLOCK_SIZE and SDHCI_BLOCK_COUNT
+ * are written followed by SDHCI_TRANSFER_MODE and SDHCI_COMMAND.

Quoted 6 lines

That seems like a rather risky assertion. Even if it's perfectly true with the MMC core code right now, does the MMC core document a guarantee that this will always be true? Even if we optimize the WAR for the issue as you've done, I think we should still have code that validates that the same register is never written back-to-back to detect this likely very hard-to-debug problem.

You're right - nothing in life is guaranteed. We had test code for this. I'll add a config option (default on) that verifies back to back writes do not occur.

Quoted 8 lines
Quoted 7 lines

+ * The BLOCK_SIZE and BLOCK_COUNT are meaningless until a command issued so
+ * the work around can be further optimized. We can keep shadow values of
+ * BLOCK_SIZE, BLOCK_COUNT, and TRANSFER_MODE until a COMMAND is issued.
+ * Then, write the BLOCK_SIZE+BLOCK_COUNT in a single 32-bit write followed
+ * by the TRANSFER+COMMAND in another 32-bit write.
*/

Quoted 5 lines

After this patch, the entire WAR for this issue is contained within bcm2835_sdhci_writew(). It might be a good idea to move the comment next to that function so it's more at hand to explain the code that's there. Or at least add a comment to that function the to mention the location of the explanation for the complex code.

ok, I'll clean up the comment a little more too.

Quoted 11 lines

drivers/mmc/host/sdhci-bcm2835.c static inline u32 bcm2835_sdhci_readl(struct sdhci_host *host, int reg) · line 75

Quoted 10 lines
  static inline u32 bcm2835_sdhci_readl(struct sdhci_host *host, int reg)
  {
  	u32 val = readl(host->ioaddr + reg);
drivers/mmc/host/sdhci-bcm2835.c +0 -2
@@ -71,76 +57,83 @@ static inline u32 bcm2835_sdhci_readl(struct sdhci_host *host, int reg)
  	return val;
  }
 
-static void bcm2835_sdhci_writew(struct sdhci_host *host, u16 val, int reg)
-{

... (entire function deleted)

Quoted 6 lines

drivers/mmc/host/sdhci-bcm2835.c static inline u32 bcm2835_sdhci_readl(struct sdhci_host *host, int reg) · line 76

Quoted 1 line
drivers/mmc/host/sdhci-bcm2835.c +0 -1
-}

This patch could be a lot smaller if it didn't re-order the functions at the same time. It makes the patch harder to understand. If you must re-order the functions, perhaps make that a separate patch that does nothing else, so that the actual code changes are easier to see?

ok

Quoted 12 lines

drivers/mmc/host/sdhci-bcm2835.c static inline u32 bcm2835_sdhci_readl(struct sdhci_host *host, int reg) · line 62

Quoted 9 lines
drivers/mmc/host/sdhci-bcm2835.c +1 -5
  static u16 bcm2835_sdhci_readw(struct sdhci_host *host, int reg)
  {
-	u32 val = bcm2835_sdhci_readl(host, (reg & ~3));
-	u32 word_num = (reg >> 1) & 1;
-	u32 word_shift = word_num * 16;
-	u32 word = (val >> word_shift) & 0xffff;
-
+	u32 val = bcm2835_sdhci_readl(host->ioaddr, (reg & ~3));

The change from host to host->ioaddr ends up passing the wrong value to bcm2835_sdhci_readl(). This causes the kernel to crash during boot.

I see that now. Will fix - unfortunately I ported from an existing driver that doesn't need the bcm2835_shdci_readl function.

Quoted 4 lines

The compiler doesn't warn about this because host->ioaddr is void, so can be automatically converted to struct sdhci_host *.

Quoted 9 lines

drivers/mmc/host/sdhci-bcm2835.c static inline u32 bcm2835_sdhci_readl(struct sdhci_host *host, int reg) · line 65

Quoted 3 lines
drivers/mmc/host/sdhci-bcm2835.c +1 -0
+	u16 word = val >> (reg << 3 & 0x18) & 0xffff;
  	return word;
  }

To be honest, I think the existing code is a bit clearer, since it uses variables with names to explain all the intermediate values. Assuming the compiler is competent (which admittedly I haven't checked) I would expect the same code to be generated either way, or at least something pretty similar. Did you measure the benefit of the optimization?

By optimize I meant use the same bit calculation instead of doing different calculations for the same operation. I'll create a macro to make it clearer to see.

Quoted 13 lines
Quoted 13 lines
drivers/mmc/host/sdhci-bcm2835.c +11 -0
+static void bcm2835_sdhci_writew(struct sdhci_host *host, u16 val, int reg)
  {
+	struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
+	struct bcm2835_sdhci_host *bcm2835_host = pltfm_host->priv;
+	u32 word_shift = reg << 3 & 0x18;
+	u32 mask = 0xffff << word_shift;
+	u32 oldval;
+	u32 newval;
+
+	if (reg == SDHCI_COMMAND) {
+		if (bcm2835_host->shadow_blk != 0) {
+			writel(bcm2835_host->shadow_blk,
Quoted 8 lines

drivers/mmc/host/sdhci-bcm2835.c static inline u32 bcm2835_sdhci_readl(struct sdhci_host *host, int reg) · line 93

Quoted 3 lines
drivers/mmc/host/sdhci-bcm2835.c +3 -0
+			       host->ioaddr + SDHCI_BLOCK_SIZE);
+			bcm2835_host->shadow_blk = 0;
+		}

Is it absolutely guaranteed that there's never a need to write 0 to that register? I can see that no data transfer command is likely to transfer 0 blocks. I assume no other type of command uses that register as a parameter?

Correct.

Quoted 1 line
author maintainer
#63 lore raw

v6 cover Add initial support for Broadcom Cygnus SoC

In reply to a message not in the archive

This patchset contains initial support for Broadcom's Cygnus SoC based on our iProc architecture. Initial support is minimal and includes just the mach platform code, clock driver, and a basic device tree configuration. Peripheral drivers will be submitted soon, as will device tree configurations for other Cygnus board variants.

Changes from v5:
- removed one level of menu used in mach-bcm/Kconfig
- changed MAINTAINERS to use N: to support all files associated with iproc and cygnus going forward
- updated bcm_cygnus_defconfig to remove some DEBUG options that greatly hamper performance

Changes from v4:
- simple clock tree used. reworked clock driver will be submitted later
- fixed MAINTAINERS patchset error
- removed DEBUG_UART_8250 Kconfig.debug legacy support
- made ARCH_BCM_IPROC a silent Kconfig option
- removed multi_v7_defconfig as it is not needed at this time, can support in future patchset but does not seem optimal configs for our current usage.

Changes from v3:
- restart functionality removed. Will be added in a different patchset in drivers/power
- removed NEON init sequence. Will be moved to bootloader
- cleaned up Kconfigs for ARCH_BCM_CYGNUS by removing unnecessary selects
- consolidated ARCH_BCM_IPROC with select from ARCH_BCM_CYGNUS and ARCH_BCM5301X
- removed bcm911360_entphn binding
- added documentation for SoCs currently supported in Cygnus family

Changes from v2:
- rebased to 3.17 kernel

Changes from v1:
- Address code review comments as per previous responses.
- Copyright headers updated to remove Broadcom URL.
- mach platform code still contains hard coded addresses. These address are the same for all Cygnus variants. Could you please provide guidance on where they should go if you would still like them changed. There does not seem to be a reason to change them to device tree as they do not change.

Jonathan Richardson (3):
ARM: cygnus: Initial support for Broadcom Cygnus SoC
dt-bindings: Document Broadcom Cygnus SoC and clocks
ARM: cygnus defconfig : Initial defconfig for Broadcom Cygnus SoC

Scott Branden (3):
ARM: dts: Enable Broadcom Cygnus SoC
MAINTAINERS: Entry for Cygnus/iproc arm architecture
ARM: mach-bcm: Consolidate currently supported IPROC SoCs

 .../devicetree/bindings/arm/bcm/cygnus.txt         |   31 +++
 .../devicetree/bindings/clock/bcm-cygnus-clock.txt |   34 +++
 MAINTAINERS                                        |   14 ++
 arch/arm/boot/dts/Makefile                         |    4 +
 arch/arm/boot/dts/bcm-cygnus-clock.dtsi            |   73 ++++++
 arch/arm/boot/dts/bcm-cygnus.dtsi                  |  109 +++++++++
 arch/arm/boot/dts/bcm911360_entphn.dts             |   22 ++
 arch/arm/boot/dts/bcm911360k.dts                   |   22 ++
 arch/arm/boot/dts/bcm958300k.dts                   |   22 ++
 arch/arm/configs/bcm_cygnus_defconfig              |  237 ++++++++++++++++++++
 arch/arm/mach-bcm/Kconfig                          |   65 ++++--
 arch/arm/mach-bcm/Makefile                         |    3 +
 arch/arm/mach-bcm/bcm_cygnus.c                     |   26 +++
 13 files changed, 641 insertions(+), 21 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/arm/bcm/cygnus.txt
 create mode 100644 Documentation/devicetree/bindings/clock/bcm-cygnus-clock.txt
 create mode 100644 arch/arm/boot/dts/bcm-cygnus-clock.dtsi
 create mode 100644 arch/arm/boot/dts/bcm-cygnus.dtsi
 create mode 100644 arch/arm/boot/dts/bcm911360_entphn.dts
 create mode 100644 arch/arm/boot/dts/bcm911360k.dts
 create mode 100644 arch/arm/boot/dts/bcm958300k.dts
 create mode 100644 arch/arm/configs/bcm_cygnus_defconfig
 create mode 100644 arch/arm/mach-bcm/bcm_cygnus.c
Signature · 1 line
1.7.9.5
author maintainer
#64 lore raw

PATCH v6 1/6 ARM: cygnus: Initial support for Broadcom Cygnus SoC

From: Jonathan Richardson <[email protected]>

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

---
 arch/arm/mach-bcm/Kconfig      |   28 ++++++++++++++++++++++++++++
 arch/arm/mach-bcm/Makefile     |    3 +++
 arch/arm/mach-bcm/bcm_cygnus.c |   26 ++++++++++++++++++++++++++
 3 files changed, 57 insertions(+)
 create mode 100644 arch/arm/mach-bcm/bcm_cygnus.c
arch/arm/mach-bcm/Kconfig +28 -0
index 2abad74..f5e638e 100644
@@ -5,6 +5,34 @@ menuconfig ARCH_BCM
 
 if ARCH_BCM
 
+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.
+
 config ARCH_BCM_MOBILE
 	bool "Broadcom Mobile SoC Support" if ARCH_MULTI_V7
 	select ARCH_REQUIRE_GPIOLIB
arch/arm/mach-bcm/Makefile +3 -0
index 300ae4b..34d45ba 100644
@@ -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
 
arch/arm/mach-bcm/bcm_cygnus.c new file +26 -0
new file mode 100644
index 0000000..41b4933
@@ -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
Signature · 1 line
1.7.9.5
author maintainer
#65 lore raw

PATCH v6 2/6 dt-bindings: Document Broadcom Cygnus SoC and clocks

In reply to Scott Branden

From: Jonathan Richardson <[email protected]>

---
 .../devicetree/bindings/arm/bcm/cygnus.txt         |   31 ++++++++++++++++++
 .../devicetree/bindings/clock/bcm-cygnus-clock.txt |   34 ++++++++++++++++++++
 2 files changed, 65 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/arm/bcm/cygnus.txt
 create mode 100644 Documentation/devicetree/bindings/clock/bcm-cygnus-clock.txt
Documentation/devicetree/bindings/arm/bcm/cygnus.txt new file +31 -0
new file mode 100644
index 0000000..4c77169
@@ -0,0 +1,31 @@
+Broadcom Cygnus device tree bindings
+------------------------------------
+
+
+Boards with Cygnus SoCs shall have the following properties:
+
+Required root node property:
+
+BCM11300
+compatible = "brcm,bcm11300", "brcm,cygnus";
+
+BCM11320
+compatible = "brcm,bcm11320", "brcm,cygnus";
+
+BCM11350
+compatible = "brcm,bcm11350", "brcm,cygnus";
+
+BCM11360
+compatible = "brcm,bcm11360", "brcm,cygnus";
+
+BCM58300
+compatible = "brcm,bcm58300", "brcm,cygnus";
+
+BCM58302
+compatible = "brcm,bcm58302", "brcm,cygnus";
+
+BCM58303
+compatible = "brcm,bcm58303", "brcm,cygnus";
+
+BCM58305
+compatible = "brcm,bcm58305", "brcm,cygnus";
Documentation/devicetree/bindings/clock/bcm-cygnus-clock.txt new file +34 -0
new file mode 100644
index 0000000..00d26ed
@@ -0,0 +1,34 @@
+Broadcom Cygnus Clocks
+
+This binding uses the common clock binding:
+Documentation/devicetree/bindings/clock/clock-bindings.txt
+
+Currently various "fixed" clocks are declared for peripheral drivers that use
+the common clock framework to reference their core clocks. Proper support of
+these clocks will be added later
+
+Device tree example:
+
+	clocks {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges;
+
+		osc: oscillator {
+			compatible = "fixed-clock";
+			#clock-cells = <1>;
+			clock-frequency = <25000000>;
+		};
+
+		apb_clk: apb_clk {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+			clock-frequency = <1000000000>;
+		};
+
+		periph_clk: periph_clk {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+			clock-frequency = <500000000>;
+		};
+	};
Signature · 1 line
1.7.9.5
author maintainer
#66 lore raw

PATCH v6 3/6 ARM: cygnus defconfig : Initial defconfig for Broadcom Cygnus SoC

In reply to Scott Branden

From: Jonathan Richardson <[email protected]>

This defconfig is utilized so a customer or developer can understand what kernel drivers are utilized by the Cygnus SoC. It also enables debug configs which should be disabled if optimal performance is desired.

---
 arch/arm/configs/bcm_cygnus_defconfig |  237 +++++++++++++++++++++++++++++++++
 1 file changed, 237 insertions(+)
 create mode 100644 arch/arm/configs/bcm_cygnus_defconfig
arch/arm/configs/bcm_cygnus_defconfig new file +237 -0
new file mode 100644
index 0000000..9ad77a8
@@ -0,0 +1,237 @@
+CONFIG_KERNEL_XZ=y
+# CONFIG_SWAP is not set
+CONFIG_SYSVIPC=y
+CONFIG_FHANDLE=y
+CONFIG_IRQ_DOMAIN_DEBUG=y
+CONFIG_NO_HZ_IDLE=y
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_BSD_PROCESS_ACCT=y
+CONFIG_BSD_PROCESS_ACCT_V3=y
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_LOG_BUF_SHIFT=19
+CONFIG_CGROUPS=y
+CONFIG_CGROUP_FREEZER=y
+CONFIG_CGROUP_DEVICE=y
+CONFIG_CGROUP_CPUACCT=y
+CONFIG_RESOURCE_COUNTERS=y
+CONFIG_CGROUP_SCHED=y
+CONFIG_BLK_CGROUP=y
+CONFIG_NAMESPACES=y
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_EMBEDDED=y
+CONFIG_PERF_EVENTS=y
+# CONFIG_COMPAT_BRK is not set
+CONFIG_JUMP_LABEL=y
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_BLK_DEV_BSG is not set
+CONFIG_PARTITION_ADVANCED=y
+CONFIG_ARCH_BCM=y
+CONFIG_ARCH_BCM_CYGNUS=y
+CONFIG_ARM_THUMBEE=y
+CONFIG_PCI=y
+CONFIG_PCI_DEBUG=y
+CONFIG_PREEMPT=y
+CONFIG_AEABI=y
+CONFIG_HIGHMEM=y
+# CONFIG_COMPACTION is not set
+# CONFIG_ATAGS is not set
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_ARM_APPENDED_DTB=y
+CONFIG_CPU_IDLE=y
+CONFIG_VFP=y
+CONFIG_NEON=y
+# CONFIG_SUSPEND is not set
+CONFIG_NET=y
+CONFIG_PACKET=y
+CONFIG_UNIX=y
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+CONFIG_IP_ADVANCED_ROUTER=y
+CONFIG_IP_MULTIPLE_TABLES=y
+CONFIG_IP_ROUTE_MULTIPATH=y
+CONFIG_IP_ROUTE_VERBOSE=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_MROUTE=y
+CONFIG_IP_MROUTE_MULTIPLE_TABLES=y
+CONFIG_SYN_COOKIES=y
+# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
+# CONFIG_INET_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_BEET is not set
+# CONFIG_INET_LRO is not set
+# CONFIG_INET_DIAG is not set
+CONFIG_TCP_CONG_ADVANCED=y
+# CONFIG_TCP_CONG_BIC is not set
+# CONFIG_TCP_CONG_WESTWOOD is not set
+# CONFIG_TCP_CONG_HTCP is not set
+CONFIG_IPV6=y
+# CONFIG_INET6_XFRM_MODE_TRANSPORT is not set
+# CONFIG_INET6_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET6_XFRM_MODE_BEET is not set
+# CONFIG_IPV6_SIT is not set
+CONFIG_IPV6_MULTIPLE_TABLES=y
+CONFIG_IPV6_SUBTREES=y
+CONFIG_IPV6_MROUTE=y
+CONFIG_NETFILTER=y
+# CONFIG_BRIDGE_NETFILTER is not set
+CONFIG_NF_CONNTRACK=y
+# CONFIG_NF_CONNTRACK_PROCFS is not set
+CONFIG_NF_CONNTRACK_FTP=y
+CONFIG_NF_CONNTRACK_IPV4=y
+CONFIG_IP_NF_IPTABLES=y
+CONFIG_IP_NF_FILTER=y
+CONFIG_IP_NF_TARGET_REJECT=y
+CONFIG_IP_NF_NAT=y
+CONFIG_IP_NF_TARGET_MASQUERADE=y
+CONFIG_IP_NF_TARGET_REDIRECT=y
+CONFIG_IP_NF_MANGLE=y
+CONFIG_IP_NF_RAW=y
+CONFIG_NF_CONNTRACK_IPV6=y
+CONFIG_IP6_NF_IPTABLES=y
+CONFIG_IP6_NF_MATCH_AH=y
+CONFIG_IP6_NF_MATCH_EUI64=y
+CONFIG_IP6_NF_MATCH_FRAG=y
+CONFIG_IP6_NF_MATCH_OPTS=y
+CONFIG_IP6_NF_MATCH_IPV6HEADER=y
+CONFIG_IP6_NF_MATCH_MH=y
+CONFIG_IP6_NF_MATCH_RT=y
+CONFIG_IP6_NF_FILTER=y
+CONFIG_IP6_NF_TARGET_REJECT=y
+CONFIG_IP6_NF_MANGLE=y
+CONFIG_IP6_NF_RAW=y
+CONFIG_BRIDGE=y
+# CONFIG_BRIDGE_IGMP_SNOOPING is not set
+CONFIG_VLAN_8021Q=y
+CONFIG_NET_SCHED=y
+CONFIG_NET_SCH_FQ_CODEL=y
+CONFIG_CFG80211=y
+# CONFIG_CFG80211_DEFAULT_PS is not set
+CONFIG_CFG80211_WEXT=y
+CONFIG_RFKILL=y
+CONFIG_DEVTMPFS=y
+CONFIG_DEVTMPFS_MOUNT=y
+# CONFIG_FIRMWARE_IN_KERNEL is not set
+CONFIG_MTD=y
+CONFIG_MTD_CMDLINE_PARTS=y
+CONFIG_MTD_BLOCK=y
+CONFIG_MTD_NAND=y
+CONFIG_MTD_UBI=y
+CONFIG_BLK_DEV_LOOP=y
+CONFIG_SCSI=y
+CONFIG_BLK_DEV_SD=y
+CONFIG_BLK_DEV_SR=y
+CONFIG_NETDEVICES=y
+# CONFIG_NET_CADENCE is not set
+# CONFIG_NET_VENDOR_CIRRUS is not set
+# CONFIG_NET_VENDOR_FARADAY is not set
+# CONFIG_NET_VENDOR_INTEL is not set
+# CONFIG_NET_VENDOR_MARVELL is not set
+# CONFIG_NET_VENDOR_MICREL is not set
+# CONFIG_NET_VENDOR_NATSEMI is not set
+# CONFIG_NET_VENDOR_SEEQ is not set
+# CONFIG_NET_VENDOR_SMSC is not set
+# CONFIG_NET_VENDOR_STMICRO is not set
+# CONFIG_NET_VENDOR_WIZNET is not set
+CONFIG_PHYLIB=y
+CONFIG_BROADCOM_PHY=y
+# CONFIG_INPUT_MOUSEDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_KEYBOARD_ATKBD is not set
+# CONFIG_INPUT_MOUSE is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+# CONFIG_SERIO is not set
+# CONFIG_LEGACY_PTYS is not set
+CONFIG_SERIAL_8250=y
+# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_8250_NR_UARTS=2
+CONFIG_SERIAL_8250_RUNTIME_UARTS=2
+CONFIG_SERIAL_8250_DW=y
+CONFIG_SERIAL_OF_PLATFORM=y
+# CONFIG_HW_RANDOM is not set
+CONFIG_I2C_CHARDEV=y
+# CONFIG_I2C_HELPER_AUTO is not set
+CONFIG_I2C_SMBUS=y
+CONFIG_SPI=y
+CONFIG_SPI_PL022=y
+CONFIG_SPI_SPIDEV=y
+CONFIG_GPIO_SYSFS=y
+# CONFIG_HWMON is not set
+CONFIG_WATCHDOG=y
+CONFIG_ARM_SP805_WATCHDOG=y
+CONFIG_MEDIA_SUPPORT=y
+CONFIG_MEDIA_CAMERA_SUPPORT=y
+CONFIG_MEDIA_USB_SUPPORT=y
+CONFIG_USB_VIDEO_CLASS=y
+# CONFIG_USB_GSPCA is not set
+CONFIG_FB=y
+CONFIG_FB_ARMCLCD=y
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+# CONFIG_LCD_CLASS_DEVICE is not set
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+# CONFIG_BACKLIGHT_GENERIC is not set
+CONFIG_BACKLIGHT_PWM=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_SOUND=y
+CONFIG_SND=y
+CONFIG_SND_DYNAMIC_MINORS=y
+CONFIG_SND_VERBOSE_PRINTK=y
+CONFIG_SND_DEBUG=y
+CONFIG_SND_USB_AUDIO=y
+CONFIG_SND_SOC=y
+CONFIG_USB=y
+CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_EHCI_ROOT_HUB_TT=y
+CONFIG_USB_EHCI_HCD_PLATFORM=y
+CONFIG_USB_OHCI_HCD=y
+CONFIG_USB_OHCI_HCD_PLATFORM=y
+CONFIG_USB_STORAGE=y
+CONFIG_MMC=y
+CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_PLTFM=y
+CONFIG_MMC_SDHCI_OF_ARASAN=y
+CONFIG_RTC_CLASS=y
+CONFIG_PWM=y
+CONFIG_EXT4_FS=y
+CONFIG_AUTOFS4_FS=y
+CONFIG_MSDOS_FS=y
+CONFIG_VFAT_FS=y
+CONFIG_NTFS_FS=y
+CONFIG_TMPFS=y
+CONFIG_TMPFS_POSIX_ACL=y
+CONFIG_UBIFS_FS=y
+CONFIG_NFS_FS=y
+CONFIG_ROOT_NFS=y
+CONFIG_NLS_CODEPAGE_437=y
+CONFIG_NLS_ISO8859_1=y
+CONFIG_NLS_UTF8=y
+CONFIG_PRINTK_TIME=y
+CONFIG_DYNAMIC_DEBUG=y
+CONFIG_DEBUG_INFO=y
+CONFIG_STRIP_ASM_SYMS=y
+CONFIG_DEBUG_FS=y
+CONFIG_MAGIC_SYSRQ=y
+CONFIG_DEBUG_OBJECTS=y
+CONFIG_DEBUG_OBJECTS_RCU_HEAD=y
+CONFIG_DEBUG_MEMORY_INIT=y
+CONFIG_DEBUG_SHIRQ=y
+CONFIG_DETECT_HUNG_TASK=y
+CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=110
+CONFIG_BOOTPARAM_HUNG_TASK_PANIC=y
+# CONFIG_SCHED_DEBUG is not set
+CONFIG_SCHEDSTATS=y
+# CONFIG_DEBUG_PREEMPT is not set
+CONFIG_DEBUG_RT_MUTEXES=y
+CONFIG_DEBUG_ATOMIC_SLEEP=y
+CONFIG_DEBUG_USER=y
+CONFIG_DEBUG_LL=y
+CONFIG_DEBUG_LL_UART_8250=y
+CONFIG_DEBUG_UART_PHYS=0x18023000
+CONFIG_DEBUG_UART_VIRT=0xf1023000
+CONFIG_EARLY_PRINTK=y
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
Signature · 1 line
1.7.9.5
author maintainer
#67 lore raw

PATCH v6 4/6 ARM: dts: Enable Broadcom Cygnus SoC

In reply to Scott Branden

DT files to enable cygnus consisting on reference designs and cygnus core configuration.

---
 arch/arm/boot/dts/Makefile              |    4 ++
 arch/arm/boot/dts/bcm-cygnus-clock.dtsi |   73 +++++++++++++++++++++
 arch/arm/boot/dts/bcm-cygnus.dtsi       |  109 +++++++++++++++++++++++++++++++
 arch/arm/boot/dts/bcm911360_entphn.dts  |   22 +++++++
 arch/arm/boot/dts/bcm911360k.dts        |   22 +++++++
 arch/arm/boot/dts/bcm958300k.dts        |   22 +++++++
 6 files changed, 252 insertions(+)
 create mode 100644 arch/arm/boot/dts/bcm-cygnus-clock.dtsi
 create mode 100644 arch/arm/boot/dts/bcm-cygnus.dtsi
 create mode 100644 arch/arm/boot/dts/bcm911360_entphn.dts
 create mode 100644 arch/arm/boot/dts/bcm911360k.dts
 create mode 100644 arch/arm/boot/dts/bcm958300k.dts
arch/arm/boot/dts/Makefile +4 -0
index 7c80af9..a6b734a 100644
@@ -54,6 +54,10 @@ dtb-$(CONFIG_ARCH_AT91)	+= at91-sama5d4ek.dtb
 dtb-$(CONFIG_ARCH_ATLAS6) += atlas6-evb.dtb
 dtb-$(CONFIG_ARCH_AXXIA) += axm5516-amarillo.dtb
 dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b.dtb
+dtb-$(CONFIG_ARCH_BCM_CYGNUS) += \
+	bcm911360_entphn.dtb \
+	bcm911360k.dtb \
+	bcm958300k.dtb
 dtb-$(CONFIG_ARCH_BCM_5301X) += bcm4708-netgear-r6250.dtb
 dtb-$(CONFIG_ARCH_BCM_63XX) += bcm963138dvt.dtb
 dtb-$(CONFIG_ARCH_BCM_MOBILE) += bcm28155-ap.dtb \
arch/arm/boot/dts/bcm-cygnus-clock.dtsi new file +73 -0

73 lines not on this page · raw message

arch/arm/boot/dts/bcm-cygnus.dtsi new file +109 -0

109 lines not on this page · raw message

arch/arm/boot/dts/bcm911360_entphn.dts new file +22 -0
new file mode 100644
index 0000000..c5188d7
@@ -0,0 +1,22 @@
+/*
+ * 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.
+ */
+
+/dts-v1/;
+
+#include "bcm-cygnus.dtsi"
+
+/ {
+	model = "Cygnus Enterprise Phone (BCM911360_ENTPHN)";
+	compatible = "brcm,bcm11360", "brcm,cygnus";
+};
arch/arm/boot/dts/bcm911360k.dts new file +22 -0
new file mode 100644
index 0000000..866d1e1
@@ -0,0 +1,22 @@
+/*
+ * 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.
+ */
+
+/dts-v1/;
+
+#include "bcm-cygnus.dtsi"
+
+/ {
+	model = "Cygnus SVK (BCM911360K)";
+	compatible = "brcm,bcm11360", "brcm,cygnus";
+};
arch/arm/boot/dts/bcm958300k.dts new file +22 -0
new file mode 100644
index 0000000..8739751
@@ -0,0 +1,22 @@
+/*
+ * 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.
+ */
+
+/dts-v1/;
+
+#include "bcm-cygnus.dtsi"
+
+/ {
+	model = "Cygnus SVK (BCM958300K)";
+	compatible = "brcm,bcm58300", "brcm,cygnus";
+};
Signature · 1 line
1.7.9.5
author maintainer
#68 lore raw

PATCH v6 5/6 MAINTAINERS: Entry for Cygnus/iproc arm architecture

In reply to Scott Branden
---
 MAINTAINERS |   14 ++++++++++++++
 1 file changed, 14 insertions(+)
MAINTAINERS +14 -0
index b0f17d5..dfe255f 100644
@@ -2125,6 +2125,20 @@ L:	linux-scsi at vger.kernel.org
 S:	Supported
 F:	drivers/scsi/bnx2i/
 
+BROADCOM CYGNUS/IPROC ARM ARCHITECTURE
+M:	Ray Jui <[email protected]>
+M:	Scott Branden <[email protected]>
+L:	linux-arm-kernel at lists.infradead.org (moderated for non-subscribers)
+L:	bcm-kernel-feedback-list at broadcom.com
+T:	git git://git.github.com/brcm/linux.git
+S:	Maintained
+N:	iproc
+N:	cygnus
+N:	bcm9113*
+N:	bcm9583*
+N:	bcm583*
+N:	bcm113*
+
 BROADCOM KONA GPIO DRIVER
 M:	Ray Jui <[email protected]>
 L:	bcm-kernel-feedback-list at broadcom.com
Signature · 1 line
1.7.9.5
author maintainer
#69 lore raw

PATCH v6 6/6 ARM: mach-bcm: Consolidate currently supported IPROC SoCs

In reply to Scott Branden

Move ARCH_BCM_5301X subarch under ARCH_IPROC architecture. Additional IPROC chipsets that share a lot of commonality should be added under ARCH_IPROC as well.

---
 arch/arm/mach-bcm/Kconfig |   37 ++++++++++++++++---------------------
 1 file changed, 16 insertions(+), 21 deletions(-)
arch/arm/mach-bcm/Kconfig +16 -21
index f5e638e..a51f191 100644
@@ -33,6 +33,22 @@ config ARCH_BCM_CYGNUS
 	  BCM11300, BCM11320, BCM11350, BCM11360,
 	  BCM58300, BCM58302, BCM58303, BCM58305.
 
+config ARCH_BCM_5301X
+	bool "Broadcom BCM470X / BCM5301X ARM SoC" if ARCH_MULTI_V7
+	select ARCH_BCM_IPROC
+	help
+	  Support for Broadcom BCM470X and BCM5301X SoCs with ARM CPU cores.
+
+	  This is a network SoC line mostly used in home routers and
+	  wifi access points, it's internal name is Northstar.
+	  This inclused the following SoC: BCM53010, BCM53011, BCM53012,
+	  BCM53014, BCM53015, BCM53016, BCM53017, BCM53018, BCM4707,
+	  BCM4708 and BCM4709.
+
+	  Do not confuse this with the BCM4760 which is a totally
+	  different SoC or with the older BCM47XX and BCM53XX based
+	  network SoC using a MIPS CPU, they are supported by arch/mips/bcm47xx
+
 config ARCH_BCM_MOBILE
 	bool "Broadcom Mobile SoC Support" if ARCH_MULTI_V7
 	select ARCH_REQUIRE_GPIOLIB
@@ -106,27 +122,6 @@ config ARCH_BCM2835
 	  This enables support for the Broadcom BCM2835 SoC. This SoC is
 	  used in the Raspberry Pi and Roku 2 devices.
 
-config ARCH_BCM_5301X
-	bool "Broadcom BCM470X / BCM5301X ARM SoC" if ARCH_MULTI_V7
-	select ARM_GIC
-	select CACHE_L2X0
-	select HAVE_ARM_SCU if SMP
-	select HAVE_ARM_TWD if SMP
-	select ARM_GLOBAL_TIMER
-	select CLKSRC_ARM_GLOBAL_TIMER_SCHED_CLOCK
-	help
-	  Support for Broadcom BCM470X and BCM5301X SoCs with ARM CPU cores.
-
-	  This is a network SoC line mostly used in home routers and
-	  wifi access points, it's internal name is Northstar.
-	  This inclused the following SoC: BCM53010, BCM53011, BCM53012,
-	  BCM53014, BCM53015, BCM53016, BCM53017, BCM53018, BCM4707,
-	  BCM4708 and BCM4709.
-
-	  Do not confuse this with the BCM4760 which is a totally
-	  different SoC or with the older BCM47XX and BCM53XX based
-	  network SoC using a MIPS CPU, they are supported by arch/mips/bcm47xx
-
 config ARCH_BCM_63XX
 	bool "Broadcom BCM63xx DSL SoC" if ARCH_MULTI_V7
 	depends on MMU
Signature · 1 line
1.7.9.5
author maintainer
#70 lore raw

v7 cover Add initial support for Broadcom Cygnus SoC

In reply to a message not in the archive

This patchset contains initial support for Broadcom's Cygnus SoC based on our iProc architecture. Initial support is minimal and includes just the mach platform code, clock driver, and a basic device tree configuration. Peripheral drivers will be submitted soon, as will device tree configurations for other Cygnus board variants.

Changes from v6:
- Additional patch added for cleanup of other areas of mach-bcm/Kconfig discovered during Cygnus submission review to:
- removed one level of menu for ARCH_BCM_MOBILE in mach-bcm-Kconfig based on feedback from Arnd
- added comment sections to Kconfig to identify SoC architecture groupings

Changes from v5:
- removed one level of menu used in mach-bcm/Kconfig
- changed MAINTAINERS to use N: to support all files associated with iproc and cygnus going forward
- updated bcm_cygnus_defconfig to remove some DEBUG options that greatly hamper performance

Changes from v4:
- simple clock tree used. reworked clock driver will be submitted later
- fixed MAINTAINERS patchset error
- removed DEBUG_UART_8250 Kconfig.debug legacy support
- made ARCH_BCM_IPROC a silent Kconfig option
- removed multi_v7_defconfig as it is not needed at this time, can support in future patchset but does not seem optimal configs for our current usage.

Changes from v3:
- restart functionality removed. Will be added in a different patchset in drivers/power
- removed NEON init sequence. Will be moved to bootloader
- cleaned up Kconfigs for ARCH_BCM_CYGNUS by removing unnecessary selects
- consolidated ARCH_BCM_IPROC with select from ARCH_BCM_CYGNUS and ARCH_BCM5301X
- removed bcm911360_entphn binding
- added documentation for SoCs currently supported in Cygnus family

Changes from v2:
- rebased to 3.17 kernel

Changes from v1:
- Address code review comments as per previous responses.
- Copyright headers updated to remove Broadcom URL.
- mach platform code still contains hard coded addresses. These address are the same for all Cygnus variants. Could you please provide guidance on where they should go if you would still like them changed. There does not seem to be a reason to change them to device tree as they do not change.

Jonathan Richardson (3):
ARM: cygnus: Initial support for Broadcom Cygnus SoC
dt-bindings: Document Broadcom Cygnus SoC and clocks
ARM: cygnus defconfig : Initial defconfig for Broadcom Cygnus SoC

Scott Branden (4):
ARM: dts: Enable Broadcom Cygnus SoC
MAINTAINERS: Entry for Cygnus/iproc arm architecture
ARM: mach-bcm: Consolidate currently supported IPROC SoCs
ARM: mach-bcm: ARCH_BCM_MOBILE: remove one level of menu from Kconfig

 .../devicetree/bindings/arm/bcm/cygnus.txt         |   31 +++
 .../devicetree/bindings/clock/bcm-cygnus-clock.txt |   34 +++
 MAINTAINERS                                        |   14 ++
 arch/arm/boot/dts/Makefile                         |    4 +
 arch/arm/boot/dts/bcm-cygnus-clock.dtsi            |   73 ++++++
 arch/arm/boot/dts/bcm-cygnus.dtsi                  |  109 +++++++++
 arch/arm/boot/dts/bcm911360_entphn.dts             |   22 ++
 arch/arm/boot/dts/bcm911360k.dts                   |   22 ++
 arch/arm/boot/dts/bcm958300k.dts                   |   22 ++
 arch/arm/configs/bcm_cygnus_defconfig              |  237 ++++++++++++++++++++
 arch/arm/configs/bcm_defconfig                     |    3 +-
 arch/arm/configs/multi_v7_defconfig                |    3 +-
 arch/arm/mach-bcm/Kconfig                          |   93 +++++---
 arch/arm/mach-bcm/Makefile                         |    3 +
 arch/arm/mach-bcm/bcm_cygnus.c                     |   26 +++
 15 files changed, 658 insertions(+), 38 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/arm/bcm/cygnus.txt
 create mode 100644 Documentation/devicetree/bindings/clock/bcm-cygnus-clock.txt
 create mode 100644 arch/arm/boot/dts/bcm-cygnus-clock.dtsi
 create mode 100644 arch/arm/boot/dts/bcm-cygnus.dtsi
 create mode 100644 arch/arm/boot/dts/bcm911360_entphn.dts
 create mode 100644 arch/arm/boot/dts/bcm911360k.dts
 create mode 100644 arch/arm/boot/dts/bcm958300k.dts
 create mode 100644 arch/arm/configs/bcm_cygnus_defconfig
 create mode 100644 arch/arm/mach-bcm/bcm_cygnus.c
Signature · 1 line
1.7.9.5
author maintainer
#71 lore raw

PATCH v7 1/7 ARM: cygnus: Initial support for Broadcom Cygnus SoC

From: Jonathan Richardson <[email protected]>

Adds initial support for the Cygnus SoC based on Broadcom?s iProc series.

---
 arch/arm/mach-bcm/Kconfig      |   32 ++++++++++++++++++++++++++++++++
 arch/arm/mach-bcm/Makefile     |    3 +++
 arch/arm/mach-bcm/bcm_cygnus.c |   26 ++++++++++++++++++++++++++
 3 files changed, 61 insertions(+)
 create mode 100644 arch/arm/mach-bcm/bcm_cygnus.c
arch/arm/mach-bcm/Kconfig +32 -0
index 2abad74..73d95c2 100644
@@ -5,6 +5,36 @@ menuconfig ARCH_BCM
 
 if ARCH_BCM
 
+comment "IPROC architected SoCs"
+
+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.
+
 config ARCH_BCM_MOBILE
 	bool "Broadcom Mobile SoC Support" if ARCH_MULTI_V7
 	select ARCH_REQUIRE_GPIOLIB
@@ -65,6 +95,8 @@ endmenu
 
 endif
 
+comment "Other Architectures"
+
 config ARCH_BCM2835
 	bool "Broadcom BCM2835 family" if ARCH_MULTI_V6
 	select ARCH_REQUIRE_GPIOLIB
arch/arm/mach-bcm/Makefile +3 -0
index 300ae4b..34d45ba 100644
@@ -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
 
arch/arm/mach-bcm/bcm_cygnus.c new file +26 -0
new file mode 100644
index 0000000..41b4933
@@ -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
Signature · 1 line
1.7.9.5
author maintainer
#72 lore raw

PATCH v7 2/7 dt-bindings: Document Broadcom Cygnus SoC and clocks

In reply to Scott Branden

From: Jonathan Richardson <[email protected]>

---
 .../devicetree/bindings/arm/bcm/cygnus.txt         |   31 ++++++++++++++++++
 .../devicetree/bindings/clock/bcm-cygnus-clock.txt |   34 ++++++++++++++++++++
 2 files changed, 65 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/arm/bcm/cygnus.txt
 create mode 100644 Documentation/devicetree/bindings/clock/bcm-cygnus-clock.txt
Documentation/devicetree/bindings/arm/bcm/cygnus.txt new file +31 -0
new file mode 100644
index 0000000..4c77169
@@ -0,0 +1,31 @@
+Broadcom Cygnus device tree bindings
+------------------------------------
+
+
+Boards with Cygnus SoCs shall have the following properties:
+
+Required root node property:
+
+BCM11300
+compatible = "brcm,bcm11300", "brcm,cygnus";
+
+BCM11320
+compatible = "brcm,bcm11320", "brcm,cygnus";
+
+BCM11350
+compatible = "brcm,bcm11350", "brcm,cygnus";
+
+BCM11360
+compatible = "brcm,bcm11360", "brcm,cygnus";
+
+BCM58300
+compatible = "brcm,bcm58300", "brcm,cygnus";
+
+BCM58302
+compatible = "brcm,bcm58302", "brcm,cygnus";
+
+BCM58303
+compatible = "brcm,bcm58303", "brcm,cygnus";
+
+BCM58305
+compatible = "brcm,bcm58305", "brcm,cygnus";
Documentation/devicetree/bindings/clock/bcm-cygnus-clock.txt new file +34 -0
new file mode 100644
index 0000000..00d26ed
@@ -0,0 +1,34 @@
+Broadcom Cygnus Clocks
+
+This binding uses the common clock binding:
+Documentation/devicetree/bindings/clock/clock-bindings.txt
+
+Currently various "fixed" clocks are declared for peripheral drivers that use
+the common clock framework to reference their core clocks. Proper support of
+these clocks will be added later
+
+Device tree example:
+
+	clocks {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges;
+
+		osc: oscillator {
+			compatible = "fixed-clock";
+			#clock-cells = <1>;
+			clock-frequency = <25000000>;
+		};
+
+		apb_clk: apb_clk {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+			clock-frequency = <1000000000>;
+		};
+
+		periph_clk: periph_clk {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+			clock-frequency = <500000000>;
+		};
+	};
Signature · 1 line
1.7.9.5
author maintainer
#73 lore raw

PATCH v7 3/7 ARM: cygnus defconfig : Initial defconfig for Broadcom Cygnus SoC

In reply to Scott Branden

From: Jonathan Richardson <[email protected]>

This defconfig is utilized so a customer or developer can understand what kernel drivers are utilized by the Cygnus SoC. It also enables debug configs which should be disabled if optimal performance is desired.

---
 arch/arm/configs/bcm_cygnus_defconfig |  237 +++++++++++++++++++++++++++++++++
 1 file changed, 237 insertions(+)
 create mode 100644 arch/arm/configs/bcm_cygnus_defconfig
arch/arm/configs/bcm_cygnus_defconfig new file +237 -0
new file mode 100644
index 0000000..9ad77a8
@@ -0,0 +1,237 @@
+CONFIG_KERNEL_XZ=y
+# CONFIG_SWAP is not set
+CONFIG_SYSVIPC=y
+CONFIG_FHANDLE=y
+CONFIG_IRQ_DOMAIN_DEBUG=y
+CONFIG_NO_HZ_IDLE=y
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_BSD_PROCESS_ACCT=y
+CONFIG_BSD_PROCESS_ACCT_V3=y
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_LOG_BUF_SHIFT=19
+CONFIG_CGROUPS=y
+CONFIG_CGROUP_FREEZER=y
+CONFIG_CGROUP_DEVICE=y
+CONFIG_CGROUP_CPUACCT=y
+CONFIG_RESOURCE_COUNTERS=y
+CONFIG_CGROUP_SCHED=y
+CONFIG_BLK_CGROUP=y
+CONFIG_NAMESPACES=y
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_EMBEDDED=y
+CONFIG_PERF_EVENTS=y
+# CONFIG_COMPAT_BRK is not set
+CONFIG_JUMP_LABEL=y
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_BLK_DEV_BSG is not set
+CONFIG_PARTITION_ADVANCED=y
+CONFIG_ARCH_BCM=y
+CONFIG_ARCH_BCM_CYGNUS=y
+CONFIG_ARM_THUMBEE=y
+CONFIG_PCI=y
+CONFIG_PCI_DEBUG=y
+CONFIG_PREEMPT=y
+CONFIG_AEABI=y
+CONFIG_HIGHMEM=y
+# CONFIG_COMPACTION is not set
+# CONFIG_ATAGS is not set
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_ARM_APPENDED_DTB=y
+CONFIG_CPU_IDLE=y
+CONFIG_VFP=y
+CONFIG_NEON=y
+# CONFIG_SUSPEND is not set
+CONFIG_NET=y
+CONFIG_PACKET=y
+CONFIG_UNIX=y
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+CONFIG_IP_ADVANCED_ROUTER=y
+CONFIG_IP_MULTIPLE_TABLES=y
+CONFIG_IP_ROUTE_MULTIPATH=y
+CONFIG_IP_ROUTE_VERBOSE=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_MROUTE=y
+CONFIG_IP_MROUTE_MULTIPLE_TABLES=y
+CONFIG_SYN_COOKIES=y
+# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
+# CONFIG_INET_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_BEET is not set
+# CONFIG_INET_LRO is not set
+# CONFIG_INET_DIAG is not set
+CONFIG_TCP_CONG_ADVANCED=y
+# CONFIG_TCP_CONG_BIC is not set
+# CONFIG_TCP_CONG_WESTWOOD is not set
+# CONFIG_TCP_CONG_HTCP is not set
+CONFIG_IPV6=y
+# CONFIG_INET6_XFRM_MODE_TRANSPORT is not set
+# CONFIG_INET6_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET6_XFRM_MODE_BEET is not set
+# CONFIG_IPV6_SIT is not set
+CONFIG_IPV6_MULTIPLE_TABLES=y
+CONFIG_IPV6_SUBTREES=y
+CONFIG_IPV6_MROUTE=y
+CONFIG_NETFILTER=y
+# CONFIG_BRIDGE_NETFILTER is not set
+CONFIG_NF_CONNTRACK=y
+# CONFIG_NF_CONNTRACK_PROCFS is not set
+CONFIG_NF_CONNTRACK_FTP=y
+CONFIG_NF_CONNTRACK_IPV4=y
+CONFIG_IP_NF_IPTABLES=y
+CONFIG_IP_NF_FILTER=y
+CONFIG_IP_NF_TARGET_REJECT=y
+CONFIG_IP_NF_NAT=y
+CONFIG_IP_NF_TARGET_MASQUERADE=y
+CONFIG_IP_NF_TARGET_REDIRECT=y
+CONFIG_IP_NF_MANGLE=y
+CONFIG_IP_NF_RAW=y
+CONFIG_NF_CONNTRACK_IPV6=y
+CONFIG_IP6_NF_IPTABLES=y
+CONFIG_IP6_NF_MATCH_AH=y
+CONFIG_IP6_NF_MATCH_EUI64=y
+CONFIG_IP6_NF_MATCH_FRAG=y
+CONFIG_IP6_NF_MATCH_OPTS=y
+CONFIG_IP6_NF_MATCH_IPV6HEADER=y
+CONFIG_IP6_NF_MATCH_MH=y
+CONFIG_IP6_NF_MATCH_RT=y
+CONFIG_IP6_NF_FILTER=y
+CONFIG_IP6_NF_TARGET_REJECT=y
+CONFIG_IP6_NF_MANGLE=y
+CONFIG_IP6_NF_RAW=y
+CONFIG_BRIDGE=y
+# CONFIG_BRIDGE_IGMP_SNOOPING is not set
+CONFIG_VLAN_8021Q=y
+CONFIG_NET_SCHED=y
+CONFIG_NET_SCH_FQ_CODEL=y
+CONFIG_CFG80211=y
+# CONFIG_CFG80211_DEFAULT_PS is not set
+CONFIG_CFG80211_WEXT=y
+CONFIG_RFKILL=y
+CONFIG_DEVTMPFS=y
+CONFIG_DEVTMPFS_MOUNT=y
+# CONFIG_FIRMWARE_IN_KERNEL is not set
+CONFIG_MTD=y
+CONFIG_MTD_CMDLINE_PARTS=y
+CONFIG_MTD_BLOCK=y
+CONFIG_MTD_NAND=y
+CONFIG_MTD_UBI=y
+CONFIG_BLK_DEV_LOOP=y
+CONFIG_SCSI=y
+CONFIG_BLK_DEV_SD=y
+CONFIG_BLK_DEV_SR=y
+CONFIG_NETDEVICES=y
+# CONFIG_NET_CADENCE is not set
+# CONFIG_NET_VENDOR_CIRRUS is not set
+# CONFIG_NET_VENDOR_FARADAY is not set
+# CONFIG_NET_VENDOR_INTEL is not set
+# CONFIG_NET_VENDOR_MARVELL is not set
+# CONFIG_NET_VENDOR_MICREL is not set
+# CONFIG_NET_VENDOR_NATSEMI is not set
+# CONFIG_NET_VENDOR_SEEQ is not set
+# CONFIG_NET_VENDOR_SMSC is not set
+# CONFIG_NET_VENDOR_STMICRO is not set
+# CONFIG_NET_VENDOR_WIZNET is not set
+CONFIG_PHYLIB=y
+CONFIG_BROADCOM_PHY=y
+# CONFIG_INPUT_MOUSEDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_KEYBOARD_ATKBD is not set
+# CONFIG_INPUT_MOUSE is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+# CONFIG_SERIO is not set
+# CONFIG_LEGACY_PTYS is not set
+CONFIG_SERIAL_8250=y
+# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_8250_NR_UARTS=2
+CONFIG_SERIAL_8250_RUNTIME_UARTS=2
+CONFIG_SERIAL_8250_DW=y
+CONFIG_SERIAL_OF_PLATFORM=y
+# CONFIG_HW_RANDOM is not set
+CONFIG_I2C_CHARDEV=y
+# CONFIG_I2C_HELPER_AUTO is not set
+CONFIG_I2C_SMBUS=y
+CONFIG_SPI=y
+CONFIG_SPI_PL022=y
+CONFIG_SPI_SPIDEV=y
+CONFIG_GPIO_SYSFS=y
+# CONFIG_HWMON is not set
+CONFIG_WATCHDOG=y
+CONFIG_ARM_SP805_WATCHDOG=y
+CONFIG_MEDIA_SUPPORT=y
+CONFIG_MEDIA_CAMERA_SUPPORT=y
+CONFIG_MEDIA_USB_SUPPORT=y
+CONFIG_USB_VIDEO_CLASS=y
+# CONFIG_USB_GSPCA is not set
+CONFIG_FB=y
+CONFIG_FB_ARMCLCD=y
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+# CONFIG_LCD_CLASS_DEVICE is not set
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+# CONFIG_BACKLIGHT_GENERIC is not set
+CONFIG_BACKLIGHT_PWM=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_SOUND=y
+CONFIG_SND=y
+CONFIG_SND_DYNAMIC_MINORS=y
+CONFIG_SND_VERBOSE_PRINTK=y
+CONFIG_SND_DEBUG=y
+CONFIG_SND_USB_AUDIO=y
+CONFIG_SND_SOC=y
+CONFIG_USB=y
+CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_EHCI_ROOT_HUB_TT=y
+CONFIG_USB_EHCI_HCD_PLATFORM=y
+CONFIG_USB_OHCI_HCD=y
+CONFIG_USB_OHCI_HCD_PLATFORM=y
+CONFIG_USB_STORAGE=y
+CONFIG_MMC=y
+CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_PLTFM=y
+CONFIG_MMC_SDHCI_OF_ARASAN=y
+CONFIG_RTC_CLASS=y
+CONFIG_PWM=y
+CONFIG_EXT4_FS=y
+CONFIG_AUTOFS4_FS=y
+CONFIG_MSDOS_FS=y
+CONFIG_VFAT_FS=y
+CONFIG_NTFS_FS=y
+CONFIG_TMPFS=y
+CONFIG_TMPFS_POSIX_ACL=y
+CONFIG_UBIFS_FS=y
+CONFIG_NFS_FS=y
+CONFIG_ROOT_NFS=y
+CONFIG_NLS_CODEPAGE_437=y
+CONFIG_NLS_ISO8859_1=y
+CONFIG_NLS_UTF8=y
+CONFIG_PRINTK_TIME=y
+CONFIG_DYNAMIC_DEBUG=y
+CONFIG_DEBUG_INFO=y
+CONFIG_STRIP_ASM_SYMS=y
+CONFIG_DEBUG_FS=y
+CONFIG_MAGIC_SYSRQ=y
+CONFIG_DEBUG_OBJECTS=y
+CONFIG_DEBUG_OBJECTS_RCU_HEAD=y
+CONFIG_DEBUG_MEMORY_INIT=y
+CONFIG_DEBUG_SHIRQ=y
+CONFIG_DETECT_HUNG_TASK=y
+CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=110
+CONFIG_BOOTPARAM_HUNG_TASK_PANIC=y
+# CONFIG_SCHED_DEBUG is not set
+CONFIG_SCHEDSTATS=y
+# CONFIG_DEBUG_PREEMPT is not set
+CONFIG_DEBUG_RT_MUTEXES=y
+CONFIG_DEBUG_ATOMIC_SLEEP=y
+CONFIG_DEBUG_USER=y
+CONFIG_DEBUG_LL=y
+CONFIG_DEBUG_LL_UART_8250=y
+CONFIG_DEBUG_UART_PHYS=0x18023000
+CONFIG_DEBUG_UART_VIRT=0xf1023000
+CONFIG_EARLY_PRINTK=y
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
Signature · 1 line
1.7.9.5
author maintainer
#74 lore raw

PATCH v7 4/7 ARM: dts: Enable Broadcom Cygnus SoC

In reply to Scott Branden

DT files to enable cygnus consisting on reference designs and cygnus core configuration.

---
 arch/arm/boot/dts/Makefile              |    4 ++
 arch/arm/boot/dts/bcm-cygnus-clock.dtsi |   73 +++++++++++++++++++++
 arch/arm/boot/dts/bcm-cygnus.dtsi       |  109 +++++++++++++++++++++++++++++++
 arch/arm/boot/dts/bcm911360_entphn.dts  |   22 +++++++
 arch/arm/boot/dts/bcm911360k.dts        |   22 +++++++
 arch/arm/boot/dts/bcm958300k.dts        |   22 +++++++
 6 files changed, 252 insertions(+)
 create mode 100644 arch/arm/boot/dts/bcm-cygnus-clock.dtsi
 create mode 100644 arch/arm/boot/dts/bcm-cygnus.dtsi
 create mode 100644 arch/arm/boot/dts/bcm911360_entphn.dts
 create mode 100644 arch/arm/boot/dts/bcm911360k.dts
 create mode 100644 arch/arm/boot/dts/bcm958300k.dts
arch/arm/boot/dts/Makefile +4 -0
index 7c80af9..a6b734a 100644
@@ -54,6 +54,10 @@ dtb-$(CONFIG_ARCH_AT91)	+= at91-sama5d4ek.dtb
 dtb-$(CONFIG_ARCH_ATLAS6) += atlas6-evb.dtb
 dtb-$(CONFIG_ARCH_AXXIA) += axm5516-amarillo.dtb
 dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b.dtb
+dtb-$(CONFIG_ARCH_BCM_CYGNUS) += \
+	bcm911360_entphn.dtb \
+	bcm911360k.dtb \
+	bcm958300k.dtb
 dtb-$(CONFIG_ARCH_BCM_5301X) += bcm4708-netgear-r6250.dtb
 dtb-$(CONFIG_ARCH_BCM_63XX) += bcm963138dvt.dtb
 dtb-$(CONFIG_ARCH_BCM_MOBILE) += bcm28155-ap.dtb \
arch/arm/boot/dts/bcm-cygnus-clock.dtsi new file +73 -0

73 lines not on this page · raw message

arch/arm/boot/dts/bcm-cygnus.dtsi new file +109 -0

109 lines not on this page · raw message

arch/arm/boot/dts/bcm911360_entphn.dts new file +22 -0
new file mode 100644
index 0000000..c5188d7
@@ -0,0 +1,22 @@
+/*
+ * 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.
+ */
+
+/dts-v1/;
+
+#include "bcm-cygnus.dtsi"
+
+/ {
+	model = "Cygnus Enterprise Phone (BCM911360_ENTPHN)";
+	compatible = "brcm,bcm11360", "brcm,cygnus";
+};
arch/arm/boot/dts/bcm911360k.dts new file +22 -0
new file mode 100644
index 0000000..866d1e1
@@ -0,0 +1,22 @@
+/*
+ * 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.
+ */
+
+/dts-v1/;
+
+#include "bcm-cygnus.dtsi"
+
+/ {
+	model = "Cygnus SVK (BCM911360K)";
+	compatible = "brcm,bcm11360", "brcm,cygnus";
+};
arch/arm/boot/dts/bcm958300k.dts new file +22 -0
new file mode 100644
index 0000000..8739751
@@ -0,0 +1,22 @@
+/*
+ * 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.
+ */
+
+/dts-v1/;
+
+#include "bcm-cygnus.dtsi"
+
+/ {
+	model = "Cygnus SVK (BCM958300K)";
+	compatible = "brcm,bcm58300", "brcm,cygnus";
+};
Signature · 1 line
1.7.9.5
maintainer
#75 lore raw

Re: [PATCH v7 4/7] ARM: dts: Enable Broadcom Cygnus SoC

arch/arm/boot/dts/bcm-cygnus.dtsi line 32

Quoted 10 lines · On Wednesday 22 October 2014 13:57:51 Scott Branden wrote:
arch/arm/boot/dts/bcm-cygnus.dtsi new file +9 -0
+
+       aliases {
+               serial0 = &uart3;
+               serial1 = &uart0;
+       };
+
+       chosen {
+               bootargs = "console=ttyS0,115200 earlyprintk debug";
+       };

Please move the 'aliases' and 'chosen' node into the .dts files, these are board specific, not SoC specific.

For chosen, please remove earlyprintk and debug, which don't normally make sense unless you are debugging, and which will break in a multiplatform kernel.

Please also add an "stdout-path = &uart3" property in chosen so that earlycon can work. Note that earlycon is currently broken on arm32, but we'll get there.

Arnd

author maintainer
#76 lore raw

Re: [PATCH v7 4/7] ARM: dts: Enable Broadcom Cygnus SoC

Thanks for the review. Will send out v8 version. Hopefully for finally approval.

Quoted 14 lines · Arnd Bergmann

arch/arm/boot/dts/bcm-cygnus.dtsi line 32

Quoted 10 lines · On Wednesday 22 October 2014 13:57:51 Scott Branden wrote:
arch/arm/boot/dts/bcm-cygnus.dtsi new file +9 -0
+
+       aliases {
+               serial0 = &uart3;
+               serial1 = &uart0;
+       };
+
+       chosen {
+               bootargs = "console=ttyS0,115200 earlyprintk debug";
+       };

Please move the 'aliases' and 'chosen' node into the .dts files, these are board specific, not SoC specific.

ok.

Quoted 4 lines

For chosen, please remove earlyprintk and debug, which don't normally make sense unless you are debugging, and which will break in a multiplatform kernel.

ok.

Quoted 4 lines

Please also add an "stdout-path = &uart3" property in chosen so that earlycon can work. Note that earlycon is currently broken on arm32, but we'll get there.

ok.

Quoted 3 lines

Arnd

author maintainer
#77 lore raw

PATCH v7 5/7 MAINTAINERS: Entry for Cygnus/iproc arm architecture

In reply to Scott Branden
---
 MAINTAINERS |   14 ++++++++++++++
 1 file changed, 14 insertions(+)
MAINTAINERS +14 -0
index b0f17d5..dfe255f 100644
@@ -2125,6 +2125,20 @@ L:	linux-scsi at vger.kernel.org
 S:	Supported
 F:	drivers/scsi/bnx2i/
 
+BROADCOM CYGNUS/IPROC ARM ARCHITECTURE
+M:	Ray Jui <[email protected]>
+M:	Scott Branden <[email protected]>
+L:	linux-arm-kernel at lists.infradead.org (moderated for non-subscribers)
+L:	bcm-kernel-feedback-list at broadcom.com
+T:	git git://git.github.com/brcm/linux.git
+S:	Maintained
+N:	iproc
+N:	cygnus
+N:	bcm9113*
+N:	bcm9583*
+N:	bcm583*
+N:	bcm113*
+
 BROADCOM KONA GPIO DRIVER
 M:	Ray Jui <[email protected]>
 L:	bcm-kernel-feedback-list at broadcom.com
Signature · 1 line
1.7.9.5
author maintainer
#78 lore raw

PATCH v7 6/7 ARM: mach-bcm: Consolidate currently supported IPROC SoCs

In reply to Scott Branden

Move ARCH_BCM_5301X subarch under ARCH_IPROC architecture. Additional IPROC chipsets that share a lot of commonality should be added under ARCH_IPROC as well.

---
 arch/arm/mach-bcm/Kconfig |   37 ++++++++++++++++---------------------
 1 file changed, 16 insertions(+), 21 deletions(-)
arch/arm/mach-bcm/Kconfig +16 -21
index 73d95c2..6e79696 100644
@@ -35,6 +35,22 @@ config ARCH_BCM_CYGNUS
 	  BCM11300, BCM11320, BCM11350, BCM11360,
 	  BCM58300, BCM58302, BCM58303, BCM58305.
 
+config ARCH_BCM_5301X
+	bool "Broadcom BCM470X / BCM5301X ARM SoC" if ARCH_MULTI_V7
+	select ARCH_BCM_IPROC
+	help
+	  Support for Broadcom BCM470X and BCM5301X SoCs with ARM CPU cores.
+
+	  This is a network SoC line mostly used in home routers and
+	  wifi access points, it's internal name is Northstar.
+	  This inclused the following SoC: BCM53010, BCM53011, BCM53012,
+	  BCM53014, BCM53015, BCM53016, BCM53017, BCM53018, BCM4707,
+	  BCM4708 and BCM4709.
+
+	  Do not confuse this with the BCM4760 which is a totally
+	  different SoC or with the older BCM47XX and BCM53XX based
+	  network SoC using a MIPS CPU, they are supported by arch/mips/bcm47xx
+
 config ARCH_BCM_MOBILE
 	bool "Broadcom Mobile SoC Support" if ARCH_MULTI_V7
 	select ARCH_REQUIRE_GPIOLIB
@@ -110,27 +126,6 @@ config ARCH_BCM2835
 	  This enables support for the Broadcom BCM2835 SoC. This SoC is
 	  used in the Raspberry Pi and Roku 2 devices.
 
-config ARCH_BCM_5301X
-	bool "Broadcom BCM470X / BCM5301X ARM SoC" if ARCH_MULTI_V7
-	select ARM_GIC
-	select CACHE_L2X0
-	select HAVE_ARM_SCU if SMP
-	select HAVE_ARM_TWD if SMP
-	select ARM_GLOBAL_TIMER
-	select CLKSRC_ARM_GLOBAL_TIMER_SCHED_CLOCK
-	help
-	  Support for Broadcom BCM470X and BCM5301X SoCs with ARM CPU cores.
-
-	  This is a network SoC line mostly used in home routers and
-	  wifi access points, it's internal name is Northstar.
-	  This inclused the following SoC: BCM53010, BCM53011, BCM53012,
-	  BCM53014, BCM53015, BCM53016, BCM53017, BCM53018, BCM4707,
-	  BCM4708 and BCM4709.
-
-	  Do not confuse this with the BCM4760 which is a totally
-	  different SoC or with the older BCM47XX and BCM53XX based
-	  network SoC using a MIPS CPU, they are supported by arch/mips/bcm47xx
-
 config ARCH_BCM_63XX
 	bool "Broadcom BCM63xx DSL SoC" if ARCH_MULTI_V7
 	depends on MMU
Signature · 1 line
1.7.9.5
author maintainer
#79 lore raw

PATCH v7 7/7 ARM: mach-bcm: ARCH_BCM_MOBILE: remove one level of menu from Kconfig

In reply to Scott Branden

remove menu "Broadcom Mobile SoC Selection" This requires:
- selecting ARCH_BCM_MOBILE based on SoC selections
- fixup bcm_defconfig to work with new menu levels.

---
 arch/arm/configs/bcm_defconfig      |    3 ++-
 arch/arm/configs/multi_v7_defconfig |    3 ++-
 arch/arm/mach-bcm/Kconfig           |   26 ++++++++++----------------
 3 files changed, 14 insertions(+), 18 deletions(-)
arch/arm/configs/bcm_defconfig +2 -1
index bc614f4..83a87e4 100644
@@ -25,7 +25,8 @@ CONFIG_MODULE_UNLOAD=y
 # CONFIG_BLK_DEV_BSG is not set
 CONFIG_PARTITION_ADVANCED=y
 CONFIG_ARCH_BCM=y
-CONFIG_ARCH_BCM_MOBILE=y
+CONFIG_ARCH_BCM_21664=y
+CONFIG_ARCH_BCM_281XX=y
 CONFIG_ARM_THUMBEE=y
 CONFIG_SMP=y
 CONFIG_PREEMPT=y
arch/arm/configs/multi_v7_defconfig +2 -1
index 491b7d5..e8f79fd 100644
@@ -17,7 +17,8 @@ CONFIG_MACH_ARMADA_38X=y
 CONFIG_MACH_ARMADA_XP=y
 CONFIG_MACH_DOVE=y
 CONFIG_ARCH_BCM=y
-CONFIG_ARCH_BCM_MOBILE=y
+CONFIG_ARCH_BCM_21664=y
+CONFIG_ARCH_BCM_281XX=y
 CONFIG_ARCH_BCM_5301X=y
 CONFIG_ARCH_BRCMSTB=y
 CONFIG_ARCH_BERLIN=y
arch/arm/mach-bcm/Kconfig +10 -16
index 6e79696..cceb69f 100644
@@ -51,8 +51,10 @@ config ARCH_BCM_5301X
 	  different SoC or with the older BCM47XX and BCM53XX based
 	  network SoC using a MIPS CPU, they are supported by arch/mips/bcm47xx
 
+comment "KONA architected SoCs"
+
 config ARCH_BCM_MOBILE
-	bool "Broadcom Mobile SoC Support" if ARCH_MULTI_V7
+	bool
 	select ARCH_REQUIRE_GPIOLIB
 	select ARM_ERRATA_754322
 	select ARM_ERRATA_775420
@@ -61,16 +63,13 @@ config ARCH_BCM_MOBILE
 	select TICK_ONESHOT
 	select HAVE_ARM_ARCH_TIMER
 	select PINCTRL
+	select ARCH_BCM_MOBILE_SMP if SMP
 	help
 	  This enables support for systems based on Broadcom mobile SoCs.
 
-if ARCH_BCM_MOBILE
-
-menu "Broadcom Mobile SoC Selection"
-
 config ARCH_BCM_281XX
 	bool "Broadcom BCM281XX SoC family"
-	default y
+	select ARCH_BCM_MOBILE
 	select HAVE_SMP
 	help
 	  Enable support for the BCM281XX family, which includes
@@ -79,7 +78,7 @@ config ARCH_BCM_281XX
 
 config ARCH_BCM_21664
 	bool "Broadcom BCM21664 SoC family"
-	default y
+	select ARCH_BCM_MOBILE
 	select HAVE_SMP
 	help
 	  Enable support for the BCM21664 family, which includes
@@ -87,19 +86,18 @@ config ARCH_BCM_21664
 
 config ARCH_BCM_MOBILE_L2_CACHE
 	bool "Broadcom mobile SoC level 2 cache support"
-	depends on (ARCH_BCM_281XX || ARCH_BCM_21664)
+	depends on ARCH_BCM_MOBILE
 	default y
 	select CACHE_L2X0
 	select ARCH_BCM_MOBILE_SMC
 
 config ARCH_BCM_MOBILE_SMC
 	bool
-	depends on ARCH_BCM_281XX || ARCH_BCM_21664
+	depends on ARCH_BCM_MOBILE
 
 config ARCH_BCM_MOBILE_SMP
-	bool "Broadcom mobile SoC SMP support"
-	depends on (ARCH_BCM_281XX || ARCH_BCM_21664) && SMP
-	default y
+	bool
+	depends on ARCH_BCM_MOBILE
 	select HAVE_ARM_SCU
 	select ARM_ERRATA_764369
 	help
@@ -107,10 +105,6 @@ config ARCH_BCM_MOBILE_SMP
 	  Provided as an option so SMP support for SoCs of this type
 	  can be disabled for an SMP-enabled kernel.
 
-endmenu
-
-endif
-
 comment "Other Architectures"
 
 config ARCH_BCM2835
Signature · 1 line
1.7.9.5
author maintainer
#80 lore raw

v8 cover Add initial support for Broadcom Cygnus SoC

In reply to a message not in the archive

This patchset contains initial support for Broadcom's Cygnus SoC based on our iProc architecture. Initial support is minimal and includes just the mach platform code, clock driver, and a basic device tree configuration. Peripheral drivers will be submitted soon, as will device tree configurations for other Cygnus board variants.

Changes from v7:
- Fixed dts to move uart code to board specific dts files
- Add Cygnus to multi_v7_defconfig. It boots.

Changes from v6:
- Additional patch added for cleanup of other areas of mach-bcm/Kconfig discovered during Cygnus submission review to:
- removed one level of menu for ARCH_BCM_MOBILE in mach-bcm-Kconfig based on feedback from Arnd
- added comment sections to Kconfig to identify SoC architecture groupings

Changes from v5:
- removed one level of menu used in mach-bcm/Kconfig
- changed MAINTAINERS to use N: to support all files associated with iproc and cygnus going forward
- updated bcm_cygnus_defconfig to remove some DEBUG options that greatly hamper performance

Changes from v4:
- simple clock tree used. reworked clock driver will be submitted later
- fixed MAINTAINERS patchset error
- removed DEBUG_UART_8250 Kconfig.debug legacy support
- made ARCH_BCM_IPROC a silent Kconfig option
- removed multi_v7_defconfig as it is not needed at this time, can support in future patchset but does not seem optimal configs for our current usage.

Changes from v3:
- restart functionality removed. Will be added in a different patchset in drivers/power
- removed NEON init sequence. Will be moved to bootloader
- cleaned up Kconfigs for ARCH_BCM_CYGNUS by removing unnecessary selects
- consolidated ARCH_BCM_IPROC with select from ARCH_BCM_CYGNUS and ARCH_BCM5301X
- removed bcm911360_entphn binding
- added documentation for SoCs currently supported in Cygnus family

Changes from v2:
- rebased to 3.17 kernel

Changes from v1:
- Address code review comments as per previous responses.
- Copyright headers updated to remove Broadcom URL.
- mach platform code still contains hard coded addresses. These address are the same for all Cygnus variants. Could you please provide guidance on where they should go if you would still like them changed. There does not seem to be a reason to change them to device tree as they do not change.

Jonathan Richardson (3):
ARM: cygnus: Initial support for Broadcom Cygnus SoC
dt-bindings: Document Broadcom Cygnus SoC and clocks
ARM: cygnus defconfig : Initial defconfig for Broadcom Cygnus SoC

Ray Jui (1):
ARM: multi_v7_defconfig: Enable Broadcom Cygnus

Scott Branden (4):
ARM: dts: Enable Broadcom Cygnus SoC
MAINTAINERS: Entry for Cygnus/iproc arm architecture
ARM: mach-bcm: Consolidate currently supported IPROC SoCs
ARM: mach-bcm: ARCH_BCM_MOBILE: remove one level of menu from Kconfig

 .../devicetree/bindings/arm/bcm/cygnus.txt         |   31 +++
 .../devicetree/bindings/clock/bcm-cygnus-clock.txt |   34 +++
 MAINTAINERS                                        |   14 ++
 arch/arm/boot/dts/Makefile                         |    4 +
 arch/arm/boot/dts/bcm-cygnus-clock.dtsi            |   73 ++++++
 arch/arm/boot/dts/bcm-cygnus.dtsi                  |  100 +++++++++
 arch/arm/boot/dts/bcm911360_entphn.dts             |   32 +++
 arch/arm/boot/dts/bcm911360k.dts                   |   32 +++
 arch/arm/boot/dts/bcm958300k.dts                   |   32 +++
 arch/arm/configs/bcm_cygnus_defconfig              |  237 ++++++++++++++++++++
 arch/arm/configs/bcm_defconfig                     |    3 +-
 arch/arm/configs/multi_v7_defconfig                |    4 +-
 arch/arm/mach-bcm/Kconfig                          |   93 +++++---
 arch/arm/mach-bcm/Makefile                         |    3 +
 arch/arm/mach-bcm/bcm_cygnus.c                     |   26 +++
 15 files changed, 680 insertions(+), 38 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/arm/bcm/cygnus.txt
 create mode 100644 Documentation/devicetree/bindings/clock/bcm-cygnus-clock.txt
 create mode 100644 arch/arm/boot/dts/bcm-cygnus-clock.dtsi
 create mode 100644 arch/arm/boot/dts/bcm-cygnus.dtsi
 create mode 100644 arch/arm/boot/dts/bcm911360_entphn.dts
 create mode 100644 arch/arm/boot/dts/bcm911360k.dts
 create mode 100644 arch/arm/boot/dts/bcm958300k.dts
 create mode 100644 arch/arm/configs/bcm_cygnus_defconfig
 create mode 100644 arch/arm/mach-bcm/bcm_cygnus.c
Signature · 1 line
1.7.9.5
author maintainer
#81 lore raw

PATCH v8 1/8 ARM: cygnus: Initial support for Broadcom Cygnus SoC

From: Jonathan Richardson <[email protected]>

Adds initial support for the Cygnus SoC based on Broadcom?s iProc series.

---
 arch/arm/mach-bcm/Kconfig      |   32 ++++++++++++++++++++++++++++++++
 arch/arm/mach-bcm/Makefile     |    3 +++
 arch/arm/mach-bcm/bcm_cygnus.c |   26 ++++++++++++++++++++++++++
 3 files changed, 61 insertions(+)
 create mode 100644 arch/arm/mach-bcm/bcm_cygnus.c
arch/arm/mach-bcm/Kconfig +32 -0
index 2abad74..73d95c2 100644
@@ -5,6 +5,36 @@ menuconfig ARCH_BCM
 
 if ARCH_BCM
 
+comment "IPROC architected SoCs"
+
+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.
+
 config ARCH_BCM_MOBILE
 	bool "Broadcom Mobile SoC Support" if ARCH_MULTI_V7
 	select ARCH_REQUIRE_GPIOLIB
@@ -65,6 +95,8 @@ endmenu
 
 endif
 
+comment "Other Architectures"
+
 config ARCH_BCM2835
 	bool "Broadcom BCM2835 family" if ARCH_MULTI_V6
 	select ARCH_REQUIRE_GPIOLIB
arch/arm/mach-bcm/Makefile +3 -0
index 300ae4b..34d45ba 100644
@@ -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
 
arch/arm/mach-bcm/bcm_cygnus.c new file +26 -0
new file mode 100644
index 0000000..41b4933
@@ -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
Signature · 1 line
1.7.9.5
author maintainer
#82 lore raw

PATCH v8 2/8 dt-bindings: Document Broadcom Cygnus SoC and clocks

In reply to Scott Branden

From: Jonathan Richardson <[email protected]>

---
 .../devicetree/bindings/arm/bcm/cygnus.txt         |   31 ++++++++++++++++++
 .../devicetree/bindings/clock/bcm-cygnus-clock.txt |   34 ++++++++++++++++++++
 2 files changed, 65 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/arm/bcm/cygnus.txt
 create mode 100644 Documentation/devicetree/bindings/clock/bcm-cygnus-clock.txt
Documentation/devicetree/bindings/arm/bcm/cygnus.txt new file +31 -0
new file mode 100644
index 0000000..4c77169
@@ -0,0 +1,31 @@
+Broadcom Cygnus device tree bindings
+------------------------------------
+
+
+Boards with Cygnus SoCs shall have the following properties:
+
+Required root node property:
+
+BCM11300
+compatible = "brcm,bcm11300", "brcm,cygnus";
+
+BCM11320
+compatible = "brcm,bcm11320", "brcm,cygnus";
+
+BCM11350
+compatible = "brcm,bcm11350", "brcm,cygnus";
+
+BCM11360
+compatible = "brcm,bcm11360", "brcm,cygnus";
+
+BCM58300
+compatible = "brcm,bcm58300", "brcm,cygnus";
+
+BCM58302
+compatible = "brcm,bcm58302", "brcm,cygnus";
+
+BCM58303
+compatible = "brcm,bcm58303", "brcm,cygnus";
+
+BCM58305
+compatible = "brcm,bcm58305", "brcm,cygnus";
Documentation/devicetree/bindings/clock/bcm-cygnus-clock.txt new file +34 -0
new file mode 100644
index 0000000..00d26ed
@@ -0,0 +1,34 @@
+Broadcom Cygnus Clocks
+
+This binding uses the common clock binding:
+Documentation/devicetree/bindings/clock/clock-bindings.txt
+
+Currently various "fixed" clocks are declared for peripheral drivers that use
+the common clock framework to reference their core clocks. Proper support of
+these clocks will be added later
+
+Device tree example:
+
+	clocks {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges;
+
+		osc: oscillator {
+			compatible = "fixed-clock";
+			#clock-cells = <1>;
+			clock-frequency = <25000000>;
+		};
+
+		apb_clk: apb_clk {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+			clock-frequency = <1000000000>;
+		};
+
+		periph_clk: periph_clk {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+			clock-frequency = <500000000>;
+		};
+	};
Signature · 1 line
1.7.9.5
author maintainer
#83 lore raw

PATCH v8 3/8 ARM: cygnus defconfig : Initial defconfig for Broadcom Cygnus SoC

In reply to Scott Branden

From: Jonathan Richardson <[email protected]>

This defconfig is utilized so a customer or developer can understand what kernel drivers are utilized by the Cygnus SoC. It also enables debug configs which should be disabled if optimal performance is desired.

---
 arch/arm/configs/bcm_cygnus_defconfig |  237 +++++++++++++++++++++++++++++++++
 1 file changed, 237 insertions(+)
 create mode 100644 arch/arm/configs/bcm_cygnus_defconfig
arch/arm/configs/bcm_cygnus_defconfig new file +237 -0
new file mode 100644
index 0000000..9ad77a8
@@ -0,0 +1,237 @@
+CONFIG_KERNEL_XZ=y
+# CONFIG_SWAP is not set
+CONFIG_SYSVIPC=y
+CONFIG_FHANDLE=y
+CONFIG_IRQ_DOMAIN_DEBUG=y
+CONFIG_NO_HZ_IDLE=y
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_BSD_PROCESS_ACCT=y
+CONFIG_BSD_PROCESS_ACCT_V3=y
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_LOG_BUF_SHIFT=19
+CONFIG_CGROUPS=y
+CONFIG_CGROUP_FREEZER=y
+CONFIG_CGROUP_DEVICE=y
+CONFIG_CGROUP_CPUACCT=y
+CONFIG_RESOURCE_COUNTERS=y
+CONFIG_CGROUP_SCHED=y
+CONFIG_BLK_CGROUP=y
+CONFIG_NAMESPACES=y
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_EMBEDDED=y
+CONFIG_PERF_EVENTS=y
+# CONFIG_COMPAT_BRK is not set
+CONFIG_JUMP_LABEL=y
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_BLK_DEV_BSG is not set
+CONFIG_PARTITION_ADVANCED=y
+CONFIG_ARCH_BCM=y
+CONFIG_ARCH_BCM_CYGNUS=y
+CONFIG_ARM_THUMBEE=y
+CONFIG_PCI=y
+CONFIG_PCI_DEBUG=y
+CONFIG_PREEMPT=y
+CONFIG_AEABI=y
+CONFIG_HIGHMEM=y
+# CONFIG_COMPACTION is not set
+# CONFIG_ATAGS is not set
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_ARM_APPENDED_DTB=y
+CONFIG_CPU_IDLE=y
+CONFIG_VFP=y
+CONFIG_NEON=y
+# CONFIG_SUSPEND is not set
+CONFIG_NET=y
+CONFIG_PACKET=y
+CONFIG_UNIX=y
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+CONFIG_IP_ADVANCED_ROUTER=y
+CONFIG_IP_MULTIPLE_TABLES=y
+CONFIG_IP_ROUTE_MULTIPATH=y
+CONFIG_IP_ROUTE_VERBOSE=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_MROUTE=y
+CONFIG_IP_MROUTE_MULTIPLE_TABLES=y
+CONFIG_SYN_COOKIES=y
+# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
+# CONFIG_INET_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_BEET is not set
+# CONFIG_INET_LRO is not set
+# CONFIG_INET_DIAG is not set
+CONFIG_TCP_CONG_ADVANCED=y
+# CONFIG_TCP_CONG_BIC is not set
+# CONFIG_TCP_CONG_WESTWOOD is not set
+# CONFIG_TCP_CONG_HTCP is not set
+CONFIG_IPV6=y
+# CONFIG_INET6_XFRM_MODE_TRANSPORT is not set
+# CONFIG_INET6_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET6_XFRM_MODE_BEET is not set
+# CONFIG_IPV6_SIT is not set
+CONFIG_IPV6_MULTIPLE_TABLES=y
+CONFIG_IPV6_SUBTREES=y
+CONFIG_IPV6_MROUTE=y
+CONFIG_NETFILTER=y
+# CONFIG_BRIDGE_NETFILTER is not set
+CONFIG_NF_CONNTRACK=y
+# CONFIG_NF_CONNTRACK_PROCFS is not set
+CONFIG_NF_CONNTRACK_FTP=y
+CONFIG_NF_CONNTRACK_IPV4=y
+CONFIG_IP_NF_IPTABLES=y
+CONFIG_IP_NF_FILTER=y
+CONFIG_IP_NF_TARGET_REJECT=y
+CONFIG_IP_NF_NAT=y
+CONFIG_IP_NF_TARGET_MASQUERADE=y
+CONFIG_IP_NF_TARGET_REDIRECT=y
+CONFIG_IP_NF_MANGLE=y
+CONFIG_IP_NF_RAW=y
+CONFIG_NF_CONNTRACK_IPV6=y
+CONFIG_IP6_NF_IPTABLES=y
+CONFIG_IP6_NF_MATCH_AH=y
+CONFIG_IP6_NF_MATCH_EUI64=y
+CONFIG_IP6_NF_MATCH_FRAG=y
+CONFIG_IP6_NF_MATCH_OPTS=y
+CONFIG_IP6_NF_MATCH_IPV6HEADER=y
+CONFIG_IP6_NF_MATCH_MH=y
+CONFIG_IP6_NF_MATCH_RT=y
+CONFIG_IP6_NF_FILTER=y
+CONFIG_IP6_NF_TARGET_REJECT=y
+CONFIG_IP6_NF_MANGLE=y
+CONFIG_IP6_NF_RAW=y
+CONFIG_BRIDGE=y
+# CONFIG_BRIDGE_IGMP_SNOOPING is not set
+CONFIG_VLAN_8021Q=y
+CONFIG_NET_SCHED=y
+CONFIG_NET_SCH_FQ_CODEL=y
+CONFIG_CFG80211=y
+# CONFIG_CFG80211_DEFAULT_PS is not set
+CONFIG_CFG80211_WEXT=y
+CONFIG_RFKILL=y
+CONFIG_DEVTMPFS=y
+CONFIG_DEVTMPFS_MOUNT=y
+# CONFIG_FIRMWARE_IN_KERNEL is not set
+CONFIG_MTD=y
+CONFIG_MTD_CMDLINE_PARTS=y
+CONFIG_MTD_BLOCK=y
+CONFIG_MTD_NAND=y
+CONFIG_MTD_UBI=y
+CONFIG_BLK_DEV_LOOP=y
+CONFIG_SCSI=y
+CONFIG_BLK_DEV_SD=y
+CONFIG_BLK_DEV_SR=y
+CONFIG_NETDEVICES=y
+# CONFIG_NET_CADENCE is not set
+# CONFIG_NET_VENDOR_CIRRUS is not set
+# CONFIG_NET_VENDOR_FARADAY is not set
+# CONFIG_NET_VENDOR_INTEL is not set
+# CONFIG_NET_VENDOR_MARVELL is not set
+# CONFIG_NET_VENDOR_MICREL is not set
+# CONFIG_NET_VENDOR_NATSEMI is not set
+# CONFIG_NET_VENDOR_SEEQ is not set
+# CONFIG_NET_VENDOR_SMSC is not set
+# CONFIG_NET_VENDOR_STMICRO is not set
+# CONFIG_NET_VENDOR_WIZNET is not set
+CONFIG_PHYLIB=y
+CONFIG_BROADCOM_PHY=y
+# CONFIG_INPUT_MOUSEDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_KEYBOARD_ATKBD is not set
+# CONFIG_INPUT_MOUSE is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+# CONFIG_SERIO is not set
+# CONFIG_LEGACY_PTYS is not set
+CONFIG_SERIAL_8250=y
+# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_8250_NR_UARTS=2
+CONFIG_SERIAL_8250_RUNTIME_UARTS=2
+CONFIG_SERIAL_8250_DW=y
+CONFIG_SERIAL_OF_PLATFORM=y
+# CONFIG_HW_RANDOM is not set
+CONFIG_I2C_CHARDEV=y
+# CONFIG_I2C_HELPER_AUTO is not set
+CONFIG_I2C_SMBUS=y
+CONFIG_SPI=y
+CONFIG_SPI_PL022=y
+CONFIG_SPI_SPIDEV=y
+CONFIG_GPIO_SYSFS=y
+# CONFIG_HWMON is not set
+CONFIG_WATCHDOG=y
+CONFIG_ARM_SP805_WATCHDOG=y
+CONFIG_MEDIA_SUPPORT=y
+CONFIG_MEDIA_CAMERA_SUPPORT=y
+CONFIG_MEDIA_USB_SUPPORT=y
+CONFIG_USB_VIDEO_CLASS=y
+# CONFIG_USB_GSPCA is not set
+CONFIG_FB=y
+CONFIG_FB_ARMCLCD=y
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+# CONFIG_LCD_CLASS_DEVICE is not set
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+# CONFIG_BACKLIGHT_GENERIC is not set
+CONFIG_BACKLIGHT_PWM=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_SOUND=y
+CONFIG_SND=y
+CONFIG_SND_DYNAMIC_MINORS=y
+CONFIG_SND_VERBOSE_PRINTK=y
+CONFIG_SND_DEBUG=y
+CONFIG_SND_USB_AUDIO=y
+CONFIG_SND_SOC=y
+CONFIG_USB=y
+CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_EHCI_ROOT_HUB_TT=y
+CONFIG_USB_EHCI_HCD_PLATFORM=y
+CONFIG_USB_OHCI_HCD=y
+CONFIG_USB_OHCI_HCD_PLATFORM=y
+CONFIG_USB_STORAGE=y
+CONFIG_MMC=y
+CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_PLTFM=y
+CONFIG_MMC_SDHCI_OF_ARASAN=y
+CONFIG_RTC_CLASS=y
+CONFIG_PWM=y
+CONFIG_EXT4_FS=y
+CONFIG_AUTOFS4_FS=y
+CONFIG_MSDOS_FS=y
+CONFIG_VFAT_FS=y
+CONFIG_NTFS_FS=y
+CONFIG_TMPFS=y
+CONFIG_TMPFS_POSIX_ACL=y
+CONFIG_UBIFS_FS=y
+CONFIG_NFS_FS=y
+CONFIG_ROOT_NFS=y
+CONFIG_NLS_CODEPAGE_437=y
+CONFIG_NLS_ISO8859_1=y
+CONFIG_NLS_UTF8=y
+CONFIG_PRINTK_TIME=y
+CONFIG_DYNAMIC_DEBUG=y
+CONFIG_DEBUG_INFO=y
+CONFIG_STRIP_ASM_SYMS=y
+CONFIG_DEBUG_FS=y
+CONFIG_MAGIC_SYSRQ=y
+CONFIG_DEBUG_OBJECTS=y
+CONFIG_DEBUG_OBJECTS_RCU_HEAD=y
+CONFIG_DEBUG_MEMORY_INIT=y
+CONFIG_DEBUG_SHIRQ=y
+CONFIG_DETECT_HUNG_TASK=y
+CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=110
+CONFIG_BOOTPARAM_HUNG_TASK_PANIC=y
+# CONFIG_SCHED_DEBUG is not set
+CONFIG_SCHEDSTATS=y
+# CONFIG_DEBUG_PREEMPT is not set
+CONFIG_DEBUG_RT_MUTEXES=y
+CONFIG_DEBUG_ATOMIC_SLEEP=y
+CONFIG_DEBUG_USER=y
+CONFIG_DEBUG_LL=y
+CONFIG_DEBUG_LL_UART_8250=y
+CONFIG_DEBUG_UART_PHYS=0x18023000
+CONFIG_DEBUG_UART_VIRT=0xf1023000
+CONFIG_EARLY_PRINTK=y
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
Signature · 1 line
1.7.9.5
author maintainer
#84 lore raw

PATCH v8 4/8 ARM: dts: Enable Broadcom Cygnus SoC

In reply to Scott Branden

DT files to enable cygnus consisting on reference designs and cygnus core configuration.

---
 arch/arm/boot/dts/Makefile              |    4 ++
 arch/arm/boot/dts/bcm-cygnus-clock.dtsi |   73 ++++++++++++++++++++++
 arch/arm/boot/dts/bcm-cygnus.dtsi       |  100 +++++++++++++++++++++++++++++++
 arch/arm/boot/dts/bcm911360_entphn.dts  |   32 ++++++++++
 arch/arm/boot/dts/bcm911360k.dts        |   32 ++++++++++
 arch/arm/boot/dts/bcm958300k.dts        |   32 ++++++++++
 6 files changed, 273 insertions(+)
 create mode 100644 arch/arm/boot/dts/bcm-cygnus-clock.dtsi
 create mode 100644 arch/arm/boot/dts/bcm-cygnus.dtsi
 create mode 100644 arch/arm/boot/dts/bcm911360_entphn.dts
 create mode 100644 arch/arm/boot/dts/bcm911360k.dts
 create mode 100644 arch/arm/boot/dts/bcm958300k.dts
arch/arm/boot/dts/Makefile +4 -0
index 38c89ca..4b3a590 100644
@@ -54,6 +54,10 @@ dtb-$(CONFIG_ARCH_AT91)	+= at91-sama5d4ek.dtb
 dtb-$(CONFIG_ARCH_ATLAS6) += atlas6-evb.dtb
 dtb-$(CONFIG_ARCH_AXXIA) += axm5516-amarillo.dtb
 dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b.dtb
+dtb-$(CONFIG_ARCH_BCM_CYGNUS) += \
+	bcm911360_entphn.dtb \
+	bcm911360k.dtb \
+	bcm958300k.dtb
 dtb-$(CONFIG_ARCH_BCM_5301X) += bcm4708-netgear-r6250.dtb
 dtb-$(CONFIG_ARCH_BCM_63XX) += bcm963138dvt.dtb
 dtb-$(CONFIG_ARCH_BCM_MOBILE) += bcm28155-ap.dtb \
arch/arm/boot/dts/bcm-cygnus-clock.dtsi new file +73 -0

73 lines not on this page · raw message

arch/arm/boot/dts/bcm-cygnus.dtsi new file +100 -0

100 lines not on this page · raw message

arch/arm/boot/dts/bcm911360_entphn.dts new file +32 -0
new file mode 100644
index 0000000..9de5e87
@@ -0,0 +1,32 @@
+/*
+ * 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.
+ */
+
+/dts-v1/;
+
+#include "bcm-cygnus.dtsi"
+
+/ {
+	model = "Cygnus Enterprise Phone (BCM911360_ENTPHN)";
+	compatible = "brcm,bcm11360", "brcm,cygnus";
+
+	aliases {
+		serial0 = &uart3;
+		serial1 = &uart0;
+	};
+
+	chosen {
+		stdout-path = &uart3;
+		bootargs = "console=ttyS0,115200";
+	};
+};
arch/arm/boot/dts/bcm911360k.dts new file +32 -0
new file mode 100644
index 0000000..dd4f102
@@ -0,0 +1,32 @@
+/*
+ * 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.
+ */
+
+/dts-v1/;
+
+#include "bcm-cygnus.dtsi"
+
+/ {
+	model = "Cygnus SVK (BCM911360K)";
+	compatible = "brcm,bcm11360", "brcm,cygnus";
+
+	aliases {
+		serial0 = &uart3;
+		serial1 = &uart0;
+	};
+
+	chosen {
+		stdout-path = &uart3;
+		bootargs = "console=ttyS0,115200";
+	};
+};
arch/arm/boot/dts/bcm958300k.dts new file +32 -0
new file mode 100644
index 0000000..f8b9625
@@ -0,0 +1,32 @@
+/*
+ * 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.
+ */
+
+/dts-v1/;
+
+#include "bcm-cygnus.dtsi"
+
+/ {
+	model = "Cygnus SVK (BCM958300K)";
+	compatible = "brcm,bcm58300", "brcm,cygnus";
+
+	aliases {
+		serial0 = &uart3;
+		serial1 = &uart0;
+	};
+
+	chosen {
+		stdout-path = &uart3;
+		bootargs = "console=ttyS0,115200";
+	};
+};
Signature · 1 line
1.7.9.5
#85 lore raw

Re: [PATCH v8 4/8] ARM: dts: Enable Broadcom Cygnus SoC

Hi,

A bunch of small comments below, should be quick to fix.

Quoted 27 lines · Scott Branden

DT files to enable cygnus consisting on reference designs and cygnus core configuration.

---
 arch/arm/boot/dts/Makefile              |    4 ++
 arch/arm/boot/dts/bcm-cygnus-clock.dtsi |   73 ++++++++++++++++++++++
 arch/arm/boot/dts/bcm-cygnus.dtsi       |  100 +++++++++++++++++++++++++++++++
 arch/arm/boot/dts/bcm911360_entphn.dts  |   32 ++++++++++
 arch/arm/boot/dts/bcm911360k.dts        |   32 ++++++++++
 arch/arm/boot/dts/bcm958300k.dts        |   32 ++++++++++
 6 files changed, 273 insertions(+)
 create mode 100644 arch/arm/boot/dts/bcm-cygnus-clock.dtsi
 create mode 100644 arch/arm/boot/dts/bcm-cygnus.dtsi
 create mode 100644 arch/arm/boot/dts/bcm911360_entphn.dts
 create mode 100644 arch/arm/boot/dts/bcm911360k.dts
 create mode 100644 arch/arm/boot/dts/bcm958300k.dts
arch/arm/boot/dts/Makefile +0 -0
index 38c89ca..4b3a590 100644

arch/arm/boot/dts/Makefile dtb-$(CONFIG_ARCH_AT91) += at91-sama5d4ek.dtb · line 63

Quoted 10 lines
arch/arm/boot/dts/Makefile +4 -0
@@ -54,6 +54,10 @@ dtb-$(CONFIG_ARCH_AT91)      += at91-sama5d4ek.dtb
 dtb-$(CONFIG_ARCH_ATLAS6) += atlas6-evb.dtb
 dtb-$(CONFIG_ARCH_AXXIA) += axm5516-amarillo.dtb
 dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b.dtb
+dtb-$(CONFIG_ARCH_BCM_CYGNUS) += \
+       bcm911360_entphn.dtb \
+       bcm911360k.dtb \
+       bcm958300k.dtb
 dtb-$(CONFIG_ARCH_BCM_5301X) += bcm4708-netgear-r6250.dtb
 dtb-$(CONFIG_ARCH_BCM_63XX) += bcm963138dvt.dtb
 dtb-$(CONFIG_ARCH_BCM_MOBILE) += bcm28155-ap.dtb \

Please add new entries in alphabetical/alphanumerical order. Also, first entry is commonly added on the first line

Quoted 8 lines
arch/arm/boot/dts/bcm-cygnus-clock.dtsi new file +2 -0
new file mode 100644
index 0000000..d06172b
@@ -0,0 +1,73 @@
+/*
+ * Copyright 2014 Broadcom Corporation.  All rights reserved.

arch/arm/boot/dts/bcm-cygnus-clock.dtsi line 12

Quoted 10 lines
arch/arm/boot/dts/bcm-cygnus-clock.dtsi new file +10 -0
+ *
+ * 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.

We ask for new DT contents to be added with dual BSD/GPL license, to allow for reuse of the DT data structures in other projects as well. There's currently a lot of activity going on relicensing the current files so I recommend sorting it out before they are added if you can.

Quoted 120 lines
arch/arm/boot/dts/bcm-cygnus-clock.dtsi new file +61 -0
+ */
+
+clocks {
+       #address-cells = <1>;
+       #size-cells = <1>;
+       ranges;
+
+       osc: oscillator {
+               compatible = "fixed-clock";
+               #clock-cells = <1>;
+               clock-frequency = <25000000>;
+       };
+
+       apb_clk: apb_clk {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <1000000000>;
+       };
+
+       periph_clk: periph_clk {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <500000000>;
+       };
+
+       sdio_clk: lcpll_ch2 {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <200000000>;
+       };
+
+       axi81_clk: axi81_clk {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <100000000>;
+       };
+
+       keypad_clk: keypad_clk {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <31806>;
+       };
+
+       adc_clk: adc_clk {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <1562500>;
+       };
+
+       pwm_clk: pwm_clk {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <1000000>;
+       };
+
+       lcd_clk: mipipll_ch1 {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <100000000>;
+       };
+};
arch/arm/boot/dts/bcm-cygnus.dtsi new file +53 -0
new file mode 100644
index 0000000..9c650ab
@@ -0,0 +1,100 @@
+/*
+ * 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 <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+
+#include "skeleton.dtsi"
+
+/ {
+       compatible = "brcm,cygnus";
+       model = "Broadcom Cygnus SoC";
+       interrupt-parent = <&gic>;
+
+       cpus {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               cpu at 0 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a9";
+                       next-level-cache = <&L2>;
+                       reg = <0x0>;
+               };
+       };
+
+       /include/ "bcm-cygnus-clock.dtsi"
+
+       amba {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               compatible = "arm,amba-bus", "simple-bus";
+               interrupt-parent = <&gic>;
+               ranges;
+
+               wdt at 18009000 {
+                        compatible = "arm,sp805" , "arm,primecell";
+                        reg = <0x18009000 0x1000>;
+                        interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>;
+                        clocks = <&axi81_clk>;
+                        clock-names = "apb_pclk";
+               };
+       };

arch/arm/boot/dts/bcm-cygnus.dtsi line 63

Quoted 10 lines
arch/arm/boot/dts/bcm-cygnus.dtsi new file +10 -0
+
+       uart3: serial at 18023000 {
+               compatible = "snps,dw-apb-uart";
+               reg = <0x18023000 0x100>;
+               reg-shift = <2>;
+               reg-io-width = <4>;
+               interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>;
+               clock-frequency = <100000000>;
+               clocks = <&axi81_clk>;
+               status = "okay";

It is common to leave these disabled in the SoC/common dtsi, and enable them in the per-board dts files, since different boards might not use all peripherals, etc.

It seems like all your boards currently use both uarts, but if it changes in the future please consider switching over. It might be worth doing so now to avoid churn later on. That also allows you to define all the uards (I'm going to guess that there's a total of at least 4 on this system :).

arch/arm/boot/dts/bcm-cygnus.dtsi line 66

Quoted 3 lines
arch/arm/boot/dts/bcm-cygnus.dtsi new file +3 -0
+       };
+
+       uart0: serial at 18020000 {

These are also out of order, uart3 is before uart0 (and the registers are in reverse order).

We normally recommend that you add entries sorted by reg/unit address -- that way there's less risk of conflict due to add/add compared to if people just append new entries at the end of the file.

Quoted 10 lines
arch/arm/boot/dts/bcm-cygnus.dtsi new file +10 -0
+               compatible = "snps,dw-apb-uart";
+               reg = <0x18020000 0x100>;
+               reg-shift = <2>;
+               reg-io-width = <4>;
+               interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&axi81_clk>;
+               clock-frequency = <100000000>;
+               status = "okay";
+       };
+

arch/arm/boot/dts/bcm-cygnus.dtsi line 86

Quoted 10 lines
arch/arm/boot/dts/bcm-cygnus.dtsi new file +10 -0
+       gic: interrupt-controller at 19021000 {
+               compatible = "arm,cortex-a9-gic";
+               #interrupt-cells = <3>;
+               #address-cells = <0>;
+               interrupt-controller;
+               reg = <0x19021000 0x1000>,
+                     <0x19020100 0x100>;
+       };
+
+       L2: l2-cache {

l2-cache at 19022000

Quoted 136 lines
arch/arm/boot/dts/bcm-cygnus.dtsi new file +14 -0
+               compatible = "arm,pl310-cache";
+               reg = <0x19022000 0x1000>;
+               cache-unified;
+               cache-level = <2>;
+       };
+
+       timer at 19020200 {
+               compatible = "arm,cortex-a9-global-timer";
+               reg = <0x19020200 0x100>;
+               interrupts = <GIC_PPI 11 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&periph_clk>;
+       };
+
+};
arch/arm/boot/dts/bcm911360_entphn.dts new file +32 -0
new file mode 100644
index 0000000..9de5e87
@@ -0,0 +1,32 @@
+/*
+ * 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.
+ */
+
+/dts-v1/;
+
+#include "bcm-cygnus.dtsi"
+
+/ {
+       model = "Cygnus Enterprise Phone (BCM911360_ENTPHN)";
+       compatible = "brcm,bcm11360", "brcm,cygnus";
+
+       aliases {
+               serial0 = &uart3;
+               serial1 = &uart0;
+       };
+
+       chosen {
+               stdout-path = &uart3;
+               bootargs = "console=ttyS0,115200";
+       };
+};
arch/arm/boot/dts/bcm911360k.dts new file +32 -0
new file mode 100644
index 0000000..dd4f102
@@ -0,0 +1,32 @@
+/*
+ * 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.
+ */
+
+/dts-v1/;
+
+#include "bcm-cygnus.dtsi"
+
+/ {
+       model = "Cygnus SVK (BCM911360K)";
+       compatible = "brcm,bcm11360", "brcm,cygnus";
+
+       aliases {
+               serial0 = &uart3;
+               serial1 = &uart0;
+       };
+
+       chosen {
+               stdout-path = &uart3;
+               bootargs = "console=ttyS0,115200";
+       };
+};
arch/arm/boot/dts/bcm958300k.dts new file +32 -1
new file mode 100644
index 0000000..f8b9625
@@ -0,0 +1,32 @@
+/*
+ * 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.
+ */
+
+/dts-v1/;
+
+#include "bcm-cygnus.dtsi"
+
+/ {
+       model = "Cygnus SVK (BCM958300K)";
+       compatible = "brcm,bcm58300", "brcm,cygnus";
+
+       aliases {
+               serial0 = &uart3;
+               serial1 = &uart0;
+       };
+
+       chosen {
+               stdout-path = &uart3;
+               bootargs = "console=ttyS0,115200";
+       };
+};
--

1.7.9.5

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

author maintainer
#86 lore raw

Re: [PATCH v8 4/8] ARM: dts: Enable Broadcom Cygnus SoC

Quoted 62 lines · Olof Johansson

Hi,

A bunch of small comments below, should be quick to fix.

Quoted 27 lines · Scott Branden

DT files to enable cygnus consisting on reference designs and cygnus core configuration.

---
  arch/arm/boot/dts/Makefile              |    4 ++
  arch/arm/boot/dts/bcm-cygnus-clock.dtsi |   73 ++++++++++++++++++++++
  arch/arm/boot/dts/bcm-cygnus.dtsi       |  100 +++++++++++++++++++++++++++++++
  arch/arm/boot/dts/bcm911360_entphn.dts  |   32 ++++++++++
  arch/arm/boot/dts/bcm911360k.dts        |   32 ++++++++++
  arch/arm/boot/dts/bcm958300k.dts        |   32 ++++++++++
  6 files changed, 273 insertions(+)

create mode 100644 arch/arm/boot/dts/bcm-cygnus-clock.dtsi create mode 100644 arch/arm/boot/dts/bcm-cygnus.dtsi create mode 100644 arch/arm/boot/dts/bcm911360_entphn.dts create mode 100644 arch/arm/boot/dts/bcm911360k.dts create mode 100644 arch/arm/boot/dts/bcm958300k.dts

arch/arm/boot/dts/Makefile +0 -0
index 38c89ca..4b3a590 100644

arch/arm/boot/dts/Makefile dtb-$(CONFIG_ARCH_AT91) += at91-sama5d4ek.dtb · line 63

Quoted 10 lines
arch/arm/boot/dts/Makefile +4 -0
@@ -54,6 +54,10 @@ dtb-$(CONFIG_ARCH_AT91)      += at91-sama5d4ek.dtb
  dtb-$(CONFIG_ARCH_ATLAS6) += atlas6-evb.dtb
  dtb-$(CONFIG_ARCH_AXXIA) += axm5516-amarillo.dtb
  dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b.dtb
+dtb-$(CONFIG_ARCH_BCM_CYGNUS) += \
+       bcm911360_entphn.dtb \
+       bcm911360k.dtb \
+       bcm958300k.dtb
  dtb-$(CONFIG_ARCH_BCM_5301X) += bcm4708-netgear-r6250.dtb
  dtb-$(CONFIG_ARCH_BCM_63XX) += bcm963138dvt.dtb
  dtb-$(CONFIG_ARCH_BCM_MOBILE) += bcm28155-ap.dtb \

Please add new entries in alphabetical/alphanumerical order. Also, first entry is commonly added on the first line

Quoted 15 lines
arch/arm/boot/dts/bcm-cygnus-clock.dtsi new file +9 -0
new file mode 100644
index 0000000..d06172b
@@ -0,0 +1,73 @@
+/*
+ * 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
Quoted 8 lines

arch/arm/boot/dts/bcm-cygnus-clock.dtsi line 12

Quoted 3 lines
arch/arm/boot/dts/bcm-cygnus-clock.dtsi new file +3 -0
+ * 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.

We ask for new DT contents to be added with dual BSD/GPL license, to allow for reuse of the DT data structures in other projects as well. There's currently a lot of activity going on relicensing the current files so I recommend sorting it out before they are added if you can.

This may take more time than you think. I am going to have to go through legal to get such a license created. Also, why would you need dual license? If it is BSD that should serve both purposes?

Quoted 312 lines
Quoted 121 lines
arch/arm/boot/dts/bcm-cygnus-clock.dtsi new file +61 -0
+ */
+
+clocks {
+       #address-cells = <1>;
+       #size-cells = <1>;
+       ranges;
+
+       osc: oscillator {
+               compatible = "fixed-clock";
+               #clock-cells = <1>;
+               clock-frequency = <25000000>;
+       };
+
+       apb_clk: apb_clk {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <1000000000>;
+       };
+
+       periph_clk: periph_clk {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <500000000>;
+       };
+
+       sdio_clk: lcpll_ch2 {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <200000000>;
+       };
+
+       axi81_clk: axi81_clk {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <100000000>;
+       };
+
+       keypad_clk: keypad_clk {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <31806>;
+       };
+
+       adc_clk: adc_clk {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <1562500>;
+       };
+
+       pwm_clk: pwm_clk {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <1000000>;
+       };
+
+       lcd_clk: mipipll_ch1 {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <100000000>;
+       };
+};
arch/arm/boot/dts/bcm-cygnus.dtsi new file +53 -0
new file mode 100644
index 0000000..9c650ab
@@ -0,0 +1,100 @@
+/*
+ * 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 <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+
+#include "skeleton.dtsi"
+
+/ {
+       compatible = "brcm,cygnus";
+       model = "Broadcom Cygnus SoC";
+       interrupt-parent = <&gic>;
+
+       cpus {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               cpu at 0 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a9";
+                       next-level-cache = <&L2>;
+                       reg = <0x0>;
+               };
+       };
+
+       /include/ "bcm-cygnus-clock.dtsi"
+
+       amba {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               compatible = "arm,amba-bus", "simple-bus";
+               interrupt-parent = <&gic>;
+               ranges;
+
+               wdt at 18009000 {
+                        compatible = "arm,sp805" , "arm,primecell";
+                        reg = <0x18009000 0x1000>;
+                        interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>;
+                        clocks = <&axi81_clk>;
+                        clock-names = "apb_pclk";
+               };
+       };

arch/arm/boot/dts/bcm-cygnus.dtsi line 63

Quoted 10 lines
arch/arm/boot/dts/bcm-cygnus.dtsi new file +10 -0
+
+       uart3: serial at 18023000 {
+               compatible = "snps,dw-apb-uart";
+               reg = <0x18023000 0x100>;
+               reg-shift = <2>;
+               reg-io-width = <4>;
+               interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>;
+               clock-frequency = <100000000>;
+               clocks = <&axi81_clk>;
+               status = "okay";

It is common to leave these disabled in the SoC/common dtsi, and enable them in the per-board dts files, since different boards might not use all peripherals, etc.

It seems like all your boards currently use both uarts, but if it changes in the future please consider switching over. It might be worth doing so now to avoid churn later on. That also allows you to define all the uards (I'm going to guess that there's a total of at least 4 on this system :).

arch/arm/boot/dts/bcm-cygnus.dtsi line 66

Quoted 3 lines
arch/arm/boot/dts/bcm-cygnus.dtsi new file +3 -0
+       };
+
+       uart0: serial at 18020000 {

These are also out of order, uart3 is before uart0 (and the registers are in reverse order).

We normally recommend that you add entries sorted by reg/unit address -- that way there's less risk of conflict due to add/add compared to if people just append new entries at the end of the file.

Quoted 10 lines
arch/arm/boot/dts/bcm-cygnus.dtsi new file +10 -0
+               compatible = "snps,dw-apb-uart";
+               reg = <0x18020000 0x100>;
+               reg-shift = <2>;
+               reg-io-width = <4>;
+               interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&axi81_clk>;
+               clock-frequency = <100000000>;
+               status = "okay";
+       };
+

arch/arm/boot/dts/bcm-cygnus.dtsi line 86

Quoted 10 lines
arch/arm/boot/dts/bcm-cygnus.dtsi new file +10 -0
+       gic: interrupt-controller at 19021000 {
+               compatible = "arm,cortex-a9-gic";
+               #interrupt-cells = <3>;
+               #address-cells = <0>;
+               interrupt-controller;
+               reg = <0x19021000 0x1000>,
+                     <0x19020100 0x100>;
+       };
+
+       L2: l2-cache {

l2-cache at 19022000

Quoted 136 lines
arch/arm/boot/dts/bcm-cygnus.dtsi new file +14 -0
+               compatible = "arm,pl310-cache";
+               reg = <0x19022000 0x1000>;
+               cache-unified;
+               cache-level = <2>;
+       };
+
+       timer at 19020200 {
+               compatible = "arm,cortex-a9-global-timer";
+               reg = <0x19020200 0x100>;
+               interrupts = <GIC_PPI 11 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&periph_clk>;
+       };
+
+};
arch/arm/boot/dts/bcm911360_entphn.dts new file +32 -0
new file mode 100644
index 0000000..9de5e87
@@ -0,0 +1,32 @@
+/*
+ * 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.
+ */
+
+/dts-v1/;
+
+#include "bcm-cygnus.dtsi"
+
+/ {
+       model = "Cygnus Enterprise Phone (BCM911360_ENTPHN)";
+       compatible = "brcm,bcm11360", "brcm,cygnus";
+
+       aliases {
+               serial0 = &uart3;
+               serial1 = &uart0;
+       };
+
+       chosen {
+               stdout-path = &uart3;
+               bootargs = "console=ttyS0,115200";
+       };
+};
arch/arm/boot/dts/bcm911360k.dts new file +32 -0
new file mode 100644
index 0000000..dd4f102
@@ -0,0 +1,32 @@
+/*
+ * 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.
+ */
+
+/dts-v1/;
+
+#include "bcm-cygnus.dtsi"
+
+/ {
+       model = "Cygnus SVK (BCM911360K)";
+       compatible = "brcm,bcm11360", "brcm,cygnus";
+
+       aliases {
+               serial0 = &uart3;
+               serial1 = &uart0;
+       };
+
+       chosen {
+               stdout-path = &uart3;
+               bootargs = "console=ttyS0,115200";
+       };
+};
arch/arm/boot/dts/bcm958300k.dts new file +32 -1
new file mode 100644
index 0000000..f8b9625
@@ -0,0 +1,32 @@
+/*
+ * 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.
+ */
+
+/dts-v1/;
+
+#include "bcm-cygnus.dtsi"
+
+/ {
+       model = "Cygnus SVK (BCM958300K)";
+       compatible = "brcm,bcm58300", "brcm,cygnus";
+
+       aliases {
+               serial0 = &uart3;
+               serial1 = &uart0;
+       };
+
+       chosen {
+               stdout-path = &uart3;
+               bootargs = "console=ttyS0,115200";
+       };
+};
--

1.7.9.5

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#87 lore raw

Re: [PATCH v8 4/8] ARM: dts: Enable Broadcom Cygnus SoC

Quoted 81 lines · Scott Branden
Quoted 70 lines · Olof Johansson

Hi,

A bunch of small comments below, should be quick to fix.

Quoted 29 lines · Scott Branden

DT files to enable cygnus consisting on reference designs and cygnus core configuration.

---
  arch/arm/boot/dts/Makefile              |    4 ++
  arch/arm/boot/dts/bcm-cygnus-clock.dtsi |   73 ++++++++++++++++++++++
  arch/arm/boot/dts/bcm-cygnus.dtsi       |  100
+++++++++++++++++++++++++++++++
  arch/arm/boot/dts/bcm911360_entphn.dts  |   32 ++++++++++
  arch/arm/boot/dts/bcm911360k.dts        |   32 ++++++++++
  arch/arm/boot/dts/bcm958300k.dts        |   32 ++++++++++
  6 files changed, 273 insertions(+)

create mode 100644 arch/arm/boot/dts/bcm-cygnus-clock.dtsi create mode 100644 arch/arm/boot/dts/bcm-cygnus.dtsi create mode 100644 arch/arm/boot/dts/bcm911360_entphn.dts create mode 100644 arch/arm/boot/dts/bcm911360k.dts create mode 100644 arch/arm/boot/dts/bcm958300k.dts

arch/arm/boot/dts/Makefile +0 -0
index 38c89ca..4b3a590 100644

arch/arm/boot/dts/Makefile dtb-$(CONFIG_ARCH_AT91) += at91-sama5d4ek.dtb · line 63

Quoted 10 lines
arch/arm/boot/dts/Makefile +4 -0
@@ -54,6 +54,10 @@ dtb-$(CONFIG_ARCH_AT91)      += at91-sama5d4ek.dtb
  dtb-$(CONFIG_ARCH_ATLAS6) += atlas6-evb.dtb
  dtb-$(CONFIG_ARCH_AXXIA) += axm5516-amarillo.dtb
  dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b.dtb
+dtb-$(CONFIG_ARCH_BCM_CYGNUS) += \
+       bcm911360_entphn.dtb \
+       bcm911360k.dtb \
+       bcm958300k.dtb
  dtb-$(CONFIG_ARCH_BCM_5301X) += bcm4708-netgear-r6250.dtb
  dtb-$(CONFIG_ARCH_BCM_63XX) += bcm963138dvt.dtb
  dtb-$(CONFIG_ARCH_BCM_MOBILE) += bcm28155-ap.dtb \

Please add new entries in alphabetical/alphanumerical order. Also, first entry is commonly added on the first line

Quoted 18 lines
arch/arm/boot/dts/bcm-cygnus-clock.dtsi new file +5 -0
new file mode 100644
index 0000000..d06172b
@@ -0,0 +1,73 @@
+/*
+ * 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

Quoted 8 lines
Quoted 2 lines

+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.

We ask for new DT contents to be added with dual BSD/GPL license, to allow for reuse of the DT data structures in other projects as well. There's currently a lot of activity going on relicensing the current files so I recommend sorting it out before they are added if you can.

Quoted 3 lines

This may take more time than you think. I am going to have to go through legal to get such a license created. Also, why would you need dual license? If it is BSD that should serve both purposes?

I haven't followed the discussion close enough to know if there's been discussion about single-license BSD vs dual BSD/GPL.

At the very least, please start the process of getting it changed.

Also, I see now that this isn't even a clean GPL v2, given "Unless you and Broadcom..." language. I see the bnx2x driver had that in the past, but none of the Kona contributions did. I strongly suggest sticking to the normal copyrights here and not making things more complicated than they have to.

-Olof

#88 lore raw

Re: [PATCH v8 4/8] ARM: dts: Enable Broadcom Cygnus SoC

Quoted 28 lines · Olof Johansson
Quoted 21 lines
Quoted 15 lines
Quoted 5 lines

+/*
+ * 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

Quoted 8 lines

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.

Quoted 4 lines

We ask for new DT contents to be added with dual BSD/GPL license, to allow for reuse of the DT data structures in other projects as well. There's currently a lot of activity going on relicensing the current files so I recommend sorting it out before they are added if you can.

Quoted 3 lines

This may take more time than you think. I am going to have to go through legal to get such a license created. Also, why would you need dual license? If it is BSD that should serve both purposes?

I haven't followed the discussion close enough to know if there's been discussion about single-license BSD vs dual BSD/GPL.

Quoted 7 lines

At the very least, please start the process of getting it changed.

Also, I see now that this isn't even a clean GPL v2, given "Unless you and Broadcom..." language. I see the bnx2x driver had that in the past, but none of the Kona contributions did. I strongly suggest sticking to the normal copyrights here and not making things more complicated than they have to.

I'm thinking that the "unless you and Broadcom..." language really doesn't mean much other than what all other files in the kernel mean from what I can tell. This should just default to GPLv2 and everyone should be ok.

But note, I'm not a lawyer, it would be good to get a confirmation from Broadcom that this is the exact wording they want in this file, and that they are happy with it being "just" GPLv2 for all intensive purposes, as it does "differ" from the wording we are "accustomed" to seeing in kernel files.

thanks,

greg k-h

maintainer
#89 lore raw

Re: [PATCH v8 4/8] ARM: dts: Enable Broadcom Cygnus SoC

Quoted 22 lines · On Sunday 09 November 2014 09:23:11 Greg Kroah-Hartman wrote:
Quoted 21 lines · Olof Johansson
Quoted 21 lines
Quoted 19 lines
Quoted 5 lines

+/*
+ * 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

Quoted 8 lines

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.

We ask for new DT contents to be added with dual BSD/GPL license, to allow for reuse of the DT data structures in other projects as well. There's currently a lot of activity going on relicensing the current files so I recommend sorting it out before they are added if you can.

Quoted 6 lines
Quoted 6 lines
Quoted 3 lines

This may take more time than you think. I am going to have to go through legal to get such a license created. Also, why would you need dual license? If it is BSD that should serve both purposes?

I haven't followed the discussion close enough to know if there's been discussion about single-license BSD vs dual BSD/GPL.

I think for all practical purposes, BSD and dual BSD/GPL is the same and listing it as dual was meant as a clarification to make it easier to see that all files in the kernel are GPLv2 compatible.

Quoted 8 lines
Quoted 7 lines

At the very least, please start the process of getting it changed.

Also, I see now that this isn't even a clean GPL v2, given "Unless you and Broadcom..." language. I see the bnx2x driver had that in the past, but none of the Kona contributions did. I strongly suggest sticking to the normal copyrights here and not making things more complicated than they have to.

Quoted 4 lines

I'm thinking that the "unless you and Broadcom..." language really doesn't mean much other than what all other files in the kernel mean from what I can tell. This should just default to GPLv2 and everyone should be ok.

I would hope so at least. It's certainly not obvious whether that means Broadcom can give additional rights to someone over what someone else contributed upstream, or worse if this becomes GPL-incompatible and makes the kernel undistributable for anybody who has an additional license agreement that doesn't give them all the rights that they already had under the GPL.

Arnd

author maintainer
#90 lore raw

Re: [PATCH v8 4/8] ARM: dts: Enable Broadcom Cygnus SoC

Quoted 27 lines · Arnd Bergmann
Quoted 26 lines · On Sunday 09 November 2014 09:23:11 Greg Kroah-Hartman wrote:
Quoted 25 lines · Olof Johansson
Quoted 24 lines
Quoted 15 lines
Quoted 5 lines

+/*
+ * 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

Quoted 8 lines

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.

Quoted 4 lines

We ask for new DT contents to be added with dual BSD/GPL license, to allow for reuse of the DT data structures in other projects as well. There's currently a lot of activity going on relicensing the current files so I recommend sorting it out before they are added if you can.

This may take more time than you think. I am going to have to go through legal to get such a license created. Also, why would you need dual license? If it is BSD that should serve both purposes?

Quoted 6 lines
Quoted 2 lines
Quoted 2 lines

I haven't followed the discussion close enough to know if there's been discussion about single-license BSD vs dual BSD/GPL.

I think for all practical purposes, BSD and dual BSD/GPL is the same and listing it as dual was meant as a clarification to make it easier to see that all files in the kernel are GPLv2 compatible.

A dual BSD/GPL may involve having me get a lawyer to create such a header. I would prefer to leave it as GPL for now until some concrete decision has finally been made on this by the rest of the community? Or, I can put it as BSD right now if that helps?

Quoted 14 lines
Quoted 9 lines
Quoted 8 lines

At the very least, please start the process of getting it changed.

Also, I see now that this isn't even a clean GPL v2, given "Unless you and Broadcom..." language. I see the bnx2x driver had that in the past, but none of the Kona contributions did. I strongly suggest sticking to the normal copyrights here and not making things more complicated than they have to.

Quoted 4 lines

I'm thinking that the "unless you and Broadcom..." language really doesn't mean much other than what all other files in the kernel mean from what I can tell. This should just default to GPLv2 and everyone should be ok.

Quoted 6 lines

I would hope so at least. It's certainly not obvious whether that means Broadcom can give additional rights to someone over what someone else contributed upstream, or worse if this becomes GPL-incompatible and makes the kernel undistributable for anybody who has an additional license agreement that doesn't give them all the rights that they already had under the GPL.

I'll change the header on these files so there are no disagreements.

Quoted 3 lines

Arnd

maintainer
#91 lore raw

Re: [PATCH v8 4/8] ARM: dts: Enable Broadcom Cygnus SoC

Quoted 31 lines · On Sunday 09 November 2014 21:17:37 Scott Branden wrote:
Quoted 30 lines · Arnd Bergmann
Quoted 28 lines · On Sunday 09 November 2014 09:23:11 Greg Kroah-Hartman wrote:
Quoted 27 lines · Olof Johansson
Quoted 21 lines
Quoted 15 lines
Quoted 5 lines

+/*
+ * 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

Quoted 8 lines

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.

Quoted 4 lines

We ask for new DT contents to be added with dual BSD/GPL license, to allow for reuse of the DT data structures in other projects as well. There's currently a lot of activity going on relicensing the current files so I recommend sorting it out before they are added if you can.

Quoted 3 lines

This may take more time than you think. I am going to have to go through legal to get such a license created. Also, why would you need dual license? If it is BSD that should serve both purposes?

I haven't followed the discussion close enough to know if there's been discussion about single-license BSD vs dual BSD/GPL.

Quoted 7 lines
Quoted 3 lines

I think for all practical purposes, BSD and dual BSD/GPL is the same and listing it as dual was meant as a clarification to make it easier to see that all files in the kernel are GPLv2 compatible.

A dual BSD/GPL may involve having me get a lawyer to create such a header. I would prefer to leave it as GPL for now until some concrete decision has finally been made on this by the rest of the community? Or, I can put it as BSD right now if that helps?

I would prefer a pure BSD header for the moment over a pure GPL header. The last thing we want is to force other operating systems to create another set of dts files for the same hardware.

Arnd

author maintainer
#92 lore raw

Re: [PATCH v8 4/8] ARM: dts: Enable Broadcom Cygnus SoC

Quoted 35 lines · Arnd Bergmann
Quoted 34 lines · On Sunday 09 November 2014 21:17:37 Scott Branden wrote:
Quoted 33 lines · Arnd Bergmann
Quoted 22 lines · On Sunday 09 November 2014 09:23:11 Greg Kroah-Hartman wrote:
Quoted 21 lines · Olof Johansson
Quoted 21 lines
Quoted 19 lines
Quoted 5 lines

+/*
+ * 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

Quoted 8 lines

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.

We ask for new DT contents to be added with dual BSD/GPL license, to allow for reuse of the DT data structures in other projects as well. There's currently a lot of activity going on relicensing the current files so I recommend sorting it out before they are added if you can.

Quoted 6 lines
Quoted 6 lines
Quoted 3 lines

This may take more time than you think. I am going to have to go through legal to get such a license created. Also, why would you need dual license? If it is BSD that should serve both purposes?

I haven't followed the discussion close enough to know if there's been discussion about single-license BSD vs dual BSD/GPL.

I think for all practical purposes, BSD and dual BSD/GPL is the same and listing it as dual was meant as a clarification to make it easier to see that all files in the kernel are GPLv2 compatible.

Quoted 8 lines
Quoted 4 lines

A dual BSD/GPL may involve having me get a lawyer to create such a header. I would prefer to leave it as GPL for now until some concrete decision has finally been made on this by the rest of the community? Or, I can put it as BSD right now if that helps?

I would prefer a pure BSD header for the moment over a pure GPL header. The last thing we want is to force other operating systems to create another set of dts files for the same hardware.

I have changed the headers to pure BSD. I hope this is acceptable.

Quoted 3 lines

Arnd

author maintainer
#93 lore raw

PATCH v8 5/8 MAINTAINERS: Entry for Cygnus/iproc arm architecture

In reply to Scott Branden
---
 MAINTAINERS |   14 ++++++++++++++
 1 file changed, 14 insertions(+)
MAINTAINERS +14 -0
index dab92a7..15a3d89 100644
@@ -2129,6 +2129,20 @@ L:	linux-scsi at vger.kernel.org
 S:	Supported
 F:	drivers/scsi/bnx2i/
 
+BROADCOM CYGNUS/IPROC ARM ARCHITECTURE
+M:	Ray Jui <[email protected]>
+M:	Scott Branden <[email protected]>
+L:	linux-arm-kernel at lists.infradead.org (moderated for non-subscribers)
+L:	bcm-kernel-feedback-list at broadcom.com
+T:	git git://git.github.com/brcm/linux.git
+S:	Maintained
+N:	iproc
+N:	cygnus
+N:	bcm9113*
+N:	bcm9583*
+N:	bcm583*
+N:	bcm113*
+
 BROADCOM KONA GPIO DRIVER
 M:	Ray Jui <[email protected]>
 L:	bcm-kernel-feedback-list at broadcom.com
Signature · 1 line
1.7.9.5
author maintainer
#94 lore raw

PATCH v8 6/8 ARM: mach-bcm: Consolidate currently supported IPROC SoCs

In reply to Scott Branden

Move ARCH_BCM_5301X subarch under ARCH_IPROC architecture. Additional IPROC chipsets that share a lot of commonality should be added under ARCH_IPROC as well.

---
 arch/arm/mach-bcm/Kconfig |   37 ++++++++++++++++---------------------
 1 file changed, 16 insertions(+), 21 deletions(-)
arch/arm/mach-bcm/Kconfig +16 -21
index 73d95c2..6e79696 100644
@@ -35,6 +35,22 @@ config ARCH_BCM_CYGNUS
 	  BCM11300, BCM11320, BCM11350, BCM11360,
 	  BCM58300, BCM58302, BCM58303, BCM58305.
 
+config ARCH_BCM_5301X
+	bool "Broadcom BCM470X / BCM5301X ARM SoC" if ARCH_MULTI_V7
+	select ARCH_BCM_IPROC
+	help
+	  Support for Broadcom BCM470X and BCM5301X SoCs with ARM CPU cores.
+
+	  This is a network SoC line mostly used in home routers and
+	  wifi access points, it's internal name is Northstar.
+	  This inclused the following SoC: BCM53010, BCM53011, BCM53012,
+	  BCM53014, BCM53015, BCM53016, BCM53017, BCM53018, BCM4707,
+	  BCM4708 and BCM4709.
+
+	  Do not confuse this with the BCM4760 which is a totally
+	  different SoC or with the older BCM47XX and BCM53XX based
+	  network SoC using a MIPS CPU, they are supported by arch/mips/bcm47xx
+
 config ARCH_BCM_MOBILE
 	bool "Broadcom Mobile SoC Support" if ARCH_MULTI_V7
 	select ARCH_REQUIRE_GPIOLIB
@@ -110,27 +126,6 @@ config ARCH_BCM2835
 	  This enables support for the Broadcom BCM2835 SoC. This SoC is
 	  used in the Raspberry Pi and Roku 2 devices.
 
-config ARCH_BCM_5301X
-	bool "Broadcom BCM470X / BCM5301X ARM SoC" if ARCH_MULTI_V7
-	select ARM_GIC
-	select CACHE_L2X0
-	select HAVE_ARM_SCU if SMP
-	select HAVE_ARM_TWD if SMP
-	select ARM_GLOBAL_TIMER
-	select CLKSRC_ARM_GLOBAL_TIMER_SCHED_CLOCK
-	help
-	  Support for Broadcom BCM470X and BCM5301X SoCs with ARM CPU cores.
-
-	  This is a network SoC line mostly used in home routers and
-	  wifi access points, it's internal name is Northstar.
-	  This inclused the following SoC: BCM53010, BCM53011, BCM53012,
-	  BCM53014, BCM53015, BCM53016, BCM53017, BCM53018, BCM4707,
-	  BCM4708 and BCM4709.
-
-	  Do not confuse this with the BCM4760 which is a totally
-	  different SoC or with the older BCM47XX and BCM53XX based
-	  network SoC using a MIPS CPU, they are supported by arch/mips/bcm47xx
-
 config ARCH_BCM_63XX
 	bool "Broadcom BCM63xx DSL SoC" if ARCH_MULTI_V7
 	depends on MMU
Signature · 1 line
1.7.9.5
author maintainer
#95 lore raw

PATCH v8 7/8 ARM: mach-bcm: ARCH_BCM_MOBILE: remove one level of menu from Kconfig

In reply to Scott Branden

remove menu "Broadcom Mobile SoC Selection"
This requires:
- selecting ARCH_BCM_MOBILE based on SoC selections
- fixup bcm_defconfig and multi_v7_defconfig to work with new menu levels.

---
 arch/arm/configs/bcm_defconfig      |    3 ++-
 arch/arm/configs/multi_v7_defconfig |    3 ++-
 arch/arm/mach-bcm/Kconfig           |   26 ++++++++++----------------
 3 files changed, 14 insertions(+), 18 deletions(-)
arch/arm/configs/bcm_defconfig +2 -1
index bc614f4..83a87e4 100644
@@ -25,7 +25,8 @@ CONFIG_MODULE_UNLOAD=y
 # CONFIG_BLK_DEV_BSG is not set
 CONFIG_PARTITION_ADVANCED=y
 CONFIG_ARCH_BCM=y
-CONFIG_ARCH_BCM_MOBILE=y
+CONFIG_ARCH_BCM_21664=y
+CONFIG_ARCH_BCM_281XX=y
 CONFIG_ARM_THUMBEE=y
 CONFIG_SMP=y
 CONFIG_PREEMPT=y
arch/arm/configs/multi_v7_defconfig +2 -1
index f1dc7fc..6e0d7cb 100644
@@ -17,7 +17,8 @@ CONFIG_MACH_ARMADA_38X=y
 CONFIG_MACH_ARMADA_XP=y
 CONFIG_MACH_DOVE=y
 CONFIG_ARCH_BCM=y
-CONFIG_ARCH_BCM_MOBILE=y
+CONFIG_ARCH_BCM_21664=y
+CONFIG_ARCH_BCM_281XX=y
 CONFIG_ARCH_BCM_5301X=y
 CONFIG_ARCH_BRCMSTB=y
 CONFIG_ARCH_BERLIN=y
arch/arm/mach-bcm/Kconfig +10 -16
index 6e79696..cceb69f 100644
@@ -51,8 +51,10 @@ config ARCH_BCM_5301X
 	  different SoC or with the older BCM47XX and BCM53XX based
 	  network SoC using a MIPS CPU, they are supported by arch/mips/bcm47xx
 
+comment "KONA architected SoCs"
+
 config ARCH_BCM_MOBILE
-	bool "Broadcom Mobile SoC Support" if ARCH_MULTI_V7
+	bool
 	select ARCH_REQUIRE_GPIOLIB
 	select ARM_ERRATA_754322
 	select ARM_ERRATA_775420
@@ -61,16 +63,13 @@ config ARCH_BCM_MOBILE
 	select TICK_ONESHOT
 	select HAVE_ARM_ARCH_TIMER
 	select PINCTRL
+	select ARCH_BCM_MOBILE_SMP if SMP
 	help
 	  This enables support for systems based on Broadcom mobile SoCs.
 
-if ARCH_BCM_MOBILE
-
-menu "Broadcom Mobile SoC Selection"
-
 config ARCH_BCM_281XX
 	bool "Broadcom BCM281XX SoC family"
-	default y
+	select ARCH_BCM_MOBILE
 	select HAVE_SMP
 	help
 	  Enable support for the BCM281XX family, which includes
@@ -79,7 +78,7 @@ config ARCH_BCM_281XX
 
 config ARCH_BCM_21664
 	bool "Broadcom BCM21664 SoC family"
-	default y
+	select ARCH_BCM_MOBILE
 	select HAVE_SMP
 	help
 	  Enable support for the BCM21664 family, which includes
@@ -87,19 +86,18 @@ config ARCH_BCM_21664
 
 config ARCH_BCM_MOBILE_L2_CACHE
 	bool "Broadcom mobile SoC level 2 cache support"
-	depends on (ARCH_BCM_281XX || ARCH_BCM_21664)
+	depends on ARCH_BCM_MOBILE
 	default y
 	select CACHE_L2X0
 	select ARCH_BCM_MOBILE_SMC
 
 config ARCH_BCM_MOBILE_SMC
 	bool
-	depends on ARCH_BCM_281XX || ARCH_BCM_21664
+	depends on ARCH_BCM_MOBILE
 
 config ARCH_BCM_MOBILE_SMP
-	bool "Broadcom mobile SoC SMP support"
-	depends on (ARCH_BCM_281XX || ARCH_BCM_21664) && SMP
-	default y
+	bool
+	depends on ARCH_BCM_MOBILE
 	select HAVE_ARM_SCU
 	select ARM_ERRATA_764369
 	help
@@ -107,10 +105,6 @@ config ARCH_BCM_MOBILE_SMP
 	  Provided as an option so SMP support for SoCs of this type
 	  can be disabled for an SMP-enabled kernel.
 
-endmenu
-
-endif
-
 comment "Other Architectures"
 
 config ARCH_BCM2835
Signature · 1 line
1.7.9.5
author maintainer
#96 lore raw

PATCH v8 8/8 ARM: multi_v7_defconfig: Enable Broadcom Cygnus

In reply to Scott Branden

From: Ray Jui <[email protected]>

Enable Broadcom Cygnus platform support in multi_v7_defconfig

---
 arch/arm/configs/multi_v7_defconfig |    1 +
 1 file changed, 1 insertion(+)
arch/arm/configs/multi_v7_defconfig +1 -0
index 6e0d7cb..c223da3 100644
@@ -17,6 +17,7 @@ CONFIG_MACH_ARMADA_38X=y
 CONFIG_MACH_ARMADA_XP=y
 CONFIG_MACH_DOVE=y
 CONFIG_ARCH_BCM=y
+CONFIG_ARCH_BCM_CYGNUS=y
 CONFIG_ARCH_BCM_21664=y
 CONFIG_ARCH_BCM_281XX=y
 CONFIG_ARCH_BCM_5301X=y
Signature · 1 line
1.7.9.5
maintainer
#97 lore raw

Re: [PATCH v8 8/8] ARM: multi_v7_defconfig: Enable Broadcom Cygnus

Quoted 7 lines · On Tuesday 28 October 2014 12:53:12 Scott Branden wrote:

From: Ray Jui <[email protected]>

Enable Broadcom Cygnus platform support in multi_v7_defconfig

Just to be sure: did you check that multi_v7_defconfig contains all the drivers you need that you enable in your other defconfig?

Arnd

author maintainer
#98 lore raw

Re: [PATCH v8 8/8] ARM: multi_v7_defconfig: Enable Broadcom Cygnus

Quoted 11 lines · Arnd Bergmann
Quoted 7 lines · On Tuesday 28 October 2014 12:53:12 Scott Branden wrote:

From: Ray Jui <[email protected]>

Enable Broadcom Cygnus platform support in multi_v7_defconfig

Just to be sure: did you check that multi_v7_defconfig contains all the drivers you need that you enable in your other defconfig?

No - the other defconfig has more that have not been tested on the device. The defconfig builds, but the other drivers haven't been tested. I guess we can try adding them to the multi_defconfig right now as well or wait until we have tested them? There will need to be addition dts changes in the future after we have tested the other drivers.

Can we wait to add them to multi_v7_defconfig or do you want them in this patchset?

Quoted 3 lines

Arnd

maintainer
#99 lore raw

Re: [PATCH v8 8/8] ARM: multi_v7_defconfig: Enable Broadcom Cygnus

Quoted 12 lines · On Tuesday 28 October 2014 13:06:28 Scott Branden wrote:
Quoted 11 lines · Arnd Bergmann
Quoted 7 lines · On Tuesday 28 October 2014 12:53:12 Scott Branden wrote:

From: Ray Jui <[email protected]>

Enable Broadcom Cygnus platform support in multi_v7_defconfig

Just to be sure: did you check that multi_v7_defconfig contains all the drivers you need that you enable in your other defconfig?

Quoted 8 lines

No - the other defconfig has more that have not been tested on the device. The defconfig builds, but the other drivers haven't been tested. I guess we can try adding them to the multi_defconfig right now as well or wait until we have tested them? There will need to be addition dts changes in the future after we have tested the other drivers.

Can we wait to add them to multi_v7_defconfig or do you want them in this patchset?

The important part is that you don't break other platforms, and that is independent of whether the code actually does the right thing.

If you know that you will need certain drivers to make use of the platform, just enable them now.

Arnd

author maintainer
#100 lore raw

v9 cover Add initial support for Broadcom Cygnus SoC

In reply to a message not in the archive

This patchset contains initial support for Broadcom's Cygnus SoC based on our iProc architecture. Initial support is minimal and includes just the mach platform code, clock driver, and a basic device tree configuration. Peripheral drivers will be submitted soon, as will device tree configurations for other Cygnus board variants.

Changes from v8:
- enabled additional drivers in multi_v7_defconfig used by Cygnus

Changes from v7:
- Fixed dts to move uart code to board specific dts files
- Add Cygnus to multi_v7_defconfig. It boots.

Changes from v6:
- Additional patch added for cleanup of other areas of mach-bcm/Kconfig discovered during Cygnus submission review to:
- removed one level of menu for ARCH_BCM_MOBILE in mach-bcm-Kconfig based on feedback from Arnd
- added comment sections to Kconfig to identify SoC architecture groupings

Changes from v5:
- removed one level of menu used in mach-bcm/Kconfig
- changed MAINTAINERS to use N: to support all files associated with iproc and cygnus going forward
- updated bcm_cygnus_defconfig to remove some DEBUG options that greatly hamper performance

Changes from v4:
- simple clock tree used. reworked clock driver will be submitted later
- fixed MAINTAINERS patchset error
- removed DEBUG_UART_8250 Kconfig.debug legacy support
- made ARCH_BCM_IPROC a silent Kconfig option
- removed multi_v7_defconfig as it is not needed at this time, can support in future patchset but does not seem optimal configs for our current usage.

Changes from v3:
- restart functionality removed. Will be added in a different patchset in drivers/power
- removed NEON init sequence. Will be moved to bootloader
- cleaned up Kconfigs for ARCH_BCM_CYGNUS by removing unnecessary selects
- consolidated ARCH_BCM_IPROC with select from ARCH_BCM_CYGNUS and ARCH_BCM5301X
- removed bcm911360_entphn binding
- added documentation for SoCs currently supported in Cygnus family

Changes from v2:
- rebased to 3.17 kernel

Changes from v1:
- Address code review comments as per previous responses.
- Copyright headers updated to remove Broadcom URL.
- mach platform code still contains hard coded addresses. These address are the same for all Cygnus variants. Could you please provide guidance on where they should go if you would still like them changed. There does not seem to be a reason to change them to device tree as they do not change.

Jonathan Richardson (3):
ARM: cygnus: Initial support for Broadcom Cygnus SoC
dt-bindings: Document Broadcom Cygnus SoC and clocks
ARM: cygnus defconfig : Initial defconfig for Broadcom Cygnus SoC

Ray Jui (1):
ARM: multi_v7_defconfig: Enable Broadcom Cygnus

Scott Branden (4):
ARM: dts: Enable Broadcom Cygnus SoC
MAINTAINERS: Entry for Cygnus/iproc arm architecture
ARM: mach-bcm: Consolidate currently supported IPROC SoCs
ARM: mach-bcm: ARCH_BCM_MOBILE: remove one level of menu from Kconfig

 .../devicetree/bindings/arm/bcm/cygnus.txt         |   31 +++
 .../devicetree/bindings/clock/bcm-cygnus-clock.txt |   34 +++
 MAINTAINERS                                        |   14 ++
 arch/arm/boot/dts/Makefile                         |    4 +
 arch/arm/boot/dts/bcm-cygnus-clock.dtsi            |   73 ++++++
 arch/arm/boot/dts/bcm-cygnus.dtsi                  |  100 +++++++++
 arch/arm/boot/dts/bcm911360_entphn.dts             |   32 +++
 arch/arm/boot/dts/bcm911360k.dts                   |   32 +++
 arch/arm/boot/dts/bcm958300k.dts                   |   32 +++
 arch/arm/configs/bcm_cygnus_defconfig              |  237 ++++++++++++++++++++
 arch/arm/configs/bcm_defconfig                     |    3 +-
 arch/arm/configs/multi_v7_defconfig                |   21 +-
 arch/arm/mach-bcm/Kconfig                          |   93 +++++---
 arch/arm/mach-bcm/Makefile                         |    3 +
 arch/arm/mach-bcm/bcm_cygnus.c                     |   26 +++
 15 files changed, 697 insertions(+), 38 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/arm/bcm/cygnus.txt
 create mode 100644 Documentation/devicetree/bindings/clock/bcm-cygnus-clock.txt
 create mode 100644 arch/arm/boot/dts/bcm-cygnus-clock.dtsi
 create mode 100644 arch/arm/boot/dts/bcm-cygnus.dtsi
 create mode 100644 arch/arm/boot/dts/bcm911360_entphn.dts
 create mode 100644 arch/arm/boot/dts/bcm911360k.dts
 create mode 100644 arch/arm/boot/dts/bcm958300k.dts
 create mode 100644 arch/arm/configs/bcm_cygnus_defconfig
 create mode 100644 arch/arm/mach-bcm/bcm_cygnus.c
Signature · 1 line
1.7.9.5
author maintainer
#101 lore raw

PATCH v9 1/8 ARM: cygnus: Initial support for Broadcom Cygnus SoC

From: Jonathan Richardson <[email protected]>

Adds initial support for the Cygnus SoC based on Broadcom?s iProc series.

---
 arch/arm/mach-bcm/Kconfig      |   32 ++++++++++++++++++++++++++++++++
 arch/arm/mach-bcm/Makefile     |    3 +++
 arch/arm/mach-bcm/bcm_cygnus.c |   26 ++++++++++++++++++++++++++
 3 files changed, 61 insertions(+)
 create mode 100644 arch/arm/mach-bcm/bcm_cygnus.c
arch/arm/mach-bcm/Kconfig +32 -0
index 2abad74..73d95c2 100644
@@ -5,6 +5,36 @@ menuconfig ARCH_BCM
 
 if ARCH_BCM
 
+comment "IPROC architected SoCs"
+
+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.
+
 config ARCH_BCM_MOBILE
 	bool "Broadcom Mobile SoC Support" if ARCH_MULTI_V7
 	select ARCH_REQUIRE_GPIOLIB
@@ -65,6 +95,8 @@ endmenu
 
 endif
 
+comment "Other Architectures"
+
 config ARCH_BCM2835
 	bool "Broadcom BCM2835 family" if ARCH_MULTI_V6
 	select ARCH_REQUIRE_GPIOLIB
arch/arm/mach-bcm/Makefile +3 -0
index 300ae4b..34d45ba 100644
@@ -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
 
arch/arm/mach-bcm/bcm_cygnus.c new file +26 -0
new file mode 100644
index 0000000..41b4933
@@ -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
Signature · 1 line
1.7.9.5
author maintainer
#102 lore raw

PATCH v9 2/8 dt-bindings: Document Broadcom Cygnus SoC and clocks

In reply to Scott Branden

From: Jonathan Richardson <[email protected]>

---
 .../devicetree/bindings/arm/bcm/cygnus.txt         |   31 ++++++++++++++++++
 .../devicetree/bindings/clock/bcm-cygnus-clock.txt |   34 ++++++++++++++++++++
 2 files changed, 65 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/arm/bcm/cygnus.txt
 create mode 100644 Documentation/devicetree/bindings/clock/bcm-cygnus-clock.txt
Documentation/devicetree/bindings/arm/bcm/cygnus.txt new file +31 -0
new file mode 100644
index 0000000..4c77169
@@ -0,0 +1,31 @@
+Broadcom Cygnus device tree bindings
+------------------------------------
+
+
+Boards with Cygnus SoCs shall have the following properties:
+
+Required root node property:
+
+BCM11300
+compatible = "brcm,bcm11300", "brcm,cygnus";
+
+BCM11320
+compatible = "brcm,bcm11320", "brcm,cygnus";
+
+BCM11350
+compatible = "brcm,bcm11350", "brcm,cygnus";
+
+BCM11360
+compatible = "brcm,bcm11360", "brcm,cygnus";
+
+BCM58300
+compatible = "brcm,bcm58300", "brcm,cygnus";
+
+BCM58302
+compatible = "brcm,bcm58302", "brcm,cygnus";
+
+BCM58303
+compatible = "brcm,bcm58303", "brcm,cygnus";
+
+BCM58305
+compatible = "brcm,bcm58305", "brcm,cygnus";
Documentation/devicetree/bindings/clock/bcm-cygnus-clock.txt new file +34 -0
new file mode 100644
index 0000000..00d26ed
@@ -0,0 +1,34 @@
+Broadcom Cygnus Clocks
+
+This binding uses the common clock binding:
+Documentation/devicetree/bindings/clock/clock-bindings.txt
+
+Currently various "fixed" clocks are declared for peripheral drivers that use
+the common clock framework to reference their core clocks. Proper support of
+these clocks will be added later
+
+Device tree example:
+
+	clocks {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges;
+
+		osc: oscillator {
+			compatible = "fixed-clock";
+			#clock-cells = <1>;
+			clock-frequency = <25000000>;
+		};
+
+		apb_clk: apb_clk {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+			clock-frequency = <1000000000>;
+		};
+
+		periph_clk: periph_clk {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+			clock-frequency = <500000000>;
+		};
+	};
Signature · 1 line
1.7.9.5
Acked-by on v9 2/8
#103 lore raw

Re: [PATCH v9 2/8] dt-bindings: Document Broadcom Cygnus SoC and clocks

Quoting Scott Branden (2014-10-28 16:15:05)

Quoted 7 lines

From: Jonathan Richardson <[email protected]>

Quoted 87 lines
---
 .../devicetree/bindings/arm/bcm/cygnus.txt         |   31 ++++++++++++++++++
 .../devicetree/bindings/clock/bcm-cygnus-clock.txt |   34 ++++++++++++++++++++
 2 files changed, 65 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/arm/bcm/cygnus.txt
 create mode 100644 Documentation/devicetree/bindings/clock/bcm-cygnus-clock.txt
Documentation/devicetree/bindings/arm/bcm/cygnus.txt new file +31 -0
new file mode 100644
index 0000000..4c77169
@@ -0,0 +1,31 @@
+Broadcom Cygnus device tree bindings
+------------------------------------
+
+
+Boards with Cygnus SoCs shall have the following properties:
+
+Required root node property:
+
+BCM11300
+compatible = "brcm,bcm11300", "brcm,cygnus";
+
+BCM11320
+compatible = "brcm,bcm11320", "brcm,cygnus";
+
+BCM11350
+compatible = "brcm,bcm11350", "brcm,cygnus";
+
+BCM11360
+compatible = "brcm,bcm11360", "brcm,cygnus";
+
+BCM58300
+compatible = "brcm,bcm58300", "brcm,cygnus";
+
+BCM58302
+compatible = "brcm,bcm58302", "brcm,cygnus";
+
+BCM58303
+compatible = "brcm,bcm58303", "brcm,cygnus";
+
+BCM58305
+compatible = "brcm,bcm58305", "brcm,cygnus";
Documentation/devicetree/bindings/clock/bcm-cygnus-clock.txt new file +34 -0
new file mode 100644
index 0000000..00d26ed
@@ -0,0 +1,34 @@
+Broadcom Cygnus Clocks
+
+This binding uses the common clock binding:
+Documentation/devicetree/bindings/clock/clock-bindings.txt
+
+Currently various "fixed" clocks are declared for peripheral drivers that use
+the common clock framework to reference their core clocks. Proper support of
+these clocks will be added later
+
+Device tree example:
+
+       clocks {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+
+               osc: oscillator {
+                       compatible = "fixed-clock";
+                       #clock-cells = <1>;
+                       clock-frequency = <25000000>;
+               };
+
+               apb_clk: apb_clk {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <1000000000>;
+               };
+
+               periph_clk: periph_clk {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <500000000>;
+               };
+       };
Signature · 1 line
1.7.9.5
author maintainer
#104 lore raw

PATCH v9 3/8 ARM: cygnus defconfig : Initial defconfig for Broadcom Cygnus SoC

In reply to Scott Branden

From: Jonathan Richardson <[email protected]>

This defconfig is utilized so a customer or developer can understand what kernel drivers are utilized by the Cygnus SoC. It also enables debug configs which should be disabled if optimal performance is desired.

---
 arch/arm/configs/bcm_cygnus_defconfig |  237 +++++++++++++++++++++++++++++++++
 1 file changed, 237 insertions(+)
 create mode 100644 arch/arm/configs/bcm_cygnus_defconfig
arch/arm/configs/bcm_cygnus_defconfig new file +237 -0
new file mode 100644
index 0000000..9ad77a8
@@ -0,0 +1,237 @@
+CONFIG_KERNEL_XZ=y
+# CONFIG_SWAP is not set
+CONFIG_SYSVIPC=y
+CONFIG_FHANDLE=y
+CONFIG_IRQ_DOMAIN_DEBUG=y
+CONFIG_NO_HZ_IDLE=y
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_BSD_PROCESS_ACCT=y
+CONFIG_BSD_PROCESS_ACCT_V3=y
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_LOG_BUF_SHIFT=19
+CONFIG_CGROUPS=y
+CONFIG_CGROUP_FREEZER=y
+CONFIG_CGROUP_DEVICE=y
+CONFIG_CGROUP_CPUACCT=y
+CONFIG_RESOURCE_COUNTERS=y
+CONFIG_CGROUP_SCHED=y
+CONFIG_BLK_CGROUP=y
+CONFIG_NAMESPACES=y
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_EMBEDDED=y
+CONFIG_PERF_EVENTS=y
+# CONFIG_COMPAT_BRK is not set
+CONFIG_JUMP_LABEL=y
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_BLK_DEV_BSG is not set
+CONFIG_PARTITION_ADVANCED=y
+CONFIG_ARCH_BCM=y
+CONFIG_ARCH_BCM_CYGNUS=y
+CONFIG_ARM_THUMBEE=y
+CONFIG_PCI=y
+CONFIG_PCI_DEBUG=y
+CONFIG_PREEMPT=y
+CONFIG_AEABI=y
+CONFIG_HIGHMEM=y
+# CONFIG_COMPACTION is not set
+# CONFIG_ATAGS is not set
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_ARM_APPENDED_DTB=y
+CONFIG_CPU_IDLE=y
+CONFIG_VFP=y
+CONFIG_NEON=y
+# CONFIG_SUSPEND is not set
+CONFIG_NET=y
+CONFIG_PACKET=y
+CONFIG_UNIX=y
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+CONFIG_IP_ADVANCED_ROUTER=y
+CONFIG_IP_MULTIPLE_TABLES=y
+CONFIG_IP_ROUTE_MULTIPATH=y
+CONFIG_IP_ROUTE_VERBOSE=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_MROUTE=y
+CONFIG_IP_MROUTE_MULTIPLE_TABLES=y
+CONFIG_SYN_COOKIES=y
+# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
+# CONFIG_INET_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_BEET is not set
+# CONFIG_INET_LRO is not set
+# CONFIG_INET_DIAG is not set
+CONFIG_TCP_CONG_ADVANCED=y
+# CONFIG_TCP_CONG_BIC is not set
+# CONFIG_TCP_CONG_WESTWOOD is not set
+# CONFIG_TCP_CONG_HTCP is not set
+CONFIG_IPV6=y
+# CONFIG_INET6_XFRM_MODE_TRANSPORT is not set
+# CONFIG_INET6_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET6_XFRM_MODE_BEET is not set
+# CONFIG_IPV6_SIT is not set
+CONFIG_IPV6_MULTIPLE_TABLES=y
+CONFIG_IPV6_SUBTREES=y
+CONFIG_IPV6_MROUTE=y
+CONFIG_NETFILTER=y
+# CONFIG_BRIDGE_NETFILTER is not set
+CONFIG_NF_CONNTRACK=y
+# CONFIG_NF_CONNTRACK_PROCFS is not set
+CONFIG_NF_CONNTRACK_FTP=y
+CONFIG_NF_CONNTRACK_IPV4=y
+CONFIG_IP_NF_IPTABLES=y
+CONFIG_IP_NF_FILTER=y
+CONFIG_IP_NF_TARGET_REJECT=y
+CONFIG_IP_NF_NAT=y
+CONFIG_IP_NF_TARGET_MASQUERADE=y
+CONFIG_IP_NF_TARGET_REDIRECT=y
+CONFIG_IP_NF_MANGLE=y
+CONFIG_IP_NF_RAW=y
+CONFIG_NF_CONNTRACK_IPV6=y
+CONFIG_IP6_NF_IPTABLES=y
+CONFIG_IP6_NF_MATCH_AH=y
+CONFIG_IP6_NF_MATCH_EUI64=y
+CONFIG_IP6_NF_MATCH_FRAG=y
+CONFIG_IP6_NF_MATCH_OPTS=y
+CONFIG_IP6_NF_MATCH_IPV6HEADER=y
+CONFIG_IP6_NF_MATCH_MH=y
+CONFIG_IP6_NF_MATCH_RT=y
+CONFIG_IP6_NF_FILTER=y
+CONFIG_IP6_NF_TARGET_REJECT=y
+CONFIG_IP6_NF_MANGLE=y
+CONFIG_IP6_NF_RAW=y
+CONFIG_BRIDGE=y
+# CONFIG_BRIDGE_IGMP_SNOOPING is not set
+CONFIG_VLAN_8021Q=y
+CONFIG_NET_SCHED=y
+CONFIG_NET_SCH_FQ_CODEL=y
+CONFIG_CFG80211=y
+# CONFIG_CFG80211_DEFAULT_PS is not set
+CONFIG_CFG80211_WEXT=y
+CONFIG_RFKILL=y
+CONFIG_DEVTMPFS=y
+CONFIG_DEVTMPFS_MOUNT=y
+# CONFIG_FIRMWARE_IN_KERNEL is not set
+CONFIG_MTD=y
+CONFIG_MTD_CMDLINE_PARTS=y
+CONFIG_MTD_BLOCK=y
+CONFIG_MTD_NAND=y
+CONFIG_MTD_UBI=y
+CONFIG_BLK_DEV_LOOP=y
+CONFIG_SCSI=y
+CONFIG_BLK_DEV_SD=y
+CONFIG_BLK_DEV_SR=y
+CONFIG_NETDEVICES=y
+# CONFIG_NET_CADENCE is not set
+# CONFIG_NET_VENDOR_CIRRUS is not set
+# CONFIG_NET_VENDOR_FARADAY is not set
+# CONFIG_NET_VENDOR_INTEL is not set
+# CONFIG_NET_VENDOR_MARVELL is not set
+# CONFIG_NET_VENDOR_MICREL is not set
+# CONFIG_NET_VENDOR_NATSEMI is not set
+# CONFIG_NET_VENDOR_SEEQ is not set
+# CONFIG_NET_VENDOR_SMSC is not set
+# CONFIG_NET_VENDOR_STMICRO is not set
+# CONFIG_NET_VENDOR_WIZNET is not set
+CONFIG_PHYLIB=y
+CONFIG_BROADCOM_PHY=y
+# CONFIG_INPUT_MOUSEDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_KEYBOARD_ATKBD is not set
+# CONFIG_INPUT_MOUSE is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+# CONFIG_SERIO is not set
+# CONFIG_LEGACY_PTYS is not set
+CONFIG_SERIAL_8250=y
+# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_8250_NR_UARTS=2
+CONFIG_SERIAL_8250_RUNTIME_UARTS=2
+CONFIG_SERIAL_8250_DW=y
+CONFIG_SERIAL_OF_PLATFORM=y
+# CONFIG_HW_RANDOM is not set
+CONFIG_I2C_CHARDEV=y
+# CONFIG_I2C_HELPER_AUTO is not set
+CONFIG_I2C_SMBUS=y
+CONFIG_SPI=y
+CONFIG_SPI_PL022=y
+CONFIG_SPI_SPIDEV=y
+CONFIG_GPIO_SYSFS=y
+# CONFIG_HWMON is not set
+CONFIG_WATCHDOG=y
+CONFIG_ARM_SP805_WATCHDOG=y
+CONFIG_MEDIA_SUPPORT=y
+CONFIG_MEDIA_CAMERA_SUPPORT=y
+CONFIG_MEDIA_USB_SUPPORT=y
+CONFIG_USB_VIDEO_CLASS=y
+# CONFIG_USB_GSPCA is not set
+CONFIG_FB=y
+CONFIG_FB_ARMCLCD=y
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+# CONFIG_LCD_CLASS_DEVICE is not set
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+# CONFIG_BACKLIGHT_GENERIC is not set
+CONFIG_BACKLIGHT_PWM=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_SOUND=y
+CONFIG_SND=y
+CONFIG_SND_DYNAMIC_MINORS=y
+CONFIG_SND_VERBOSE_PRINTK=y
+CONFIG_SND_DEBUG=y
+CONFIG_SND_USB_AUDIO=y
+CONFIG_SND_SOC=y
+CONFIG_USB=y
+CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_EHCI_ROOT_HUB_TT=y
+CONFIG_USB_EHCI_HCD_PLATFORM=y
+CONFIG_USB_OHCI_HCD=y
+CONFIG_USB_OHCI_HCD_PLATFORM=y
+CONFIG_USB_STORAGE=y
+CONFIG_MMC=y
+CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_PLTFM=y
+CONFIG_MMC_SDHCI_OF_ARASAN=y
+CONFIG_RTC_CLASS=y
+CONFIG_PWM=y
+CONFIG_EXT4_FS=y
+CONFIG_AUTOFS4_FS=y
+CONFIG_MSDOS_FS=y
+CONFIG_VFAT_FS=y
+CONFIG_NTFS_FS=y
+CONFIG_TMPFS=y
+CONFIG_TMPFS_POSIX_ACL=y
+CONFIG_UBIFS_FS=y
+CONFIG_NFS_FS=y
+CONFIG_ROOT_NFS=y
+CONFIG_NLS_CODEPAGE_437=y
+CONFIG_NLS_ISO8859_1=y
+CONFIG_NLS_UTF8=y
+CONFIG_PRINTK_TIME=y
+CONFIG_DYNAMIC_DEBUG=y
+CONFIG_DEBUG_INFO=y
+CONFIG_STRIP_ASM_SYMS=y
+CONFIG_DEBUG_FS=y
+CONFIG_MAGIC_SYSRQ=y
+CONFIG_DEBUG_OBJECTS=y
+CONFIG_DEBUG_OBJECTS_RCU_HEAD=y
+CONFIG_DEBUG_MEMORY_INIT=y
+CONFIG_DEBUG_SHIRQ=y
+CONFIG_DETECT_HUNG_TASK=y
+CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=110
+CONFIG_BOOTPARAM_HUNG_TASK_PANIC=y
+# CONFIG_SCHED_DEBUG is not set
+CONFIG_SCHEDSTATS=y
+# CONFIG_DEBUG_PREEMPT is not set
+CONFIG_DEBUG_RT_MUTEXES=y
+CONFIG_DEBUG_ATOMIC_SLEEP=y
+CONFIG_DEBUG_USER=y
+CONFIG_DEBUG_LL=y
+CONFIG_DEBUG_LL_UART_8250=y
+CONFIG_DEBUG_UART_PHYS=0x18023000
+CONFIG_DEBUG_UART_VIRT=0xf1023000
+CONFIG_EARLY_PRINTK=y
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
Signature · 1 line
1.7.9.5
author maintainer
#105 lore raw

PATCH v9 4/8 ARM: dts: Enable Broadcom Cygnus SoC

In reply to Scott Branden

DT files to enable cygnus consisting on reference designs and cygnus core configuration.

---
 arch/arm/boot/dts/Makefile              |    4 ++
 arch/arm/boot/dts/bcm-cygnus-clock.dtsi |   73 ++++++++++++++++++++++
 arch/arm/boot/dts/bcm-cygnus.dtsi       |  100 +++++++++++++++++++++++++++++++
 arch/arm/boot/dts/bcm911360_entphn.dts  |   32 ++++++++++
 arch/arm/boot/dts/bcm911360k.dts        |   32 ++++++++++
 arch/arm/boot/dts/bcm958300k.dts        |   32 ++++++++++
 6 files changed, 273 insertions(+)
 create mode 100644 arch/arm/boot/dts/bcm-cygnus-clock.dtsi
 create mode 100644 arch/arm/boot/dts/bcm-cygnus.dtsi
 create mode 100644 arch/arm/boot/dts/bcm911360_entphn.dts
 create mode 100644 arch/arm/boot/dts/bcm911360k.dts
 create mode 100644 arch/arm/boot/dts/bcm958300k.dts
arch/arm/boot/dts/Makefile +4 -0
index 38c89ca..4b3a590 100644
@@ -54,6 +54,10 @@ dtb-$(CONFIG_ARCH_AT91)	+= at91-sama5d4ek.dtb
 dtb-$(CONFIG_ARCH_ATLAS6) += atlas6-evb.dtb
 dtb-$(CONFIG_ARCH_AXXIA) += axm5516-amarillo.dtb
 dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b.dtb
+dtb-$(CONFIG_ARCH_BCM_CYGNUS) += \
+	bcm911360_entphn.dtb \
+	bcm911360k.dtb \
+	bcm958300k.dtb
 dtb-$(CONFIG_ARCH_BCM_5301X) += bcm4708-netgear-r6250.dtb
 dtb-$(CONFIG_ARCH_BCM_63XX) += bcm963138dvt.dtb
 dtb-$(CONFIG_ARCH_BCM_MOBILE) += bcm28155-ap.dtb \
arch/arm/boot/dts/bcm-cygnus-clock.dtsi new file +73 -0

73 lines not on this page · raw message

arch/arm/boot/dts/bcm-cygnus.dtsi new file +100 -0

100 lines not on this page · raw message

arch/arm/boot/dts/bcm911360_entphn.dts new file +32 -0
new file mode 100644
index 0000000..9de5e87
@@ -0,0 +1,32 @@
+/*
+ * 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.
+ */
+
+/dts-v1/;
+
+#include "bcm-cygnus.dtsi"
+
+/ {
+	model = "Cygnus Enterprise Phone (BCM911360_ENTPHN)";
+	compatible = "brcm,bcm11360", "brcm,cygnus";
+
+	aliases {
+		serial0 = &uart3;
+		serial1 = &uart0;
+	};
+
+	chosen {
+		stdout-path = &uart3;
+		bootargs = "console=ttyS0,115200";
+	};
+};
arch/arm/boot/dts/bcm911360k.dts new file +32 -0
new file mode 100644
index 0000000..dd4f102
@@ -0,0 +1,32 @@
+/*
+ * 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.
+ */
+
+/dts-v1/;
+
+#include "bcm-cygnus.dtsi"
+
+/ {
+	model = "Cygnus SVK (BCM911360K)";
+	compatible = "brcm,bcm11360", "brcm,cygnus";
+
+	aliases {
+		serial0 = &uart3;
+		serial1 = &uart0;
+	};
+
+	chosen {
+		stdout-path = &uart3;
+		bootargs = "console=ttyS0,115200";
+	};
+};
arch/arm/boot/dts/bcm958300k.dts new file +32 -0
new file mode 100644
index 0000000..f8b9625
@@ -0,0 +1,32 @@
+/*
+ * 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.
+ */
+
+/dts-v1/;
+
+#include "bcm-cygnus.dtsi"
+
+/ {
+	model = "Cygnus SVK (BCM958300K)";
+	compatible = "brcm,bcm58300", "brcm,cygnus";
+
+	aliases {
+		serial0 = &uart3;
+		serial1 = &uart0;
+	};
+
+	chosen {
+		stdout-path = &uart3;
+		bootargs = "console=ttyS0,115200";
+	};
+};
Signature · 1 line
1.7.9.5
#106 lore raw

Re: [PATCH v9 4/8] ARM: dts: Enable Broadcom Cygnus SoC

Quoted 8 lines · Scott Branden

DT files to enable cygnus consisting on reference designs and cygnus core configuration.

This landed in today's linux-next (ie, next-21041110) as commit 8872fc22c267 ("ARM: dts: Enable Broadcom Cygnus SoC").

Quoted 18 lines
 arch/arm/boot/dts/Makefile              |    4 ++
 arch/arm/boot/dts/bcm-cygnus-clock.dtsi |   73 ++++++++++++++++++++++
 arch/arm/boot/dts/bcm-cygnus.dtsi       |  100 +++++++++++++++++++++++++++++++
 arch/arm/boot/dts/bcm911360_entphn.dts  |   32 ++++++++++
 arch/arm/boot/dts/bcm911360k.dts        |   32 ++++++++++
 arch/arm/boot/dts/bcm958300k.dts        |   32 ++++++++++
 6 files changed, 273 insertions(+)
 create mode 100644 arch/arm/boot/dts/bcm-cygnus-clock.dtsi
 create mode 100644 arch/arm/boot/dts/bcm-cygnus.dtsi
 create mode 100644 arch/arm/boot/dts/bcm911360_entphn.dts
 create mode 100644 arch/arm/boot/dts/bcm911360k.dts
 create mode 100644 arch/arm/boot/dts/bcm958300k.dts
arch/arm/boot/dts/Makefile +0 -0
index 38c89ca..4b3a590 100644

arch/arm/boot/dts/Makefile dtb-$(CONFIG_ARCH_AT91) += at91-sama5d4ek.dtb · line 63

Quoted 10 lines
arch/arm/boot/dts/Makefile +4 -0
@@ -54,6 +54,10 @@ dtb-$(CONFIG_ARCH_AT91)	+= at91-sama5d4ek.dtb
 dtb-$(CONFIG_ARCH_ATLAS6) += atlas6-evb.dtb
 dtb-$(CONFIG_ARCH_AXXIA) += axm5516-amarillo.dtb
 dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b.dtb
+dtb-$(CONFIG_ARCH_BCM_CYGNUS) += \
+	bcm911360_entphn.dtb \
+	bcm911360k.dtb \
+	bcm958300k.dtb
 dtb-$(CONFIG_ARCH_BCM_5301X) += bcm4708-netgear-r6250.dtb
 dtb-$(CONFIG_ARCH_BCM_63XX) += bcm963138dvt.dtb
 dtb-$(CONFIG_ARCH_BCM_MOBILE) += bcm28155-ap.dtb \

Without patch 1/8 ("ARM: cygnus: Initial support for Broadcom Cygnus SoC") CONFIG_ARCH_BCM_CYGNUS will not be set. I guess patch 1/8 will be added to linux-next one of these days. Is that correct?

Paul Bolle

#107 lore raw

Re: [PATCH v9 4/8] ARM: dts: Enable Broadcom Cygnus SoC

Quoted 37 lines · Paul Bolle
Quoted 8 lines · Scott Branden

DT files to enable cygnus consisting on reference designs and cygnus core configuration.

This landed in today's linux-next (ie, next-21041110) as commit 8872fc22c267 ("ARM: dts: Enable Broadcom Cygnus SoC").

Quoted 24 lines
 arch/arm/boot/dts/Makefile              |    4 ++
 arch/arm/boot/dts/bcm-cygnus-clock.dtsi |   73 ++++++++++++++++++++++
 arch/arm/boot/dts/bcm-cygnus.dtsi       |  100 +++++++++++++++++++++++++++++++
 arch/arm/boot/dts/bcm911360_entphn.dts  |   32 ++++++++++
 arch/arm/boot/dts/bcm911360k.dts        |   32 ++++++++++
 arch/arm/boot/dts/bcm958300k.dts        |   32 ++++++++++
 6 files changed, 273 insertions(+)
 create mode 100644 arch/arm/boot/dts/bcm-cygnus-clock.dtsi
 create mode 100644 arch/arm/boot/dts/bcm-cygnus.dtsi
 create mode 100644 arch/arm/boot/dts/bcm911360_entphn.dts
 create mode 100644 arch/arm/boot/dts/bcm911360k.dts
 create mode 100644 arch/arm/boot/dts/bcm958300k.dts
arch/arm/boot/dts/Makefile +3 -0
index 38c89ca..4b3a590 100644
@@ -54,6 +54,10 @@ dtb-$(CONFIG_ARCH_AT91)    += at91-sama5d4ek.dtb
 dtb-$(CONFIG_ARCH_ATLAS6) += atlas6-evb.dtb
 dtb-$(CONFIG_ARCH_AXXIA) += axm5516-amarillo.dtb
 dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b.dtb
+dtb-$(CONFIG_ARCH_BCM_CYGNUS) += \
+     bcm911360_entphn.dtb \
+     bcm911360k.dtb \
Quoted 8 lines

arch/arm/boot/dts/Makefile dtb-$(CONFIG_ARCH_AT91) += at91-sama5d4ek.dtb · line 63

Quoted 4 lines
arch/arm/boot/dts/Makefile +1 -0
+     bcm958300k.dtb
 dtb-$(CONFIG_ARCH_BCM_5301X) += bcm4708-netgear-r6250.dtb
 dtb-$(CONFIG_ARCH_BCM_63XX) += bcm963138dvt.dtb
 dtb-$(CONFIG_ARCH_BCM_MOBILE) += bcm28155-ap.dtb \

Without patch 1/8 ("ARM: cygnus: Initial support for Broadcom Cygnus SoC") CONFIG_ARCH_BCM_CYGNUS will not be set. I guess patch 1/8 will be added to linux-next one of these days. Is that correct?

Yes.

-Olof

#108 lore raw

Re: [PATCH v9 4/8] ARM: dts: Enable Broadcom Cygnus SoC

Quoted 5 lines · Olof Johansson
Quoted 2 lines · Paul Bolle

I guess patch 1/8 will be added to linux-next one of these days. Is that correct?

Yes.

Thanks.

Paul Bolle

author maintainer
#109 lore raw

PATCH v9 5/8 MAINTAINERS: Entry for Cygnus/iproc arm architecture

In reply to Scott Branden
---
 MAINTAINERS |   14 ++++++++++++++
 1 file changed, 14 insertions(+)
MAINTAINERS +14 -0
index dab92a7..15a3d89 100644
@@ -2129,6 +2129,20 @@ L:	linux-scsi at vger.kernel.org
 S:	Supported
 F:	drivers/scsi/bnx2i/
 
+BROADCOM CYGNUS/IPROC ARM ARCHITECTURE
+M:	Ray Jui <[email protected]>
+M:	Scott Branden <[email protected]>
+L:	linux-arm-kernel at lists.infradead.org (moderated for non-subscribers)
+L:	bcm-kernel-feedback-list at broadcom.com
+T:	git git://git.github.com/brcm/linux.git
+S:	Maintained
+N:	iproc
+N:	cygnus
+N:	bcm9113*
+N:	bcm9583*
+N:	bcm583*
+N:	bcm113*
+
 BROADCOM KONA GPIO DRIVER
 M:	Ray Jui <[email protected]>
 L:	bcm-kernel-feedback-list at broadcom.com
Signature · 1 line
1.7.9.5
author maintainer
#110 lore raw

PATCH v9 6/8 ARM: mach-bcm: Consolidate currently supported IPROC SoCs

In reply to Scott Branden

Move ARCH_BCM_5301X subarch under ARCH_IPROC architecture. Additional IPROC chipsets that share a lot of commonality should be added under ARCH_IPROC as well.

---
 arch/arm/mach-bcm/Kconfig |   37 ++++++++++++++++---------------------
 1 file changed, 16 insertions(+), 21 deletions(-)
arch/arm/mach-bcm/Kconfig +16 -21
index 73d95c2..6e79696 100644
@@ -35,6 +35,22 @@ config ARCH_BCM_CYGNUS
 	  BCM11300, BCM11320, BCM11350, BCM11360,
 	  BCM58300, BCM58302, BCM58303, BCM58305.
 
+config ARCH_BCM_5301X
+	bool "Broadcom BCM470X / BCM5301X ARM SoC" if ARCH_MULTI_V7
+	select ARCH_BCM_IPROC
+	help
+	  Support for Broadcom BCM470X and BCM5301X SoCs with ARM CPU cores.
+
+	  This is a network SoC line mostly used in home routers and
+	  wifi access points, it's internal name is Northstar.
+	  This inclused the following SoC: BCM53010, BCM53011, BCM53012,
+	  BCM53014, BCM53015, BCM53016, BCM53017, BCM53018, BCM4707,
+	  BCM4708 and BCM4709.
+
+	  Do not confuse this with the BCM4760 which is a totally
+	  different SoC or with the older BCM47XX and BCM53XX based
+	  network SoC using a MIPS CPU, they are supported by arch/mips/bcm47xx
+
 config ARCH_BCM_MOBILE
 	bool "Broadcom Mobile SoC Support" if ARCH_MULTI_V7
 	select ARCH_REQUIRE_GPIOLIB
@@ -110,27 +126,6 @@ config ARCH_BCM2835
 	  This enables support for the Broadcom BCM2835 SoC. This SoC is
 	  used in the Raspberry Pi and Roku 2 devices.
 
-config ARCH_BCM_5301X
-	bool "Broadcom BCM470X / BCM5301X ARM SoC" if ARCH_MULTI_V7
-	select ARM_GIC
-	select CACHE_L2X0
-	select HAVE_ARM_SCU if SMP
-	select HAVE_ARM_TWD if SMP
-	select ARM_GLOBAL_TIMER
-	select CLKSRC_ARM_GLOBAL_TIMER_SCHED_CLOCK
-	help
-	  Support for Broadcom BCM470X and BCM5301X SoCs with ARM CPU cores.
-
-	  This is a network SoC line mostly used in home routers and
-	  wifi access points, it's internal name is Northstar.
-	  This inclused the following SoC: BCM53010, BCM53011, BCM53012,
-	  BCM53014, BCM53015, BCM53016, BCM53017, BCM53018, BCM4707,
-	  BCM4708 and BCM4709.
-
-	  Do not confuse this with the BCM4760 which is a totally
-	  different SoC or with the older BCM47XX and BCM53XX based
-	  network SoC using a MIPS CPU, they are supported by arch/mips/bcm47xx
-
 config ARCH_BCM_63XX
 	bool "Broadcom BCM63xx DSL SoC" if ARCH_MULTI_V7
 	depends on MMU
Signature · 1 line
1.7.9.5
author maintainer
#111 lore raw

PATCH v9 7/8 ARM: mach-bcm: ARCH_BCM_MOBILE: remove one level of menu from Kconfig

In reply to Scott Branden

remove menu "Broadcom Mobile SoC Selection"
This requires:
- selecting ARCH_BCM_MOBILE based on SoC selections
- fixup bcm_defconfig and multi_v7_defconfig to work with new menu levels.

---
 arch/arm/configs/bcm_defconfig      |    3 ++-
 arch/arm/configs/multi_v7_defconfig |    3 ++-
 arch/arm/mach-bcm/Kconfig           |   26 ++++++++++----------------
 3 files changed, 14 insertions(+), 18 deletions(-)
arch/arm/configs/bcm_defconfig +2 -1
index bc614f4..83a87e4 100644
@@ -25,7 +25,8 @@ CONFIG_MODULE_UNLOAD=y
 # CONFIG_BLK_DEV_BSG is not set
 CONFIG_PARTITION_ADVANCED=y
 CONFIG_ARCH_BCM=y
-CONFIG_ARCH_BCM_MOBILE=y
+CONFIG_ARCH_BCM_21664=y
+CONFIG_ARCH_BCM_281XX=y
 CONFIG_ARM_THUMBEE=y
 CONFIG_SMP=y
 CONFIG_PREEMPT=y
arch/arm/configs/multi_v7_defconfig +2 -1
index f1dc7fc..6e0d7cb 100644
@@ -17,7 +17,8 @@ CONFIG_MACH_ARMADA_38X=y
 CONFIG_MACH_ARMADA_XP=y
 CONFIG_MACH_DOVE=y
 CONFIG_ARCH_BCM=y
-CONFIG_ARCH_BCM_MOBILE=y
+CONFIG_ARCH_BCM_21664=y
+CONFIG_ARCH_BCM_281XX=y
 CONFIG_ARCH_BCM_5301X=y
 CONFIG_ARCH_BRCMSTB=y
 CONFIG_ARCH_BERLIN=y
arch/arm/mach-bcm/Kconfig +10 -16
index 6e79696..cceb69f 100644
@@ -51,8 +51,10 @@ config ARCH_BCM_5301X
 	  different SoC or with the older BCM47XX and BCM53XX based
 	  network SoC using a MIPS CPU, they are supported by arch/mips/bcm47xx
 
+comment "KONA architected SoCs"
+
 config ARCH_BCM_MOBILE
-	bool "Broadcom Mobile SoC Support" if ARCH_MULTI_V7
+	bool
 	select ARCH_REQUIRE_GPIOLIB
 	select ARM_ERRATA_754322
 	select ARM_ERRATA_775420
@@ -61,16 +63,13 @@ config ARCH_BCM_MOBILE
 	select TICK_ONESHOT
 	select HAVE_ARM_ARCH_TIMER
 	select PINCTRL
+	select ARCH_BCM_MOBILE_SMP if SMP
 	help
 	  This enables support for systems based on Broadcom mobile SoCs.
 
-if ARCH_BCM_MOBILE
-
-menu "Broadcom Mobile SoC Selection"
-
 config ARCH_BCM_281XX
 	bool "Broadcom BCM281XX SoC family"
-	default y
+	select ARCH_BCM_MOBILE
 	select HAVE_SMP
 	help
 	  Enable support for the BCM281XX family, which includes
@@ -79,7 +78,7 @@ config ARCH_BCM_281XX
 
 config ARCH_BCM_21664
 	bool "Broadcom BCM21664 SoC family"
-	default y
+	select ARCH_BCM_MOBILE
 	select HAVE_SMP
 	help
 	  Enable support for the BCM21664 family, which includes
@@ -87,19 +86,18 @@ config ARCH_BCM_21664
 
 config ARCH_BCM_MOBILE_L2_CACHE
 	bool "Broadcom mobile SoC level 2 cache support"
-	depends on (ARCH_BCM_281XX || ARCH_BCM_21664)
+	depends on ARCH_BCM_MOBILE
 	default y
 	select CACHE_L2X0
 	select ARCH_BCM_MOBILE_SMC
 
 config ARCH_BCM_MOBILE_SMC
 	bool
-	depends on ARCH_BCM_281XX || ARCH_BCM_21664
+	depends on ARCH_BCM_MOBILE
 
 config ARCH_BCM_MOBILE_SMP
-	bool "Broadcom mobile SoC SMP support"
-	depends on (ARCH_BCM_281XX || ARCH_BCM_21664) && SMP
-	default y
+	bool
+	depends on ARCH_BCM_MOBILE
 	select HAVE_ARM_SCU
 	select ARM_ERRATA_764369
 	help
@@ -107,10 +105,6 @@ config ARCH_BCM_MOBILE_SMP
 	  Provided as an option so SMP support for SoCs of this type
 	  can be disabled for an SMP-enabled kernel.
 
-endmenu
-
-endif
-
 comment "Other Architectures"
 
 config ARCH_BCM2835
Signature · 1 line
1.7.9.5
author maintainer
#112 lore raw

PATCH v9 8/8 ARM: multi_v7_defconfig: Enable Broadcom Cygnus

In reply to Scott Branden

From: Ray Jui <[email protected]>

Enable Broadcom Cygnus platform support in multi_v7_defconfig

---
 arch/arm/configs/multi_v7_defconfig |   18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
arch/arm/configs/multi_v7_defconfig +18 -0
index 6e0d7cb..c72afb1 100644
@@ -17,6 +17,7 @@ CONFIG_MACH_ARMADA_38X=y
 CONFIG_MACH_ARMADA_XP=y
 CONFIG_MACH_DOVE=y
 CONFIG_ARCH_BCM=y
+CONFIG_ARCH_BCM_CYGNUS=y
 CONFIG_ARCH_BCM_21664=y
 CONFIG_ARCH_BCM_281XX=y
 CONFIG_ARCH_BCM_5301X=y
@@ -125,8 +126,12 @@ CONFIG_DMA_CMA=y
 CONFIG_CMA_SIZE_MBYTES=64
 CONFIG_OMAP_OCP2SCP=y
 CONFIG_MTD=y
+CONFIG_MTD_CMDLINE_PARTS=y
+CONFIG_MTD_BLOCK=y
 CONFIG_MTD_M25P80=y
+CONFIG_MTD_NAND=y
 CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_UBI=y
 CONFIG_BLK_DEV_LOOP=y
 CONFIG_AD525X_DPOT=y
 CONFIG_AD525X_DPOT_I2C=y
@@ -161,6 +166,7 @@ CONFIG_TI_CPSW=y
 CONFIG_XILINX_EMACLITE=y
 CONFIG_AT803X_PHY=y
 CONFIG_MARVELL_PHY=y
+CONFIG_BROADCOM_PHY=y
 CONFIG_ICPLUS_PHY=y
 CONFIG_USB_PEGASUS=y
 CONFIG_USB_USBNET=y
@@ -234,6 +240,7 @@ CONFIG_SPI_TEGRA114=y
 CONFIG_SPI_TEGRA20_SFLASH=y
 CONFIG_SPI_TEGRA20_SLINK=y
 CONFIG_SPI_XILINX=y
+CONFIG_SPI_SPIDEV=y
 CONFIG_PINCTRL_AS3722=y
 CONFIG_PINCTRL_PALMAS=y
 CONFIG_GPIO_SYSFS=y
@@ -260,6 +267,7 @@ CONFIG_ST_THERMAL_SYSCFG=y
 CONFIG_ST_THERMAL_MEMMAP=y
 CONFIG_WATCHDOG=y
 CONFIG_XILINX_WATCHDOG=y
+CONFIG_ARM_SP805_WATCHDOG=y
 CONFIG_ORION_WATCHDOG=y
 CONFIG_SUNXI_WATCHDOG=y
 CONFIG_MESON_WATCHDOG=y
@@ -307,6 +315,8 @@ CONFIG_FRAMEBUFFER_CONSOLE=y
 CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
 CONFIG_SOUND=y
 CONFIG_SND=y
+CONFIG_SND_DYNAMIC_MINORS=y
+CONFIG_SND_USB_AUDIO=y
 CONFIG_SND_SOC=y
 CONFIG_SND_SOC_TEGRA=y
 CONFIG_SND_SOC_TEGRA_RT5640=y
@@ -429,7 +439,12 @@ CONFIG_TI_PIPE3=y
 CONFIG_PHY_MIPHY365X=y
 CONFIG_PHY_SUN4I_USB=y
 CONFIG_EXT4_FS=y
+CONFIG_AUTOFS4_FS=y
+CONFIG_MSDOS_FS=y
 CONFIG_VFAT_FS=y
+CONFIG_NTFS_FS=y
+CONFIG_TMPFS_POSIX_ACL=y
+CONFIG_UBIFS_FS=y
 CONFIG_TMPFS=y
 CONFIG_SQUASHFS=y
 CONFIG_SQUASHFS_LZO=y
@@ -438,6 +453,9 @@ CONFIG_NFS_FS=y
 CONFIG_NFS_V3_ACL=y
 CONFIG_NFS_V4=y
 CONFIG_ROOT_NFS=y
+CONFIG_NLS_CODEPAGE_437=y
+CONFIG_NLS_ISO8859_1=y
+CONFIG_NLS_UTF8=y
 CONFIG_PRINTK_TIME=y
 CONFIG_DEBUG_FS=y
 CONFIG_MAGIC_SYSRQ=y
Signature · 1 line
1.7.9.5
author maintainer
#113 lore raw

v2 cover sdhci-bcm2835: added quirk and removed udelay in write ops

In reply to a message not in the archive

This patch contains driver cleanup of sdhci-bcm2835. Please note that this has not actually been tested on bcm2835 yet. Testing comes from other devices with the same sdhci controller.

This patch is being put out for testing and acceptance on the 2835. Please test and comment.

Scott Branden (5):
mmc: sdhci-bcm2835: group read and write functions to improve
readability
mmc: sdhci-bcm2835: make shift calculations consistent
mmc: shdci-bcm2835: add efficient back-to-back write workaround
mmc: shdci-bcm2835: add verify for 32-bit back-to-back workaround
mmc: sdhci-bcm2835: add sdhci quirk
SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12

 drivers/mmc/host/Kconfig         |    9 ++
 drivers/mmc/host/sdhci-bcm2835.c |  172 +++++++++++++++++++++-----------------
 2 files changed, 105 insertions(+), 76 deletions(-)
Signature · 1 line
1.7.9.5
author maintainer
#114 lore raw

PATCH v2 1/5 mmc: sdhci-bcm2835: group read and write functions to improve readability

Group the read and write functions to improve readability. Now all similar functions are grouped together to evaluate behaviours.

---
 drivers/mmc/host/sdhci-bcm2835.c |   61 +++++++++++++++++++-------------------
 1 file changed, 31 insertions(+), 30 deletions(-)
drivers/mmc/host/sdhci-bcm2835.c +31 -30
index 439d259..c8ee02c 100644
@@ -54,13 +54,6 @@ struct bcm2835_sdhci {
 	u32 shadow;
 };
 
-static void bcm2835_sdhci_writel(struct sdhci_host *host, u32 val, int reg)
-{
-	writel(val, host->ioaddr + reg);
-
-	udelay(BCM2835_SDHCI_WRITE_DELAY);
-}
-
 static inline u32 bcm2835_sdhci_readl(struct sdhci_host *host, int reg)
 {
 	u32 val = readl(host->ioaddr + reg);
@@ -71,6 +64,34 @@ static inline u32 bcm2835_sdhci_readl(struct sdhci_host *host, int reg)
 	return val;
 }
 
+static u16 bcm2835_sdhci_readw(struct sdhci_host *host, int reg)
+{
+	u32 val = bcm2835_sdhci_readl(host, (reg & ~3));
+	u32 word_num = (reg >> 1) & 1;
+	u32 word_shift = word_num * 16;
+	u32 word = (val >> word_shift) & 0xffff;
+
+	return word;
+}
+
+static u8 bcm2835_sdhci_readb(struct sdhci_host *host, int reg)
+{
+	u32 val = bcm2835_sdhci_readl(host, (reg & ~3));
+	u32 byte_num = reg & 3;
+	u32 byte_shift = byte_num * 8;
+	u32 byte = (val >> byte_shift) & 0xff;
+
+	return byte;
+}
+
+static void bcm2835_sdhci_writel(struct sdhci_host *host, u32 val, int reg)
+{
+	writel(val, host->ioaddr + reg);
+
+	udelay(BCM2835_SDHCI_WRITE_DELAY);
+}
+
+
 static void bcm2835_sdhci_writew(struct sdhci_host *host, u16 val, int reg)
 {
 	struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
@@ -88,16 +109,6 @@ static void bcm2835_sdhci_writew(struct sdhci_host *host, u16 val, int reg)
 		bcm2835_sdhci_writel(host, newval, reg & ~3);
 }
 
-static u16 bcm2835_sdhci_readw(struct sdhci_host *host, int reg)
-{
-	u32 val = bcm2835_sdhci_readl(host, (reg & ~3));
-	u32 word_num = (reg >> 1) & 1;
-	u32 word_shift = word_num * 16;
-	u32 word = (val >> word_shift) & 0xffff;
-
-	return word;
-}
-
 static void bcm2835_sdhci_writeb(struct sdhci_host *host, u8 val, int reg)
 {
 	u32 oldval = bcm2835_sdhci_readl(host, reg & ~3);
@@ -109,28 +120,18 @@ static void bcm2835_sdhci_writeb(struct sdhci_host *host, u8 val, int reg)
 	bcm2835_sdhci_writel(host, newval, reg & ~3);
 }
 
-static u8 bcm2835_sdhci_readb(struct sdhci_host *host, int reg)
-{
-	u32 val = bcm2835_sdhci_readl(host, (reg & ~3));
-	u32 byte_num = reg & 3;
-	u32 byte_shift = byte_num * 8;
-	u32 byte = (val >> byte_shift) & 0xff;
-
-	return byte;
-}
-
 static unsigned int bcm2835_sdhci_get_min_clock(struct sdhci_host *host)
 {
 	return MIN_FREQ;
 }
 
 static const struct sdhci_ops bcm2835_sdhci_ops = {
-	.write_l = bcm2835_sdhci_writel,
-	.write_w = bcm2835_sdhci_writew,
-	.write_b = bcm2835_sdhci_writeb,
 	.read_l = bcm2835_sdhci_readl,
 	.read_w = bcm2835_sdhci_readw,
 	.read_b = bcm2835_sdhci_readb,
+	.write_l = bcm2835_sdhci_writel,
+	.write_w = bcm2835_sdhci_writew,
+	.write_b = bcm2835_sdhci_writeb,
 	.set_clock = sdhci_set_clock,
 	.get_max_clock = sdhci_pltfm_clk_get_max_clock,
 	.get_min_clock = bcm2835_sdhci_get_min_clock,
Signature · 1 line
1.7.9.5
author maintainer
#115 lore raw

PATCH v2 2/5 mmc: sdhci-bcm2835: make shift calculations consistent

In reply to Scott Branden

Make the shift calculations consistent rather than having different implementations to calculate the same thing.

---
 drivers/mmc/host/sdhci-bcm2835.c |   18 ++++++------------
 1 file changed, 6 insertions(+), 12 deletions(-)
drivers/mmc/host/sdhci-bcm2835.c +6 -12
index c8ee02c..b6cb365 100644
@@ -54,6 +54,8 @@ struct bcm2835_sdhci {
 	u32 shadow;
 };
 
+#define REG_OFFSET_IN_BITS(reg) ((reg) << 3 & 0x18)
+
 static inline u32 bcm2835_sdhci_readl(struct sdhci_host *host, int reg)
 {
 	u32 val = readl(host->ioaddr + reg);
@@ -67,20 +69,14 @@ static inline u32 bcm2835_sdhci_readl(struct sdhci_host *host, int reg)
 static u16 bcm2835_sdhci_readw(struct sdhci_host *host, int reg)
 {
 	u32 val = bcm2835_sdhci_readl(host, (reg & ~3));
-	u32 word_num = (reg >> 1) & 1;
-	u32 word_shift = word_num * 16;
-	u32 word = (val >> word_shift) & 0xffff;
-
+	u16 word = val >> REG_OFFSET_IN_BITS(reg) & 0xffff;
 	return word;
 }
 
 static u8 bcm2835_sdhci_readb(struct sdhci_host *host, int reg)
 {
 	u32 val = bcm2835_sdhci_readl(host, (reg & ~3));
-	u32 byte_num = reg & 3;
-	u32 byte_shift = byte_num * 8;
-	u32 byte = (val >> byte_shift) & 0xff;
-
+	u8 byte = val >> REG_OFFSET_IN_BITS(reg) & 0xff;
 	return byte;
 }
 
@@ -98,8 +94,7 @@ static void bcm2835_sdhci_writew(struct sdhci_host *host, u16 val, int reg)
 	struct bcm2835_sdhci *bcm2835_host = pltfm_host->priv;
 	u32 oldval = (reg == SDHCI_COMMAND) ? bcm2835_host->shadow :
 		bcm2835_sdhci_readl(host, reg & ~3);
-	u32 word_num = (reg >> 1) & 1;
-	u32 word_shift = word_num * 16;
+	u32 word_shift = REG_OFFSET_IN_BITS(reg);
 	u32 mask = 0xffff << word_shift;
 	u32 newval = (oldval & ~mask) | (val << word_shift);
 
@@ -112,8 +107,7 @@ static void bcm2835_sdhci_writew(struct sdhci_host *host, u16 val, int reg)
 static void bcm2835_sdhci_writeb(struct sdhci_host *host, u8 val, int reg)
 {
 	u32 oldval = bcm2835_sdhci_readl(host, reg & ~3);
-	u32 byte_num = reg & 3;
-	u32 byte_shift = byte_num * 8;
+	u32 byte_shift = REG_OFFSET_IN_BITS(reg);
 	u32 mask = 0xff << byte_shift;
 	u32 newval = (oldval & ~mask) | (val << byte_shift);
 
Signature · 1 line
1.7.9.5
#116 lore raw

Re: [PATCHv2 2/5] mmc: sdhci-bcm2835: make shift calculations consistent

drivers/mmc/host/sdhci-bcm2835.c struct bcm2835_sdhci { · line 57

Quoted 6 lines · Scott Branden

Make the shift calculations consistent rather than having different implementations to calculate the same thing.

drivers/mmc/host/sdhci-bcm2835.c +1 -0
 
+#define REG_OFFSET_IN_BITS(reg) ((reg) << 3 & 0x18)

This should really be the following so people don't have to memorize operator precedence:

#define REG_OFFSET_IN_BITS(reg) (((reg) << 3) & 0x18)

(I've been bit by people mis-remembering precedence in very similar code...)

author maintainer
#117 lore raw

Re: [PATCHv2 2/5] mmc: sdhci-bcm2835: make shift calculations consistent

Quoted 6 lines · Stephen Warren
Quoted 4 lines · Scott Branden

Make the shift calculations consistent rather than having different implementations to calculate the same thing.

drivers/mmc/host/sdhci-bcm2835.c +0 -0
Quoted 9 lines
Quoted 1 line

+#define REG_OFFSET_IN_BITS(reg) ((reg) << 3 & 0x18)

This should really be the following so people don't have to memorize operator precedence:

#define REG_OFFSET_IN_BITS(reg) (((reg) << 3) & 0x18)

(I've been bit by people mis-remembering precedence in very similar code...)

Good idea.

author maintainer
#118 lore raw

PATCH v2 3/5 mmc: shdci-bcm2835: add efficient back-to-back write workaround

In reply to Scott Branden

The bcm2835 has clock domain issues when back to back writes to certain registers are written. The existing driver works around this issue with udelay. A more efficient method is to store the 8 and 16 bit writes to the registers affected and then write them as 32 bits at the appropriate time.

---
 drivers/mmc/host/sdhci-bcm2835.c |  103 ++++++++++++++++++++------------------
 1 file changed, 55 insertions(+), 48 deletions(-)
drivers/mmc/host/sdhci-bcm2835.c +55 -48
index b6cb365..f8c450a 100644
@@ -24,34 +24,9 @@
 #include <linux/mmc/host.h>
 #include "sdhci-pltfm.h"
 
-/*
- * 400KHz is max freq for card ID etc. Use that as min card clock. We need to
- * know the min to enable static calculation of max BCM2835_SDHCI_WRITE_DELAY.
- */
-#define MIN_FREQ 400000
-
-/*
- * The Arasan has a bugette whereby it may lose the content of successive
- * writes to registers that are within two SD-card clock cycles of each other
- * (a clock domain crossing problem). It seems, however, that the data
- * register does not have this problem, which is just as well - otherwise we'd
- * have to nobble the DMA engine too.
- *
- * This should probably be dynamically calculated based on the actual card
- * frequency. However, this is the longest we'll have to wait, and doesn't
- * seem to slow access down too much, so the added complexity doesn't seem
- * worth it for now.
- *
- * 1/MIN_FREQ is (max) time per tick of eMMC clock.
- * 2/MIN_FREQ is time for two ticks.
- * Multiply by 1000000 to get uS per two ticks.
- * *1000000 for uSecs.
- * +1 for hack rounding.
- */
-#define BCM2835_SDHCI_WRITE_DELAY	(((2 * 1000000) / MIN_FREQ) + 1)
-
-struct bcm2835_sdhci {
-	u32 shadow;
+struct bcm2835_sdhci_host {
+	u32 shadow_cmd;
+	u32 shadow_blk;
 };
 
 #define REG_OFFSET_IN_BITS(reg) ((reg) << 3 & 0x18)
@@ -80,33 +55,71 @@ static u8 bcm2835_sdhci_readb(struct sdhci_host *host, int reg)
 	return byte;
 }
 
-static void bcm2835_sdhci_writel(struct sdhci_host *host, u32 val, int reg)
+static inline void bcm2835_sdhci_writel(struct sdhci_host *host,
+						u32 val, int reg)
 {
 	writel(val, host->ioaddr + reg);
-
-	udelay(BCM2835_SDHCI_WRITE_DELAY);
 }
 
-
+/*
+ * The Arasan has a bugette whereby it may lose the content of successive
+ * writes to the same register that are within two SD-card clock cycles of
+ * each other (a clock domain crossing problem). The data
+ * register does not have this problem, which is just as well - otherwise we'd
+ * have to nobble the DMA engine too.
+ *
+ * This wouldn't be a problem with the code except that we can only write the
+ * controller with 32-bit writes.  So two different 16-bit registers are
+ * written back to back creates the problem.
+ *
+ * In reality, this only happens when SDHCI_BLOCK_SIZE and SDHCI_BLOCK_COUNT
+ * are written followed by SDHCI_TRANSFER_MODE and SDHCI_COMMAND.
+ * The BLOCK_SIZE and BLOCK_COUNT are meaningless until a command issued so
+ * the work around can be further optimized. We can keep shadow values of
+ * BLOCK_SIZE, BLOCK_COUNT, and TRANSFER_MODE until a COMMAND is issued.
+ * Then, write the BLOCK_SIZE+BLOCK_COUNT in a single 32-bit write followed
+ * by the TRANSFER+COMMAND in another 32-bit write.
+ */
 static void bcm2835_sdhci_writew(struct sdhci_host *host, u16 val, int reg)
 {
 	struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
-	struct bcm2835_sdhci *bcm2835_host = pltfm_host->priv;
-	u32 oldval = (reg == SDHCI_COMMAND) ? bcm2835_host->shadow :
-		bcm2835_sdhci_readl(host, reg & ~3);
+	struct bcm2835_sdhci_host *bcm2835_host = pltfm_host->priv;
 	u32 word_shift = REG_OFFSET_IN_BITS(reg);
 	u32 mask = 0xffff << word_shift;
-	u32 newval = (oldval & ~mask) | (val << word_shift);
-
-	if (reg == SDHCI_TRANSFER_MODE)
-		bcm2835_host->shadow = newval;
-	else
+	u32 oldval, newval;
+
+	if (reg == SDHCI_COMMAND) {
+		/* Write the block now as we are issuing a command */
+		if (bcm2835_host->shadow_blk != 0) {
+			bcm2835_sdhci_writel(host, bcm2835_host->shadow_blk,
+				SDHCI_BLOCK_SIZE);
+			bcm2835_host->shadow_blk = 0;
+		}
+		oldval = bcm2835_host->shadow_cmd;
+	} else if (reg == SDHCI_BLOCK_SIZE || reg == SDHCI_BLOCK_COUNT) {
+		/* Block size and count are stored in shadow reg */
+		oldval = bcm2835_host->shadow_blk;
+	} else {
+		/* Read reg, all other registers are not shadowed */
+		oldval = readl(host->ioaddr + (reg & ~3));
+	}
+	newval = (oldval & ~mask) | (val << word_shift);
+
+	if (reg == SDHCI_TRANSFER_MODE) {
+		/* Save the transfer mode until the command is issued */
+		bcm2835_host->shadow_cmd = newval;
+	} else if (reg == SDHCI_BLOCK_SIZE || reg == SDHCI_BLOCK_COUNT) {
+		/* Save the block info until the command is issued */
+		bcm2835_host->shadow_blk = newval;
+	} else {
+		/* Command or other regular 32-bit write */
 		bcm2835_sdhci_writel(host, newval, reg & ~3);
+	}
 }
 
 static void bcm2835_sdhci_writeb(struct sdhci_host *host, u8 val, int reg)
 {
-	u32 oldval = bcm2835_sdhci_readl(host, reg & ~3);
+	u32 oldval = readl(host->ioaddr + (reg & ~3));
 	u32 byte_shift = REG_OFFSET_IN_BITS(reg);
 	u32 mask = 0xff << byte_shift;
 	u32 newval = (oldval & ~mask) | (val << byte_shift);
@@ -114,11 +127,6 @@ static void bcm2835_sdhci_writeb(struct sdhci_host *host, u8 val, int reg)
 	bcm2835_sdhci_writel(host, newval, reg & ~3);
 }
 
-static unsigned int bcm2835_sdhci_get_min_clock(struct sdhci_host *host)
-{
-	return MIN_FREQ;
-}
-
 static const struct sdhci_ops bcm2835_sdhci_ops = {
 	.read_l = bcm2835_sdhci_readl,
 	.read_w = bcm2835_sdhci_readw,
@@ -128,7 +136,6 @@ static const struct sdhci_ops bcm2835_sdhci_ops = {
 	.write_b = bcm2835_sdhci_writeb,
 	.set_clock = sdhci_set_clock,
 	.get_max_clock = sdhci_pltfm_clk_get_max_clock,
-	.get_min_clock = bcm2835_sdhci_get_min_clock,
 	.set_bus_width = sdhci_set_bus_width,
 	.reset = sdhci_reset,
 	.set_uhs_signaling = sdhci_set_uhs_signaling,
@@ -143,7 +150,7 @@ static const struct sdhci_pltfm_data bcm2835_sdhci_pdata = {
 static int bcm2835_sdhci_probe(struct platform_device *pdev)
 {
 	struct sdhci_host *host;
-	struct bcm2835_sdhci *bcm2835_host;
+	struct bcm2835_sdhci_host *bcm2835_host;
 	struct sdhci_pltfm_host *pltfm_host;
 	int ret;
 
Signature · 1 line
1.7.9.5
#119 lore raw

Re: [PATCHv2 3/5] mmc: shdci-bcm2835: add efficient back-to-back write workaround

Quoted 7 lines · Scott Branden

The bcm2835 has clock domain issues when back to back writes to certain registers are written. The existing driver works around this issue with udelay. A more efficient method is to store the 8 and 16 bit writes to the registers affected and then write them as 32 bits at the appropriate time.

drivers/mmc/host/sdhci-bcm2835.c static u8 bcm2835_sdhci_readb(struct sdhci_host *host, int reg) · line 86

Quoted 8 lines
drivers/mmc/host/sdhci-bcm2835.c +1 -3
 
 static void bcm2835_sdhci_writew(struct sdhci_host *host, u16 val, int reg)
 {
 	struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
-	struct bcm2835_sdhci *bcm2835_host = pltfm_host->priv;
-	u32 oldval = (reg == SDHCI_COMMAND) ? bcm2835_host->shadow :
-		bcm2835_sdhci_readl(host, reg & ~3);
+	struct bcm2835_sdhci_host *bcm2835_host = pltfm_host->priv;

Is that type change for bcm2835_host really correct?

drivers/mmc/host/sdhci-bcm2835.c static u8 bcm2835_sdhci_readb(struct sdhci_host *host, int reg) · line 104

Quoted 3 lines
drivers/mmc/host/sdhci-bcm2835.c +3 -0
+	} else {
+		/* Read reg, all other registers are not shadowed */
+		oldval = readl(host->ioaddr + (reg & ~3));

Is there any reason to use readl() directly here rather than calling bcm2835_readl()? ...

drivers/mmc/host/sdhci-bcm2835.c static u8 bcm2835_sdhci_readb(struct sdhci_host *host, int reg) · line 122

Quoted 4 lines

static void bcm2835_sdhci_writeb(struct sdhci_host *host, u8 val, int reg) {

drivers/mmc/host/sdhci-bcm2835.c +1 -1
-	u32 oldval = bcm2835_sdhci_readl(host, reg & ~3);
+	u32 oldval = readl(host->ioaddr + (reg & ~3));

... and here in particular, since this seems like an unrelated change?

drivers/mmc/host/sdhci-bcm2835.c static const struct sdhci_pltfm_data bcm2835_sdhci_pdata = { · line 153

Quoted 5 lines

static int bcm2835_sdhci_probe(struct platform_device *pdev) {

drivers/mmc/host/sdhci-bcm2835.c +1 -1
 	struct sdhci_host *host;
-	struct bcm2835_sdhci *bcm2835_host;
+	struct bcm2835_sdhci_host *bcm2835_host;

Is that type change for bcm2835_host really correct?

author maintainer
#120 lore raw

Re: [PATCHv2 3/5] mmc: shdci-bcm2835: add efficient back-to-back write workaround

Quoted 9 lines · Stephen Warren
Quoted 7 lines · Scott Branden

The bcm2835 has clock domain issues when back to back writes to certain registers are written. The existing driver works around this issue with udelay. A more efficient method is to store the 8 and 16 bit writes to the registers affected and then write them as 32 bits at the appropriate time.

drivers/mmc/host/sdhci-bcm2835.c +0 -0
Quoted 9 lines

drivers/mmc/host/sdhci-bcm2835.c static u8 bcm2835_sdhci_readb(struct sdhci_host *host, int reg) · line 86

Quoted 7 lines
  static void bcm2835_sdhci_writew(struct sdhci_host *host, u16 val, int reg)
  {
  	struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
drivers/mmc/host/sdhci-bcm2835.c +1 -3
-	struct bcm2835_sdhci *bcm2835_host = pltfm_host->priv;
-	u32 oldval = (reg == SDHCI_COMMAND) ? bcm2835_host->shadow :
-		bcm2835_sdhci_readl(host, reg & ~3);
+	struct bcm2835_sdhci_host *bcm2835_host = pltfm_host->priv;

Is that type change for bcm2835_host really correct?

Yes - at the top of the patch the structure has been expanded and named appropriately.

-struct bcm2835_sdhci {
- u32 shadow;
+struct bcm2835_sdhci_host {
+ u32 shadow_cmd;
+ u32 shadow_blk;
};

Quoted 7 lines

drivers/mmc/host/sdhci-bcm2835.c static u8 bcm2835_sdhci_readb(struct sdhci_host *host, int reg) · line 104

Quoted 4 lines
drivers/mmc/host/sdhci-bcm2835.c +3 -0
+	} else {
+		/* Read reg, all other registers are not shadowed */
+		oldval = readl(host->ioaddr + (reg & ~3));

Is there any reason to use readl() directly here rather than calling bcm2835_readl()? ...

Yes, bcm2835_readl does not need to be called in read-modify-write and shadow register situations and just adds overhead. All that needs to be called is readl. bcm2835_readl has some existing ugly code in it to modify the capabilities register on a read function. This info never needs to be for write as you can't overwrite the capabilities register.
I hope to get rid of the capabilities hack in a future patch as this
should never have been acceptable in upstreamed code to begin with. The capabilities override should have been passed in through a device tree entry.

Quoted 7 lines

drivers/mmc/host/sdhci-bcm2835.c static u8 bcm2835_sdhci_readb(struct sdhci_host *host, int reg) · line 122

Quoted 5 lines
  static void bcm2835_sdhci_writeb(struct sdhci_host *host, u8 val, int reg)
  {
drivers/mmc/host/sdhci-bcm2835.c +1 -1
-	u32 oldval = bcm2835_sdhci_readl(host, reg & ~3);
+	u32 oldval = readl(host->ioaddr + (reg & ~3));

... and here in particular, since this seems like an unrelated change?

Same situation with bcm2835_readl above. No need to call in read-modify-write situations.

Quoted 9 lines

drivers/mmc/host/sdhci-bcm2835.c static const struct sdhci_pltfm_data bcm2835_sdhci_pdata = { · line 153

Quoted 6 lines
  static int bcm2835_sdhci_probe(struct platform_device *pdev)
  {
  	struct sdhci_host *host;
drivers/mmc/host/sdhci-bcm2835.c +1 -1
-	struct bcm2835_sdhci *bcm2835_host;
+	struct bcm2835_sdhci_host *bcm2835_host;

Is that type change for bcm2835_host really correct?

yes - structure renamed above

#121 lore raw

Re: [PATCHv2 3/5] mmc: shdci-bcm2835: add efficient back-to-back write workaround

Quoted 26 lines · Scott Branden
Quoted 20 lines · Stephen Warren
Quoted 14 lines · Scott Branden

The bcm2835 has clock domain issues when back to back writes to certain registers are written. The existing driver works around this issue with udelay. A more efficient method is to store the 8 and 16 bit writes to the registers affected and then write them as 32 bits at the appropriate
time.

drivers/mmc/host/sdhci-bcm2835.c +0 -0
 
  static void bcm2835_sdhci_writew(struct sdhci_host *host, u16 val,

int reg)

  {
      struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);

drivers/mmc/host/sdhci-bcm2835.c static u8 bcm2835_sdhci_readb(struct sdhci_host *host, int reg) · line 86

Quoted 4 lines
drivers/mmc/host/sdhci-bcm2835.c +1 -3
-    struct bcm2835_sdhci *bcm2835_host = pltfm_host->priv;
-    u32 oldval = (reg == SDHCI_COMMAND) ? bcm2835_host->shadow :
-        bcm2835_sdhci_readl(host, reg & ~3);
+    struct bcm2835_sdhci_host *bcm2835_host = pltfm_host->priv;
Quoted 1 line

Is that type change for bcm2835_host really correct?

Yes - at the top of the patch the structure has been expanded and named appropriately.

drivers/mmc/host/sdhci-bcm2835.c line 30

Quoted 6 lines
drivers/mmc/host/sdhci-bcm2835.c +3 -2
-struct bcm2835_sdhci {
-    u32 shadow;
+struct bcm2835_sdhci_host {
+    u32 shadow_cmd;
+    u32 shadow_blk;
 };

Ah yes, sorry for missing that.

Quoted 4 lines
Quoted 4 lines
Quoted 3 lines
drivers/mmc/host/sdhci-bcm2835.c +3 -0
+    } else {
+        /* Read reg, all other registers are not shadowed */
+        oldval = readl(host->ioaddr + (reg & ~3));
Quoted 8 lines
Quoted 2 lines

Is there any reason to use readl() directly here rather than calling bcm2835_readl()? ...

Yes, bcm2835_readl does not need to be called in read-modify-write and shadow register situations and just adds overhead. All that needs to be called is readl. bcm2835_readl has some existing ugly code in it to modify the capabilities register on a read function. This info never needs to be for write as you can't overwrite the capabilities register.

To be honest, it seems better to do all the read/write through consistent functions. One advantage of bcm2835_readl() is that it consistently adds on the base address internally so you don't have to write it out every time manually. Still, the code ought to work fine after this change, so I guess it's OK.

Quoted 4 lines

I hope to get rid of the capabilities hack in a future patch as this should never have been acceptable in upstreamed code to begin with. The capabilities override should have been passed in through a device tree entry.

It's a pretty common technique with precedent. I certainly don't agree that it should be configured by DT. Arguably, DT makes sense to describe board-to-board variations, but there's almost zero point putting data into DT that is SoC description rather than board description; just put it into the driver to avoid continually parsing the same data over and over from DT just to get back to the same data that could have been encoded into the driver. If the data varies between similar controllers, an of_match table can easily be used to parameterize it based on compatible value.

author maintainer
#122 lore raw

Re: [PATCHv2 3/5] mmc: shdci-bcm2835: add efficient back-to-back write workaround

Quoted 60 lines · Stephen Warren
Quoted 26 lines · Scott Branden
Quoted 20 lines · Stephen Warren
Quoted 14 lines · Scott Branden

The bcm2835 has clock domain issues when back to back writes to certain registers are written. The existing driver works around this issue with udelay. A more efficient method is to store the 8 and 16 bit writes to the registers affected and then write them as 32 bits at the appropriate
time.

drivers/mmc/host/sdhci-bcm2835.c +0 -0
 
   static void bcm2835_sdhci_writew(struct sdhci_host *host, u16 val,

int reg)

   {
       struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);

drivers/mmc/host/sdhci-bcm2835.c static u8 bcm2835_sdhci_readb(struct sdhci_host *host, int reg) · line 86

Quoted 4 lines
drivers/mmc/host/sdhci-bcm2835.c +1 -3
-    struct bcm2835_sdhci *bcm2835_host = pltfm_host->priv;
-    u32 oldval = (reg == SDHCI_COMMAND) ? bcm2835_host->shadow :
-        bcm2835_sdhci_readl(host, reg & ~3);
+    struct bcm2835_sdhci_host *bcm2835_host = pltfm_host->priv;
Quoted 1 line

Is that type change for bcm2835_host really correct?

Yes - at the top of the patch the structure has been expanded and named appropriately.

drivers/mmc/host/sdhci-bcm2835.c line 30

Quoted 6 lines
drivers/mmc/host/sdhci-bcm2835.c +3 -2
-struct bcm2835_sdhci {
-    u32 shadow;
+struct bcm2835_sdhci_host {
+    u32 shadow_cmd;
+    u32 shadow_blk;
  };

Ah yes, sorry for missing that.

Quoted 4 lines
Quoted 4 lines
Quoted 3 lines
drivers/mmc/host/sdhci-bcm2835.c +3 -0
+    } else {
+        /* Read reg, all other registers are not shadowed */
+        oldval = readl(host->ioaddr + (reg & ~3));
Quoted 8 lines
Quoted 2 lines

Is there any reason to use readl() directly here rather than calling bcm2835_readl()? ...

Yes, bcm2835_readl does not need to be called in read-modify-write and shadow register situations and just adds overhead. All that needs to be called is readl. bcm2835_readl has some existing ugly code in it to modify the capabilities register on a read function. This info never needs to be for write as you can't overwrite the capabilities register.

To be honest, it seems better to do all the read/write through consistent functions. One advantage of bcm2835_readl() is that it consistently adds on the base address internally so you don't have to write it out every time manually. Still, the code ought to work fine after this change, so I guess it's OK.

Quoted 4 lines

I hope to get rid of the capabilities hack in a future patch as this should never have been acceptable in upstreamed code to begin with. The capabilities override should have been passed in through a device tree entry.

Quoted 9 lines

It's a pretty common technique with precedent. I certainly don't agree that it should be configured by DT. Arguably, DT makes sense to describe board-to-board variations, but there's almost zero point putting data into DT that is SoC description rather than board description; just put it into the driver to avoid continually parsing the same data over and over from DT just to get back to the same data that could have been encoded into the driver. If the data varies between similar controllers, an of_match table can easily be used to parameterize it based on compatible value.

There is work to be done here or I will be unable to use this driver in our chipsets. Perhaps it will be easier having another driver actually... as the DMA seems quite different on RPI.

Quoted 1 line
author maintainer
#123 lore raw

PATCH v2 4/5 mmc: shdci-bcm2835: add verify for 32-bit back-to-back workaround

In reply to Scott Branden

Add a verify option to driver to print out an error message if a potential back to back write could cause a clock domain issue.

---
 drivers/mmc/host/Kconfig         |    9 +++++++++
 drivers/mmc/host/sdhci-bcm2835.c |   17 +++++++++++++++++
 2 files changed, 26 insertions(+)
drivers/mmc/host/Kconfig +9 -0
index 1386065..020de98 100644
@@ -292,6 +292,15 @@ config MMC_SDHCI_BCM2835
 
 	  If unsure, say N.
 
+config MMC_SDHCI_BCM2835_VERIFY_WORKAROUND
+	bool "Verify BCM2835 workaround does not do back to back writes"
+	depends on MMC_SDHCI_BCM2835
+	default y
+	help
+	  This enables code that verifies the bcm2835 workaround.
+	  The verification code checks that back to back writes to the same
+	  register do not occur.
+
 config MMC_MOXART
 	tristate "MOXART SD/MMC Host Controller support"
 	depends on ARCH_MOXART && MMC
drivers/mmc/host/sdhci-bcm2835.c +17 -0
index f8c450a..11af27f 100644
@@ -27,6 +27,9 @@
 struct bcm2835_sdhci_host {
 	u32 shadow_cmd;
 	u32 shadow_blk;
+#ifdef CONFIG_MMC_SDHCI_BCM2835_VERIFY_WORKAROUND
+	int previous_reg;
+#endif
 };
 
 #define REG_OFFSET_IN_BITS(reg) ((reg) << 3 & 0x18)
@@ -58,6 +61,20 @@ static u8 bcm2835_sdhci_readb(struct sdhci_host *host, int reg)
 static inline void bcm2835_sdhci_writel(struct sdhci_host *host,
 						u32 val, int reg)
 {
+#ifdef CONFIG_MMC_SDHCI_BCM2835_VERIFY_WORKAROUND
+	struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
+	struct bcm2835_sdhci_host *bcm2835_host = pltfm_host->priv;
+
+	if (bcm2835_host->previous_reg == reg) {
+		if ((reg != SDHCI_HOST_CONTROL)
+			&& (reg != SDHCI_CLOCK_CONTROL)) {
+			dev_err(mmc_dev(host->mmc),
+			"back-to-back write to 0x%x\n", reg);
+		}
+	}
+	bcm2835_host->previous_reg = reg;
+#endif
+
 	writel(val, host->ioaddr + reg);
 }
 
Signature · 1 line
1.7.9.5
#124 lore raw

Re: [PATCHv2 4/5] mmc: shdci-bcm2835: add verify for 32-bit back-to-back workaround

Quoted 7 lines · Scott Branden

Add a verify option to driver to print out an error message if a potential back to back write could cause a clock domain issue.

drivers/mmc/host/sdhci-bcm2835.c +0 -0
 
 static inline void bcm2835_sdhci_writel(struct sdhci_host *host,
 						u32 val, int reg)

drivers/mmc/host/sdhci-bcm2835.c static u8 bcm2835_sdhci_readb(struct sdhci_host *host, int reg) · line 72

Quoted 10 lines
drivers/mmc/host/sdhci-bcm2835.c +9 -0
 {
+#ifdef CONFIG_MMC_SDHCI_BCM2835_VERIFY_WORKAROUND
+	struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
+	struct bcm2835_sdhci_host *bcm2835_host = pltfm_host->priv;
+
+	if (bcm2835_host->previous_reg == reg) {
+		if ((reg != SDHCI_HOST_CONTROL)
+			&& (reg != SDHCI_CLOCK_CONTROL)) {
+			dev_err(mmc_dev(host->mmc),
+			"back-to-back write to 0x%x\n", reg);

This fires a *ton* on reg 0x20 and 0x30 on my rev 2 model B with the patches applied on top of next-20141031. Without the patches applied, everything works fine. As far as I can tell, SD card accesses no longer work (or perhaps there's just so much log spew over serial that it takes more than 1.5 minutes to get to the login prompt).

author maintainer
#125 lore raw

Re: [PATCHv2 4/5] mmc: shdci-bcm2835: add verify for 32-bit back-to-back workaround

Quoted 16 lines · Stephen Warren
Quoted 15 lines · Scott Branden

Add a verify option to driver to print out an error message if a potential back to back write could cause a clock domain issue.

drivers/mmc/host/sdhci-bcm2835.c +7 -0
 
  static inline void bcm2835_sdhci_writel(struct sdhci_host *host,
  						u32 val, int reg)
  {
+#ifdef CONFIG_MMC_SDHCI_BCM2835_VERIFY_WORKAROUND
+	struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
+	struct bcm2835_sdhci_host *bcm2835_host = pltfm_host->priv;
+
+	if (bcm2835_host->previous_reg == reg) {
+		if ((reg != SDHCI_HOST_CONTROL)
+			&& (reg != SDHCI_CLOCK_CONTROL)) {
Quoted 9 lines

drivers/mmc/host/sdhci-bcm2835.c static u8 bcm2835_sdhci_readb(struct sdhci_host *host, int reg) · line 72

Quoted 2 lines
drivers/mmc/host/sdhci-bcm2835.c +2 -0
+			dev_err(mmc_dev(host->mmc),
+			"back-to-back write to 0x%x\n", reg);

This fires a *ton* on reg 0x20 and 0x30 on my rev 2 model B with the patches applied on top of next-20141031. Without the patches applied, everything works fine. As far as I can tell, SD card accesses no longer work (or perhaps there's just so much log spew over serial that it takes more than 1.5 minutes to get to the login prompt).

Thanks for testing. Like I said in the cover message - I've never run this on a PI actually. I've run it on other hardware with the same core arasan block having the same clock domain issue. The registers printed out do not have the clock domain issue - I'm still getting more details from the silicon designers on this.

Without the verify patch the performance is actually quite good. See tests result from Piotr:

Quoted 2 lines · Scott Branden

Please let me know how this works for you.

Scott,
please ignore my previous mail I made mistake when applying patches.

Results of testing your code on top of 3.18-rc2 with Kingston SDC10/8GB:

* when compiling with CONFIG_MMC_SDHCI_BCM2835_VERIFY_WORKAROUND=y there is a lot of:

sdhci-bcm2835 20300000.sdhci: back-to-back write to 0x30 and
sdhci-bcm2835 20300000.sdhci: back-to-back write to 0x20

* performance w/o patches:

yncraspberrypi:~$ sync; time dd if=/dev/zero of=~/test.tmp bs=500K count=1024; sy
1024+0 records in
1024+0 records out
524288000 bytes (524 MB) copied, 787.384 s, 666 kB/s
real    13m7.404s
user    0m0.080s
sys     0m56.300s
pi@raspberrypi:~$ time dd if=~/test.tmp of=/dev/null bs=500K count=1024
1024+0 records in
1024+0 records out
524288000 bytes (524 MB) copied, 34.2115 s, 15.3 MB/s
real    0m34.232s
user    0m0.020s
sys     0m31.190s

* performance w/ patches is great IMHO:

yncraspberrypi:~$ sync; time dd if=/dev/zero of=~/test.tmp bs=500K count=1024; sy
1024+0 records in
1024+0 records out
524288000 bytes (524 MB) copied, 45.4886 s, 11.5 MB/s
real    0m45.515s
user    0m0.060s
sys     0m30.050s time dd if=~/test.tmp of=/dev/null bs=500K count=1024

1024+0 records in
1024+0 records out
524288000 bytes (524 MB) copied, 33.6292 s, 15.6 MB/s

real    0m33.649s
user    0m0.020s
sys     0m30.730s

Great work!

Have you got plans to enable DMA for this controller ? sys CPU load is quite big for above code, my tests with bcm2835-mmc and slave_sg from RaspberryPi Foundation gives about 15s instead of 31s. It would be great to relive CPU a little bit.

Best Regards,
Piotr Król

#126 lore raw

Re: [PATCHv2 4/5] mmc: shdci-bcm2835: add verify for 32-bit back-to-back workaround

In reply to Scott Branden

drivers/mmc/host/sdhci-bcm2835.c static u8 bcm2835_sdhci_readb(struct sdhci_host *host, int reg) · line 70

Quoted 12 lines · Scott Branden

Add a verify option to driver to print out an error message if a potential back to back write could cause a clock domain issue.

index f8c450a..11af27f 100644

drivers/mmc/host/sdhci-bcm2835.c +7 -0
+#ifdef CONFIG_MMC_SDHCI_BCM2835_VERIFY_WORKAROUND
+	struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
+	struct bcm2835_sdhci_host *bcm2835_host = pltfm_host->priv;
+
+	if (bcm2835_host->previous_reg == reg) {
+		if ((reg != SDHCI_HOST_CONTROL)
+			&& (reg != SDHCI_CLOCK_CONTROL)) {

The comment in patch 3 says the problem doesn't apply to the data register. Why does this check for these two registers rather than data?

drivers/mmc/host/sdhci-bcm2835.c static u8 bcm2835_sdhci_readb(struct sdhci_host *host, int reg) · line 72

Quoted 2 lines
drivers/mmc/host/sdhci-bcm2835.c +2 -0
+			dev_err(mmc_dev(host->mmc),
+			"back-to-back write to 0x%x\n", reg);

The continuation line should be indented at least one more level here.

author maintainer
#127 lore raw

Re: [PATCHv2 4/5] mmc: shdci-bcm2835: add verify for 32-bit back-to-back workaround

Quoted 6 lines · Stephen Warren
Quoted 4 lines · Scott Branden

Add a verify option to driver to print out an error message if a potential back to back write could cause a clock domain issue.

index f8c450a..11af27f 100644

Quoted 10 lines

drivers/mmc/host/sdhci-bcm2835.c static u8 bcm2835_sdhci_readb(struct sdhci_host *host, int reg) · line 70

Quoted 7 lines
drivers/mmc/host/sdhci-bcm2835.c +7 -0
+#ifdef CONFIG_MMC_SDHCI_BCM2835_VERIFY_WORKAROUND
+	struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
+	struct bcm2835_sdhci_host *bcm2835_host = pltfm_host->priv;
+
+	if (bcm2835_host->previous_reg == reg) {
+		if ((reg != SDHCI_HOST_CONTROL)
+			&& (reg != SDHCI_CLOCK_CONTROL)) {

The comment in patch 3 says the problem doesn't apply to the data register. Why does this check for these two registers rather than data?

This Verify workaround patch still a work in progress. I'm still getting more info from the silicon designers on the back-to-back register writes that are affect. The spew of 0x20 or 0x28 or 0x2c register writes are all ok locations that don't need to be worked around. This patch needs to be corrected with the proper register rules still.

Quoted 6 lines

drivers/mmc/host/sdhci-bcm2835.c static u8 bcm2835_sdhci_readb(struct sdhci_host *host, int reg) · line 72

Quoted 3 lines
drivers/mmc/host/sdhci-bcm2835.c +2 -0
+			dev_err(mmc_dev(host->mmc),
+			"back-to-back write to 0x%x\n", reg);

The continuation line should be indented at least one more level here.

#128 lore raw

Re: [PATCHv2 4/5] mmc: shdci-bcm2835: add verify for 32-bit back-to-back workaround

Quoted 17 lines · Scott Branden
Quoted 6 lines · Stephen Warren
Quoted 4 lines · Scott Branden

Add a verify option to driver to print out an error message if a potential back to back write could cause a clock domain issue.

index f8c450a..11af27f 100644

Quoted 10 lines

drivers/mmc/host/sdhci-bcm2835.c static u8 bcm2835_sdhci_readb(struct sdhci_host *host, int reg) · line 70

Quoted 7 lines
drivers/mmc/host/sdhci-bcm2835.c +7 -0
+#ifdef CONFIG_MMC_SDHCI_BCM2835_VERIFY_WORKAROUND
+    struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
+    struct bcm2835_sdhci_host *bcm2835_host = pltfm_host->priv;
+
+    if (bcm2835_host->previous_reg == reg) {
+        if ((reg != SDHCI_HOST_CONTROL)
+            && (reg != SDHCI_CLOCK_CONTROL)) {

The comment in patch 3 says the problem doesn't apply to the data register. Why does this check for these two registers rather than data?

Quoted 6 lines

This Verify workaround patch still a work in progress. I'm still getting more info from the silicon designers on the back-to-back register writes that are affect. The spew of 0x20 or 0x28 or 0x2c register writes are all ok locations that don't need to be worked around. This patch needs to be corrected with the proper register rules still.

FYI, I applied the series except for this patch, and everything /appeared/ to work OK for a brief test (boot, log in, reboot). Still, I'll hold off my Tested-by/acked-by until the comment in patch 3 and the register list above match, and there's no log spew with everything applied.

author maintainer
#129 lore raw

Re: [PATCHv2 4/5] mmc: shdci-bcm2835: add verify for 32-bit back-to-back workaround

Quoted 18 lines · Stephen Warren
Quoted 17 lines · Scott Branden
Quoted 16 lines · Stephen Warren

drivers/mmc/host/sdhci-bcm2835.c static u8 bcm2835_sdhci_readb(struct sdhci_host *host, int reg) · line 70

Quoted 12 lines · Scott Branden

Add a verify option to driver to print out an error message if a potential back to back write could cause a clock domain issue.

index f8c450a..11af27f 100644

drivers/mmc/host/sdhci-bcm2835.c +7 -0
+#ifdef CONFIG_MMC_SDHCI_BCM2835_VERIFY_WORKAROUND
+    struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
+    struct bcm2835_sdhci_host *bcm2835_host = pltfm_host->priv;
+
+    if (bcm2835_host->previous_reg == reg) {
+        if ((reg != SDHCI_HOST_CONTROL)
+            && (reg != SDHCI_CLOCK_CONTROL)) {

The comment in patch 3 says the problem doesn't apply to the data register. Why does this check for these two registers rather than data?

Quoted 6 lines
Quoted 6 lines

This Verify workaround patch still a work in progress. I'm still getting more info from the silicon designers on the back-to-back register writes that are affect. The spew of 0x20 or 0x28 or 0x2c register writes are all ok locations that don't need to be worked around. This patch needs to be corrected with the proper register rules still.

Thanks for testing. Yes, I have work to do on the verify patch above still.

Quoted 6 lines

FYI, I applied the series except for this patch, and everything /appeared/ to work OK for a brief test (boot, log in, reboot). Still, I'll hold off my Tested-by/acked-by until the comment in patch 3 and the register list above match, and there's no log spew with everything applied.

#130 lore raw

Re: [PATCHv2 4/5] mmc: shdci-bcm2835: add verify for 32-bit back-to-back workaround

Hi Scott,

Am 07.11.2014 um 19:31 schrieb Scott Branden:

Quoted 19 lines · Stephen Warren
Quoted 18 lines · Scott Branden
Quoted 17 lines · Stephen Warren
Quoted 16 lines · Scott Branden

Review

Quoted 12 lines

Add a verify option to driver to print out an error message if a potential back to back write could cause a clock domain issue.

index f8c450a..11af27f 100644

(quoted diff) +7 -0
+#ifdef CONFIG_MMC_SDHCI_BCM2835_VERIFY_WORKAROUND
+    struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
+    struct bcm2835_sdhci_host *bcm2835_host = pltfm_host->priv;
+
+    if (bcm2835_host->previous_reg == reg) {
+        if ((reg != SDHCI_HOST_CONTROL)
+            && (reg != SDHCI_CLOCK_CONTROL)) {

The comment in patch 3 says the problem doesn't apply to the data register. Why does this check for these two registers rather than data?

Quoted 8 lines
Quoted 6 lines
Quoted 6 lines

This Verify workaround patch still a work in progress. I'm still getting more info from the silicon designers on the back-to-back register writes that are affect. The spew of 0x20 or 0x28 or 0x2c register writes are all ok locations that don't need to be worked around. This patch needs to be corrected with the proper register rules still.

Thanks for testing. Yes, I have work to do on the verify patch above still.

do you still have plans to submit a V3 of this patch series?

I attached an improved version of this patch which avoids a possible endless loop caused by the dev_err call. So only the first occurence of a specific register will be logged.

Regards
Stefan

-------------------8<-------------------------------------------

drivers/mmc/host/Kconfig +9 -0
index 1526b8a..7b0990f 100644
@@ -306,6 +306,15 @@ config MMC_SDHCI_BCM2835
 
 	  If unsure, say N.
 
+config MMC_SDHCI_BCM2835_VERIFY_WORKAROUND
+	bool "Verify BCM2835 workaround does not do back to back writes"
+	depends on MMC_SDHCI_BCM2835
+	default y
+	help
+	  This enables code that verifies the bcm2835 workaround.
+	  The verification code checks that back to back writes to the same
+	  register do not occur.
+
 config MMC_SDHCI_F_SDH30
 	tristate "SDHCI support for Fujitsu Semiconductor F_SDH30"
 	depends on MMC_SDHCI_PLTFM
(quoted diff) +0 -0

b/drivers/mmc/host/sdhci-bcm2835.c
index 01ce193d..c1c70df 100644

drivers/mmc/host/sdhci-bcm2835.c +12 -0
@@ -20,15 +20,27 @@
  */
 
 #include <linux/delay.h>
+#include <linux/hashtable.h>
 #include <linux/module.h>
 #include <linux/mmc/host.h>
+#include <linux/slab.h>
 #include "sdhci-pltfm.h"
 
 struct bcm2835_sdhci_host {
 	u32 shadow_cmd;
 	u32 shadow_blk;
+	int previous_reg;
 };
 
+struct reg_hash {
+	struct hlist_node node;
+	int reg;
+};
+
+#define BCM2835_REG_HT_BITS 4
+
+static DEFINE_HASHTABLE(bcm2835_used_regs, BCM2835_REG_HT_BITS);
+
 #define REG_OFFSET_IN_BITS(reg) ((reg) << 3 & 0x18)
 
 static inline u32 bcm2835_sdhci_readl(struct sdhci_host *host, int reg)
@@ -56,8 +68,37 @@ static u8 bcm2835_sdhci_readb(struct sdhci_host

*host, int reg)
}

static inline void bcm2835_sdhci_writel(struct sdhci_host *host,
+ u32 val, int reg)
+{
+ writel(val, host->ioaddr + reg);
+}
+
+static inline void bcm2835_sdhci_writel_verify(struct sdhci_host *host,
u32 val, int reg)
{
+ struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
+ struct bcm2835_sdhci_host *bcm2835_host = pltfm_host->priv;
+ struct reg_hash *rh;
+ struct hlist_head *head;
+
+ head = &bcm2835_used_regs[hash_min(reg, BCM2835_REG_HT_BITS)];
+
+ if (bcm2835_host->previous_reg == reg) {
+ if ((reg != SDHCI_HOST_CONTROL) &&
+ (reg != SDHCI_CLOCK_CONTROL) &&
+ (hlist_empty(head))) {
+ rh = kzalloc(sizeof(*rh), GFP_KERNEL);
+ if (WARN_ON(!rh))
+ return;
+
+ rh->reg = reg;
+ hash_add(bcm2835_used_regs, &rh->node, rh->reg);
+ dev_err(mmc_dev(host->mmc), "back-to-back write to 0x%x\n",
+ reg);
+ }
+ }
+ bcm2835_host->previous_reg = reg;
+
writel(val, host->ioaddr + reg);
}

@@ -131,7 +172,11 @@ static const struct sdhci_ops bcm2835_sdhci_ops = {
.read_l = bcm2835_sdhci_readl,
.read_w = bcm2835_sdhci_readw,
.read_b = bcm2835_sdhci_readb,
+#ifdef CONFIG_MMC_SDHCI_BCM2835_VERIFY_WORKAROUND
+ .write_l = bcm2835_sdhci_writel_verify,
+#else
.write_l = bcm2835_sdhci_writel,
+#endif
.write_w = bcm2835_sdhci_writew,
.write_b = bcm2835_sdhci_writeb,
.set_clock = sdhci_set_clock,

author maintainer
#131 lore raw

Re: [PATCHv2 4/5] mmc: shdci-bcm2835: add verify for 32-bit back-to-back workaround

Hi Stefan,

Quoted 28 lines · Stefan Wahren

Hi Scott,

Am 07.11.2014 um 19:31 schrieb Scott Branden:

Quoted 25 lines · Stephen Warren
Quoted 24 lines · Scott Branden
Quoted 23 lines · Stephen Warren
Quoted 6 lines · Scott Branden
Quoted 4 lines

Add a verify option to driver to print out an error message if a potential back to back write could cause a clock domain issue.

index f8c450a..11af27f 100644

Quoted 10 lines

Review

Quoted 7 lines
(quoted diff) +7 -0
+#ifdef CONFIG_MMC_SDHCI_BCM2835_VERIFY_WORKAROUND
+    struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
+    struct bcm2835_sdhci_host *bcm2835_host = pltfm_host->priv;
+
+    if (bcm2835_host->previous_reg == reg) {
+        if ((reg != SDHCI_HOST_CONTROL)
+            && (reg != SDHCI_CLOCK_CONTROL)) {

The comment in patch 3 says the problem doesn't apply to the data register. Why does this check for these two registers rather than data?

This Verify workaround patch still a work in progress. I'm still getting more info from the silicon designers on the back-to-back register writes that are affect. The spew of 0x20 or 0x28 or 0x2c register writes are all ok locations that don't need to be worked around. This patch needs to be corrected with the proper register rules still.

Quoted 4 lines
Quoted 2 lines

Thanks for testing. Yes, I have work to do on the verify patch above still.

do you still have plans to submit a V3 of this patch series?

No, I do not have plans to submit a V3 of this patch series.

I submitted this patch as RPI has a similar controller to the SoCs I am familiar with as well as needing similar work arounds You can take over the patchset. Or, try and get the sdhci-iproc.c driver going on RPI. The sdhci-iproc is the production driver we use on a variety of SoCs and support and test this driver.

Quoted 4 lines

I attached an improved version of this patch which avoids a possible endless loop caused by the dev_err call. So only the first occurence of a specific register will be logged.

OK, but is this really necessary? If veryify workaround ever prints anything then the driver workarounds aren't doing what it is supposed to anyway?

Quoted 115 lines

Regards
Stefan

-------------------8<-------------------------------------------

drivers/mmc/host/Kconfig +9 -0
index 1526b8a..7b0990f 100644
@@ -306,6 +306,15 @@ config MMC_SDHCI_BCM2835
 
  	  If unsure, say N.
 
+config MMC_SDHCI_BCM2835_VERIFY_WORKAROUND
+	bool "Verify BCM2835 workaround does not do back to back writes"
+	depends on MMC_SDHCI_BCM2835
+	default y
+	help
+	  This enables code that verifies the bcm2835 workaround.
+	  The verification code checks that back to back writes to the same
+	  register do not occur.
+
  config MMC_SDHCI_F_SDH30
  	tristate "SDHCI support for Fujitsu Semiconductor F_SDH30"
  	depends on MMC_SDHCI_PLTFM
drivers/mmc/host/sdhci-bcm2835.c +45 -0
index 01ce193d..c1c70df 100644
@@ -20,15 +20,27 @@
   */
 
  #include <linux/delay.h>
+#include <linux/hashtable.h>
  #include <linux/module.h>
  #include <linux/mmc/host.h>
+#include <linux/slab.h>
  #include "sdhci-pltfm.h"
 
  struct bcm2835_sdhci_host {
  	u32 shadow_cmd;
  	u32 shadow_blk;
+	int previous_reg;
  };
 
+struct reg_hash {
+	struct hlist_node node;
+	int reg;
+};
+
+#define BCM2835_REG_HT_BITS 4
+
+static DEFINE_HASHTABLE(bcm2835_used_regs, BCM2835_REG_HT_BITS);
+
  #define REG_OFFSET_IN_BITS(reg) ((reg) << 3 & 0x18)
 
  static inline u32 bcm2835_sdhci_readl(struct sdhci_host *host, int reg)
@@ -56,8 +68,37 @@ static u8 bcm2835_sdhci_readb(struct sdhci_host
 *host, int reg)
  }
 
  static inline void bcm2835_sdhci_writel(struct sdhci_host *host,
+					u32 val, int reg)
+{
+	writel(val, host->ioaddr + reg);
+}
+
+static inline void bcm2835_sdhci_writel_verify(struct sdhci_host *host,
  						u32 val, int reg)
  {
+	struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
+	struct bcm2835_sdhci_host *bcm2835_host = pltfm_host->priv;
+	struct reg_hash *rh;
+	struct hlist_head *head;
+
+	head = &bcm2835_used_regs[hash_min(reg, BCM2835_REG_HT_BITS)];
+
+	if (bcm2835_host->previous_reg == reg) {
+		if ((reg != SDHCI_HOST_CONTROL) &&
+		    (reg != SDHCI_CLOCK_CONTROL) &&
+		    (hlist_empty(head))) {
+			rh = kzalloc(sizeof(*rh), GFP_KERNEL);
+			if (WARN_ON(!rh))
+				return;
+
+			rh->reg = reg;
+			hash_add(bcm2835_used_regs, &rh->node, rh->reg);
+			dev_err(mmc_dev(host->mmc), "back-to-back write to 0x%x\n",
+				reg);
+		}
+	}
+	bcm2835_host->previous_reg = reg;
+
  	writel(val, host->ioaddr + reg);
  }
@@ -131,7 +172,11 @@ static const struct sdhci_ops bcm2835_sdhci_ops = {
  	.read_l = bcm2835_sdhci_readl,
  	.read_w = bcm2835_sdhci_readw,
  	.read_b = bcm2835_sdhci_readb,
+#ifdef CONFIG_MMC_SDHCI_BCM2835_VERIFY_WORKAROUND
+	.write_l = bcm2835_sdhci_writel_verify,
+#else
  	.write_l = bcm2835_sdhci_writel,
+#endif
  	.write_w = bcm2835_sdhci_writew,
  	.write_b = bcm2835_sdhci_writeb,
  	.set_clock = sdhci_set_clock,
#132 lore raw

Re: [PATCHv2 4/5] mmc: shdci-bcm2835: add verify for 32-bit back-to-back workaround

Hi Scott,

Am 22.12.2015 um 20:23 schrieb Scott Branden:

Quoted 36 lines

Hi Stefan,

Quoted 33 lines · Stefan Wahren

Hi Scott,

Am 07.11.2014 um 19:31 schrieb Scott Branden:

Quoted 29 lines · Stephen Warren
Quoted 19 lines · Scott Branden
Quoted 18 lines · Stephen Warren
Quoted 17 lines · Scott Branden

Review

Quoted 12 lines

Add a verify option to driver to print out an error message if a potential back to back write could cause a clock domain issue.

index f8c450a..11af27f 100644

(quoted diff) +7 -0
+#ifdef CONFIG_MMC_SDHCI_BCM2835_VERIFY_WORKAROUND
+    struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
+    struct bcm2835_sdhci_host *bcm2835_host = pltfm_host->priv;
+
+    if (bcm2835_host->previous_reg == reg) {
+        if ((reg != SDHCI_HOST_CONTROL)
+            && (reg != SDHCI_CLOCK_CONTROL)) {

The comment in patch 3 says the problem doesn't apply to the data register. Why does this check for these two registers rather than data?

Quoted 7 lines
Quoted 7 lines

This Verify workaround patch still a work in progress. I'm still getting more info from the silicon designers on the back-to-back register writes that are affect. The spew of 0x20 or 0x28 or 0x2c register writes are all ok locations that don't need to be worked around. This patch needs to be corrected with the proper register rules
still.

Thanks for testing. Yes, I have work to do on the verify patch above still.

Quoted 8 lines
Quoted 1 line

do you still have plans to submit a V3 of this patch series?

No, I do not have plans to submit a V3 of this patch series.

I submitted this patch as RPI has a similar controller to the SoCs I am
familiar with as well as needing similar work arounds You can take
over the patchset. Or, try and get the sdhci-iproc.c driver going on RPI. The sdhci-iproc is the production driver we use on a variety of SoCs and support and test this driver.

after applying the patch series both drivers are very similiar so i prefer the latter. I will give it a try. Thanks for the hint about sdhci-iproc.

Regards
Stefan

author maintainer
#133 lore raw

PATCH v2 5/5 mmc: sdhci-bcm2835: add sdhci quirk SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12

In reply to Scott Branden

SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12 is missing and needed for this controller.

---
 drivers/mmc/host/sdhci-bcm2835.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/mmc/host/sdhci-bcm2835.c +2 -1
index 11af27f..2a4c10b 100644
@@ -159,7 +159,8 @@ static const struct sdhci_ops bcm2835_sdhci_ops = {
 };
 
 static const struct sdhci_pltfm_data bcm2835_sdhci_pdata = {
-	.quirks = SDHCI_QUIRK_BROKEN_CARD_DETECTION |
+	.quirks = SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12 |
+		  SDHCI_QUIRK_BROKEN_CARD_DETECTION |
 		  SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK,
 	.ops = &bcm2835_sdhci_ops,
 };
Signature · 1 line
1.7.9.5
#134 lore raw

Re: [PATCHv2 5/5] mmc: sdhci-bcm2835: add sdhci quirk SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12

Quoted 1 line · Scott Branden

SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12 is missing and needed for this controller.

This seems fine, although any explanation of why this quirk is needed would be useful.

author maintainer
#135 lore raw

Re: [PATCHv2 5/5] mmc: sdhci-bcm2835: add sdhci quirk SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12

Quoted 6 lines · Stephen Warren
Quoted 1 line · Scott Branden

SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12 is missing and needed for this controller.

This seems fine, although any explanation of why this quirk is needed would be useful.

I don't know who to talk to at Arasan about this. Will try hunting around a little for more info as to why this is needed to have eMMC and SD work properly through our internal testing on other non-2835 chipset that shares the same SDHCI controller as 2835.

#136 lore raw

Re: [PATCHv2 5/5] mmc: sdhci-bcm2835: add sdhci quirk SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12

Quoted 5 lines · Scott Branden
Quoted 4 lines · Stephen Warren
Quoted 2 lines · Scott Branden

SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12 is missing and needed for this controller.

Quoted 7 lines
Quoted 3 lines

This seems fine, although any explanation of why this quirk is needed would be useful.

I don't know who to talk to at Arasan about this. Will try hunting around a little for more info as to why this is needed to have eMMC and SD work properly through our internal testing on other non-2835 chipset that shares the same SDHCI controller as 2835.

I thought I heard that this wasn't a bug in the controller itself, but rather an integration issue between the IP core and the register bus it's attached to. Consequently, it may be SoC-specific or at least have SoC-specific variations?

author maintainer
#137 lore raw

Re: [PATCHv2 5/5] mmc: sdhci-bcm2835: add sdhci quirk SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12

Quoted 14 lines · Stephen Warren
Quoted 5 lines · Scott Branden
Quoted 4 lines · Stephen Warren
Quoted 2 lines · Scott Branden

SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12 is missing and needed for this controller.

Quoted 7 lines
Quoted 3 lines

This seems fine, although any explanation of why this quirk is needed would be useful.

I don't know who to talk to at Arasan about this. Will try hunting around a little for more info as to why this is needed to have eMMC and SD work properly through our internal testing on other non-2835 chipset that shares the same SDHCI controller as 2835.

Quoted 4 lines

I thought I heard that this wasn't a bug in the controller itself, but rather an integration issue between the IP core and the register bus it's attached to. Consequently, it may be SoC-specific or at least have SoC-specific variations?

Yes, this patch is to fix a different bug (in the IP) rather than the clock domain integration issue.

Quoted 1 line
author maintainer
#138 lore raw

PATCH 1/2 ARM: multi_v7_defconfig: remove one level of menu from Kconfig

In reply to a message not in the archive

remove menu "Broadcom Mobile SoC Selection"
This requires:
- selecting ARCH_BCM_MOBILE based on SoC selections
- fixup multi_v7_defconfig to work with new menu levels of mach-bcm.

---
 arch/arm/configs/multi_v7_defconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/configs/multi_v7_defconfig +2 -1
index 491b7d5..e8f79fd 100644
@@ -17,7 +17,8 @@ CONFIG_MACH_ARMADA_38X=y
 CONFIG_MACH_ARMADA_XP=y
 CONFIG_MACH_DOVE=y
 CONFIG_ARCH_BCM=y
-CONFIG_ARCH_BCM_MOBILE=y
+CONFIG_ARCH_BCM_21664=y
+CONFIG_ARCH_BCM_281XX=y
 CONFIG_ARCH_BCM_5301X=y
 CONFIG_ARCH_BRCMSTB=y
 CONFIG_ARCH_BERLIN=y
Signature · 1 line
2.1.3
author maintainer
#139 lore raw

PATCH 2/2 ARM: multi_v7_defconfig: Enable Broadcom Cygnus

From: Ray Jui <[email protected]>

Enable Broadcom Cygnus platform support in multi_v7_defconfig

---
 arch/arm/configs/multi_v7_defconfig | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
arch/arm/configs/multi_v7_defconfig +18 -0
index e8f79fd..f3ef3f5 100644
@@ -17,6 +17,7 @@ CONFIG_MACH_ARMADA_38X=y
 CONFIG_MACH_ARMADA_XP=y
 CONFIG_MACH_DOVE=y
 CONFIG_ARCH_BCM=y
+CONFIG_ARCH_BCM_CYGNUS=y
 CONFIG_ARCH_BCM_21664=y
 CONFIG_ARCH_BCM_281XX=y
 CONFIG_ARCH_BCM_5301X=y
@@ -125,8 +126,12 @@ CONFIG_DMA_CMA=y
 CONFIG_CMA_SIZE_MBYTES=64
 CONFIG_OMAP_OCP2SCP=y
 CONFIG_MTD=y
+CONFIG_MTD_CMDLINE_PARTS=y
+CONFIG_MTD_BLOCK=y
 CONFIG_MTD_M25P80=y
+CONFIG_MTD_NAND=y
 CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_UBI=y
 CONFIG_BLK_DEV_LOOP=y
 CONFIG_AD525X_DPOT=y
 CONFIG_AD525X_DPOT_I2C=y
@@ -161,6 +166,7 @@ CONFIG_TI_CPSW=y
 CONFIG_XILINX_EMACLITE=y
 CONFIG_AT803X_PHY=y
 CONFIG_MARVELL_PHY=y
+CONFIG_BROADCOM_PHY=y
 CONFIG_ICPLUS_PHY=y
 CONFIG_USB_PEGASUS=y
 CONFIG_USB_USBNET=y
@@ -234,6 +240,7 @@ CONFIG_SPI_TEGRA114=y
 CONFIG_SPI_TEGRA20_SFLASH=y
 CONFIG_SPI_TEGRA20_SLINK=y
 CONFIG_SPI_XILINX=y
+CONFIG_SPI_SPIDEV=y
 CONFIG_PINCTRL_AS3722=y
 CONFIG_PINCTRL_PALMAS=y
 CONFIG_GPIO_SYSFS=y
@@ -260,6 +267,7 @@ CONFIG_ST_THERMAL_SYSCFG=y
 CONFIG_ST_THERMAL_MEMMAP=y
 CONFIG_WATCHDOG=y
 CONFIG_XILINX_WATCHDOG=y
+CONFIG_ARM_SP805_WATCHDOG=y
 CONFIG_ORION_WATCHDOG=y
 CONFIG_SUNXI_WATCHDOG=y
 CONFIG_MFD_AS3722=y
@@ -306,6 +314,8 @@ CONFIG_FRAMEBUFFER_CONSOLE=y
 CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
 CONFIG_SOUND=y
 CONFIG_SND=y
+CONFIG_SND_DYNAMIC_MINORS=y
+CONFIG_SND_USB_AUDIO=y
 CONFIG_SND_SOC=y
 CONFIG_SND_SOC_TEGRA=y
 CONFIG_SND_SOC_TEGRA_RT5640=y
@@ -427,7 +437,12 @@ CONFIG_TI_PIPE3=y
 CONFIG_PHY_MIPHY365X=y
 CONFIG_PHY_SUN4I_USB=y
 CONFIG_EXT4_FS=y
+CONFIG_AUTOFS4_FS=y
+CONFIG_MSDOS_FS=y
 CONFIG_VFAT_FS=y
+CONFIG_NTFS_FS=y
+CONFIG_TMPFS_POSIX_ACL=y
+CONFIG_UBIFS_FS=y
 CONFIG_TMPFS=y
 CONFIG_SQUASHFS=y
 CONFIG_SQUASHFS_LZO=y
@@ -436,6 +451,9 @@ CONFIG_NFS_FS=y
 CONFIG_NFS_V3_ACL=y
 CONFIG_NFS_V4=y
 CONFIG_ROOT_NFS=y
+CONFIG_NLS_CODEPAGE_437=y
+CONFIG_NLS_ISO8859_1=y
+CONFIG_NLS_UTF8=y
 CONFIG_PRINTK_TIME=y
 CONFIG_DEBUG_FS=y
 CONFIG_MAGIC_SYSRQ=y
Signature · 1 line
2.1.3
author maintainer
#140 lore raw

cover pwm: kona: Drivers fixes

In reply to a message not in the archive

This patchset contains fixes for Broadcom's Kona PWM driver.

These changes fix glitch issues when changing settings on different channels. Kconfig change made to allow the driver to work on any Broadcom SoC rather than just mobile devices.

Arun Ramamurthy (4):
pwm: kona: Remove setting default smooth type and polarity for all
channels
pwm: kona: Fix incorrect enable after channel polarity change
pwm: kona: Fix enable, disable and config procedures
pwm: kona: Update dependency to ARCH_BCM

 drivers/pwm/Kconfig        |   2 +-
 drivers/pwm/pwm-bcm-kona.c | 112 ++++++++++++++++++++++++++++++++-------------
 2 files changed, 81 insertions(+), 33 deletions(-)
Signature · 1 line
2.1.3
author maintainer
#141 lore raw

PATCH 1/4 pwm: kona: Remove setting default smooth type and polarity for all channels

From: Arun Ramamurthy <[email protected]>

The probe routine unnecessarily sets the smooth type and polarity for all channels. This causes the channel for the speaker to click at the same time the backlight turns on. The smooth type and polarity should be set individually for each channel as required and no defaults need to be set.

---
 drivers/pwm/pwm-bcm-kona.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
drivers/pwm/pwm-bcm-kona.c +2 -5
index 02bc048..29eef9e 100644
@@ -266,12 +266,9 @@ static int kona_pwmc_probe(struct platform_device *pdev)
 		return ret;
 	}
 
-	/* Set smooth mode, push/pull, and normal polarity for all channels */
-	for (chan = 0; chan < kp->chip.npwm; chan++) {
-		value |= (1 << PWM_CONTROL_SMOOTH_SHIFT(chan));
+	/* Set push/pull for all channels */
+	for (chan = 0; chan < kp->chip.npwm; chan++)
 		value |= (1 << PWM_CONTROL_TYPE_SHIFT(chan));
-		value |= (1 << PWM_CONTROL_POLARITY_SHIFT(chan));
-	}
 
 	writel(value, kp->base + PWM_CONTROL_OFFSET);
 
Signature · 1 line
2.1.3
author maintainer
#142 lore raw

PATCH 2/4 pwm: kona: Fix incorrect enable after channel polarity change

In reply to Scott Branden

From: Arun Ramamurthy <[email protected]>

The pwm core code requires a separate call for enabling the channel and hence the driver does not need to set pwm_trigger after a polarity change

---
 drivers/pwm/pwm-bcm-kona.c | 5 -----
 1 file changed, 5 deletions(-)
drivers/pwm/pwm-bcm-kona.c +0 -5
index 29eef9e..fa0b5bf 100644
@@ -173,11 +173,6 @@ static int kona_pwmc_set_polarity(struct pwm_chip *chip, struct pwm_device *pwm,
 
 	writel(value, kp->base + PWM_CONTROL_OFFSET);
 
-	kona_pwmc_apply_settings(kp, chan);
-
-	/* Wait for waveform to settle before gating off the clock */
-	ndelay(400);
-
 	clk_disable_unprepare(kp->clk);
 
 	return 0;
Signature · 1 line
2.1.3
author maintainer
#143 lore raw

PATCH 3/4 pwm: kona: Fix enable, disable and config procedures

In reply to Scott Branden

From: Arun Ramamurthy <[email protected]>

- Added helper functions to set and clear smooth and trigger bits
- Added 400ns delays when clearing and setting trigger bit as requied by spec
- Added helper function to write prescale and other settings
- Updated config procedure to match spec
- Added code to handle pwn config when channel is disabled
- Updated disable procedure to match spec

---
 drivers/pwm/pwm-bcm-kona.c | 100 +++++++++++++++++++++++++++++++++++----------
 1 file changed, 78 insertions(+), 22 deletions(-)
drivers/pwm/pwm-bcm-kona.c +78 -22
index fa0b5bf..06fa983 100644
@@ -65,6 +65,10 @@
 #define DUTY_CYCLE_HIGH_MIN			(0x00000000)
 #define DUTY_CYCLE_HIGH_MAX			(0x00ffffff)
 
+/* The delay required after clearing or setting
+   PWMOUT_ENABLE*/
+#define PWMOUT_ENABLE_HOLD_DELAY 400
+
 struct kona_pwmc {
 	struct pwm_chip chip;
 	void __iomem *base;
@@ -76,28 +80,70 @@ static inline struct kona_pwmc *to_kona_pwmc(struct pwm_chip *_chip)
 	return container_of(_chip, struct kona_pwmc, chip);
 }
 
-static void kona_pwmc_apply_settings(struct kona_pwmc *kp, unsigned int chan)
+static inline void kona_pwmc_set_trigger(struct kona_pwmc *kp,
+					 unsigned int chan)
 {
 	unsigned int value = readl(kp->base + PWM_CONTROL_OFFSET);
 
-	/* Clear trigger bit but set smooth bit to maintain old output */
-	value |= 1 << PWM_CONTROL_SMOOTH_SHIFT(chan);
+	/* set trigger bit to enable channel */
+	value |= 1 << PWM_CONTROL_TRIGGER_SHIFT(chan);
+	writel(value, kp->base + PWM_CONTROL_OFFSET);
+	ndelay(PWMOUT_ENABLE_HOLD_DELAY);
+}
+static inline void kona_pwmc_clear_trigger(struct kona_pwmc *kp,
+					   unsigned int chan)
+{
+	unsigned int value = readl(kp->base + PWM_CONTROL_OFFSET);
+
+	/* Clear trigger bit */
 	value &= ~(1 << PWM_CONTROL_TRIGGER_SHIFT(chan));
 	writel(value, kp->base + PWM_CONTROL_OFFSET);
+	ndelay(PWMOUT_ENABLE_HOLD_DELAY);
+}
 
-	/* Set trigger bit and clear smooth bit to apply new settings */
+static inline void kona_pwmc_clear_smooth(struct kona_pwmc *kp,
+					  unsigned int chan)
+{
+	unsigned int value = readl(kp->base + PWM_CONTROL_OFFSET);
+
+	/* Clear smooth bit */
 	value &= ~(1 << PWM_CONTROL_SMOOTH_SHIFT(chan));
-	value |= 1 << PWM_CONTROL_TRIGGER_SHIFT(chan);
 	writel(value, kp->base + PWM_CONTROL_OFFSET);
 }
 
+static inline void kona_pwmc_set_smooth(struct kona_pwmc *kp, unsigned int chan)
+{
+	unsigned int value = readl(kp->base + PWM_CONTROL_OFFSET);
+
+	/*  set smooth bit to maintain old output */
+	value |= 1 << PWM_CONTROL_SMOOTH_SHIFT(chan);
+	writel(value, kp->base + PWM_CONTROL_OFFSET);
+}
+
+static void kona_pwmc_write_settings(struct kona_pwmc *kp, unsigned int chan,
+				     unsigned long prescale, unsigned long pc,
+				     unsigned long dc)
+{
+	unsigned int value;
+
+	value = readl(kp->base + PRESCALE_OFFSET);
+	value &= ~PRESCALE_MASK(chan);
+	value |= prescale << PRESCALE_SHIFT(chan);
+	writel(value, kp->base + PRESCALE_OFFSET);
+
+	writel(pc, kp->base + PERIOD_COUNT_OFFSET(chan));
+
+	writel(dc, kp->base + DUTY_CYCLE_HIGH_OFFSET(chan));
+
+}
+
 static int kona_pwmc_config(struct pwm_chip *chip, struct pwm_device *pwm,
 			    int duty_ns, int period_ns)
 {
 	struct kona_pwmc *kp = to_kona_pwmc(chip);
 	u64 val, div, rate;
 	unsigned long prescale = PRESCALE_MIN, pc, dc;
-	unsigned int value, chan = pwm->hwpwm;
+	unsigned int ret, chan = pwm->hwpwm;
 
 	/*
 	 * Find period count, duty count and prescale to suit duty_ns and
@@ -133,19 +179,30 @@ static int kona_pwmc_config(struct pwm_chip *chip, struct pwm_device *pwm,
 			return -EINVAL;
 	}
 
-	/* If the PWM channel is enabled, write the settings to the HW */
-	if (test_bit(PWMF_ENABLED, &pwm->flags)) {
-		value = readl(kp->base + PRESCALE_OFFSET);
-		value &= ~PRESCALE_MASK(chan);
-		value |= prescale << PRESCALE_SHIFT(chan);
-		writel(value, kp->base + PRESCALE_OFFSET);
 
-		writel(pc, kp->base + PERIOD_COUNT_OFFSET(chan));
+	/* If the PWM channel is not enabled, enable the clock */
+	if (!test_bit(PWMF_ENABLED, &pwm->flags)) {
+		ret = clk_prepare_enable(kp->clk);
+		if (ret < 0) {
+			dev_err(chip->dev, "failed to enable clock: %d\n", ret);
+			return ret;
+		}
+	}
 
-		writel(dc, kp->base + DUTY_CYCLE_HIGH_OFFSET(chan));
+	/* Set smooth bit to maintain old output */
+	kona_pwmc_set_smooth(kp, chan);
+	kona_pwmc_clear_trigger(kp, chan);
+
+	/* apply new settings */
+	kona_pwmc_write_settings(kp, chan, prescale, pc, dc);
+
+	/*If the PWM is enabled, enable the channel with the new settings
+	 and if not  disable the clock*/
+	if (test_bit(PWMF_ENABLED, &pwm->flags))
+		kona_pwmc_set_trigger(kp, chan);
+	else
+		clk_disable_unprepare(kp->clk);
 
-		kona_pwmc_apply_settings(kp, chan);
-	}
 
 	return 0;
 }
@@ -188,7 +245,6 @@ static int kona_pwmc_enable(struct pwm_chip *chip, struct pwm_device *pwm)
 		dev_err(chip->dev, "failed to enable clock: %d\n", ret);
 		return ret;
 	}
-
 	ret = kona_pwmc_config(chip, pwm, pwm->duty_cycle, pwm->period);
 	if (ret < 0) {
 		clk_disable_unprepare(kp->clk);
@@ -203,12 +259,12 @@ static void kona_pwmc_disable(struct pwm_chip *chip, struct pwm_device *pwm)
 	struct kona_pwmc *kp = to_kona_pwmc(chip);
 	unsigned int chan = pwm->hwpwm;
 
+	kona_pwmc_clear_smooth(kp, chan);
+	kona_pwmc_clear_trigger(kp, chan);
 	/* Simulate a disable by configuring for zero duty */
-	writel(0, kp->base + DUTY_CYCLE_HIGH_OFFSET(chan));
-	kona_pwmc_apply_settings(kp, chan);
-
-	/* Wait for waveform to settle before gating off the clock */
-	ndelay(400);
+	kona_pwmc_write_settings(kp, chan, 0, 0, 0);
+	kona_pwmc_set_polarity(chip, pwm, PWM_POLARITY_NORMAL);
+	kona_pwmc_set_trigger(kp, chan);
 
 	clk_disable_unprepare(kp->clk);
 }
Signature · 1 line
2.1.3
author maintainer
#144 lore raw

PATCH 4/4 pwm: kona: Update dependency to ARCH_BCM

In reply to Scott Branden

From: Arun Ramamurthy <[email protected]>

---
 drivers/pwm/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pwm/Kconfig +1 -1
index ef2dd2e..186080e 100644
@@ -64,7 +64,7 @@ config PWM_ATMEL_TCB
 
 config PWM_BCM_KONA
 	tristate "Kona PWM support"
-	depends on ARCH_BCM_MOBILE
+	depends on ARCH_BCM
 	help
 	  Generic PWM framework driver for Broadcom Kona PWM block.
 
Signature · 1 line
2.1.3
#145 lore raw

Re: [PATCH 4/4] pwm: kona: Update dependency to ARCH_BCM

Quoted 2 lines · Scott Branden

From: Arun Ramamurthy <[email protected]>

There's no patch description here. You should describe why you make this change.

Thierry

author maintainer
#146 lore raw

Re: [PATCH 4/4] pwm: kona: Update dependency to ARCH_BCM

Quoted 6 lines · Thierry Reding
Quoted 2 lines · Scott Branden

From: Arun Ramamurthy <[email protected]>

There's no patch description here. You should describe why you make this change.

Updated - sent v2 of patchset with Tim Kryger on cc list.

Quoted 3 lines

Thierry

#147 lore raw

Re: [PATCH 0/4] pwm: kona: Drivers fixes

In reply to Scott Branden
Quoted 13 lines · Scott Branden

This patchset contains fixes for Broadcom's Kona PWM driver.

These changes fix glitch issues when changing settings on different channels. Kconfig change made to allow the driver to work on any Broadcom SoC rather than just mobile devices.

Arun Ramamurthy (4):
pwm: kona: Remove setting default smooth type and polarity for all
channels
pwm: kona: Fix incorrect enable after channel polarity change
pwm: kona: Fix enable, disable and config procedures
pwm: kona: Update dependency to ARCH_BCM

Quoted 3 lines
 drivers/pwm/Kconfig        |   2 +-
 drivers/pwm/pwm-bcm-kona.c | 112 ++++++++++++++++++++++++++++++++-------------
 2 files changed, 81 insertions(+), 33 deletions(-)

Can you please resend with Tim Kryger <[email protected]> in Cc. He originally submitted the driver and I'd like him to at least have the opportunity of looking at the patches.

Thierry

author maintainer
#148 lore raw

PATCH 1/1 mtd: nand: added nand_shutdown

In reply to a message not in the archive

Add nand_shutdown to wait for current nand operations to finish and prevent further operations by changing the nand flash state to FL_SHUTDOWN.

This is addressing a problem observed during reboot tests using UBIFS root file system: NAND erase operations that are in progress during system reboot/shutdown are causing partial erased blocks. Although UBI should be able to detect and recover from this error, this change will avoid the creation of partial erased blocks on reboot in the middle of a NAND erase operation.

---
 drivers/mtd/nand/nand_base.c | 11 +++++++++++
 include/linux/mtd/nand.h     |  7 +++++++
 2 files changed, 18 insertions(+)
drivers/mtd/nand/nand_base.c +11 -0
index 5b5c627..100a967 100644
@@ -4236,6 +4236,17 @@ void nand_release(struct mtd_info *mtd)
 }
 EXPORT_SYMBOL_GPL(nand_release);
 
+/**
+ * nand_shutdown - [NAND Interface] finish the current nand operation and
+ *                 prevent further operations
+ * @mtd: MTD device structure
+ */
+int nand_shutdown(struct mtd_info *mtd)
+{
+	return nand_get_device(mtd, FL_SHUTDOWN);
+}
+EXPORT_SYMBOL_GPL(nand_shutdown);
+
 static int __init nand_base_init(void)
 {
 	led_trigger_register_simple("nand-disk", &nand_led_trigger);
include/linux/mtd/nand.h +7 -0
index e4d451e..80e4367 100644
@@ -48,6 +48,13 @@ extern int nand_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len);
 /* unlocks specified locked blocks */
 extern int nand_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len);
 
+/*
+ * Internal helper for board drivers which need to make sure that the current
+ * nand operation is finished and further operations are prevented before
+ * rebooting the system.
+ */
+extern int nand_shutdown(struct mtd_info *mtd);
+
 /* The maximum number of NAND chips in an array */
 #define NAND_MAX_CHIPS		8
 
Signature · 1 line
2.1.3
#149 lore raw

Re: [PATCH] mtd: nand: added nand_shutdown

Quoted 9 lines · Scott Branden

Add nand_shutdown to wait for current nand operations to finish and prevent further operations by changing the nand flash state to FL_SHUTDOWN.

This is addressing a problem observed during reboot tests using UBIFS root file system: NAND erase operations that are in progress during system reboot/shutdown are causing partial erased blocks. Although UBI should be able to detect and recover from this error, this change will avoid the creation of partial erased blocks on reboot in the middle of a NAND erase operation.

[...]

Quoted 5 lines
include/linux/mtd/nand.h +0 -0
index e4d451e..80e4367 100644

include/linux/mtd/nand.h extern int nand_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len); · line 56

Quoted 9 lines
include/linux/mtd/nand.h +6 -0
@@ -48,6 +48,13 @@ extern int nand_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len);
 /* unlocks specified locked blocks */
 extern int nand_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len);
 
+/*
+ * Internal helper for board drivers which need to make sure that the current
+ * nand operation is finished and further operations are prevented before
+ * rebooting the system.
+ */
+extern int nand_shutdown(struct mtd_info *mtd);

I don't think we should push this out to the board drivers. And I definitely don't want to merge this function without any user. It'd turn out like our useless nand_lock() and nand_unlock() functions.

include/linux/mtd/nand.h extern int nand_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len); · line 60

Quoted 4 lines
include/linux/mtd/nand.h +1 -0
+
 /* The maximum number of NAND chips in an array */
 #define NAND_MAX_CHIPS		8
 

So, to do this right, I think maybe we should add an (optional) reboot_notifier field to struct mtd_info, and use it to register a system reboot notifier on behalf of the lower layers. We can do the registration in mtd_device_parse_register(), I think, and any unregistration in mtd_device_unregister().

With this approach, we can actually move the cfi_cmdset_000{1,2}.c reboot notifiers over to the same common code. They just will have to fill out their mtd->reboot_notifier field.

How about the following two untested patches?

From: Brian Norris <[email protected]>

cfi_cmdset_000{1,2}.c already implement their own reboot notifiers, and we're going to add one for NAND. Let's put the boilerplate in one place.

---
 drivers/mtd/mtdcore.c   | 20 ++++++++++++++++++++
 include/linux/mtd/mtd.h |  1 +
 2 files changed, 21 insertions(+)
drivers/mtd/mtdcore.c +20 -0
index 4c611871d7e6..b80d44f9751d 100644
@@ -37,6 +37,7 @@
 #include <linux/backing-dev.h>
 #include <linux/gfp.h>
 #include <linux/slab.h>
+#include <linux/reboot.h>
 
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
@@ -365,6 +366,17 @@ static struct device_type mtd_devtype = {
 	.release	= mtd_release,
 };
 
+static int mtd_reboot_notifier(struct notifier_block *n, unsigned long state,
+			       void *cmd)
+{
+       struct mtd_info *mtd;
+
+       mtd = container_of(n, struct mtd_info, reboot_notifier);
+       mtd->_reboot(mtd);
+
+       return NOTIFY_DONE;
+}
+
 /**
  *	add_mtd_device - register an MTD device
  *	@mtd: pointer to new MTD device info structure
@@ -565,6 +577,11 @@ int mtd_device_parse_register(struct mtd_info *mtd, const char * const *types,
 			err = -ENODEV;
 	}
 
+	if (mtd->_reboot) {
+		mtd->reboot_notifier.notifier_call = mtd_reboot_notifier;
+		register_reboot_notifier(&mtd->reboot_notifier);
+	}
+
 	return err;
 }
 EXPORT_SYMBOL_GPL(mtd_device_parse_register);
@@ -579,6 +596,9 @@ int mtd_device_unregister(struct mtd_info *master)
 {
 	int err;
 
+	if (master->_reboot)
+		unregister_reboot_notifier(&master->reboot_notifier);
+
 	err = del_mtd_partitions(master);
 	if (err)
 		return err;
include/linux/mtd/mtd.h +1 -0
index 031ff3a9a0bd..c06f5373d870 100644
@@ -227,6 +227,7 @@ struct mtd_info {
 	int (*_block_markbad) (struct mtd_info *mtd, loff_t ofs);
 	int (*_suspend) (struct mtd_info *mtd);
 	void (*_resume) (struct mtd_info *mtd);
+	void (*_reboot) (struct mtd_info *mtd);
 	/*
 	 * If the driver is something smart, like UBI, it may need to maintain
 	 * its own reference counting. The below functions are only for driver.
Signature · 17 lines
From: Scott Branden <[email protected]>

Add nand_shutdown to wait for current nand operations to finish and prevent
further operations by changing the nand flash state to FL_SHUTDOWN.

This is addressing a problem observed during reboot tests using UBIFS
root file system: NAND erase operations that are in progress during
system reboot/shutdown are causing partial erased blocks. Although UBI should
be able to detect and recover from this error, this change will avoid
the creation of partial erased blocks on reboot in the middle of a NAND erase
operation.

Signed-off-by: Scott Branden <[email protected]>
Signed-off-by: Brian Norris <[email protected]>
---
 drivers/mtd/nand/nand_base.c | 11 +++++++++++
 1 file changed, 11 insertions(+)
drivers/mtd/nand/nand_base.c +11 -0
index 4cbd14552d48..06ae96834063 100644
@@ -2944,6 +2944,16 @@ static void nand_resume(struct mtd_info *mtd)
 			__func__);
 }
 
+/**
+ * nand_shutdown - [MTD Interface] Finish the current NAND operation and
+ *                 prevent further operations
+ * @mtd: MTD device structure
+ */
+static int nand_shutdown(struct mtd_info *mtd)
+{
+	return nand_get_device(mtd, FL_SHUTDOWN);
+}
+
 /* Set default functions */
 static void nand_set_defaults(struct nand_chip *chip, int busw)
 {
@@ -4146,6 +4156,7 @@ int nand_scan_tail(struct mtd_info *mtd)
 	mtd->_unlock = NULL;
 	mtd->_suspend = nand_suspend;
 	mtd->_resume = nand_resume;
+	mtd->_reboot = nand_shutdown;
 	mtd->_block_isreserved = nand_block_isreserved;
 	mtd->_block_isbad = nand_block_isbad;
 	mtd->_block_markbad = nand_block_markbad;
author maintainer
#150 lore raw

Re: [PATCH] mtd: nand: added nand_shutdown

Quoted 41 lines · Brian Norris
Quoted 9 lines · Scott Branden

Add nand_shutdown to wait for current nand operations to finish and prevent further operations by changing the nand flash state to FL_SHUTDOWN.

This is addressing a problem observed during reboot tests using UBIFS root file system: NAND erase operations that are in progress during system reboot/shutdown are causing partial erased blocks. Although UBI should be able to detect and recover from this error, this change will avoid the creation of partial erased blocks on reboot in the middle of a NAND erase operation.

[...]

Quoted 5 lines
include/linux/mtd/nand.h +0 -0
index e4d451e..80e4367 100644

include/linux/mtd/nand.h extern int nand_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len); · line 56

Quoted 9 lines
include/linux/mtd/nand.h +6 -0
@@ -48,6 +48,13 @@ extern int nand_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len);
  /* unlocks specified locked blocks */
  extern int nand_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len);
 
+/*
+ * Internal helper for board drivers which need to make sure that the current
+ * nand operation is finished and further operations are prevented before
+ * rebooting the system.
+ */
+extern int nand_shutdown(struct mtd_info *mtd);

I don't think we should push this out to the board drivers. And I definitely don't want to merge this function without any user. It'd turn out like our useless nand_lock() and nand_unlock() functions.

include/linux/mtd/nand.h extern int nand_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len); · line 60

Quoted 4 lines
include/linux/mtd/nand.h +1 -0
+
  /* The maximum number of NAND chips in an array */
  #define NAND_MAX_CHIPS		8
 

So, to do this right, I think maybe we should add an (optional) reboot_notifier field to struct mtd_info, and use it to register a system reboot notifier on behalf of the lower layers. We can do the registration in mtd_device_parse_register(), I think, and any unregistration in mtd_device_unregister().

Quoted 5 lines

With this approach, we can actually move the cfi_cmdset_000{1,2}.c reboot notifiers over to the same common code. They just will have to fill out their mtd->reboot_notifier field.

How about the following two untested patches?

This is great if we can move this to common code as it should be done for all NAND (and NOR) devices. For nand, I suggest we install a reboot_notifier in a common location like nand_base rather than each driver. If a particular driver wishes to override this they are free to do so in their particular driver?

Quoted 77 lines

From: Brian Norris <[email protected]>

cfi_cmdset_000{1,2}.c already implement their own reboot notifiers, and we're going to add one for NAND. Let's put the boilerplate in one place.

---
  drivers/mtd/mtdcore.c   | 20 ++++++++++++++++++++
  include/linux/mtd/mtd.h |  1 +
  2 files changed, 21 insertions(+)
drivers/mtd/mtdcore.c +20 -0
index 4c611871d7e6..b80d44f9751d 100644
@@ -37,6 +37,7 @@
  #include <linux/backing-dev.h>
  #include <linux/gfp.h>
  #include <linux/slab.h>
+#include <linux/reboot.h>
 
  #include <linux/mtd/mtd.h>
  #include <linux/mtd/partitions.h>
@@ -365,6 +366,17 @@ static struct device_type mtd_devtype = {
  	.release	= mtd_release,
  };
 
+static int mtd_reboot_notifier(struct notifier_block *n, unsigned long state,
+			       void *cmd)
+{
+       struct mtd_info *mtd;
+
+       mtd = container_of(n, struct mtd_info, reboot_notifier);
+       mtd->_reboot(mtd);
+
+       return NOTIFY_DONE;
+}
+
  /**
   *	add_mtd_device - register an MTD device
   *	@mtd: pointer to new MTD device info structure
@@ -565,6 +577,11 @@ int mtd_device_parse_register(struct mtd_info *mtd, const char * const *types,
  			err = -ENODEV;
  	}
 
+	if (mtd->_reboot) {
+		mtd->reboot_notifier.notifier_call = mtd_reboot_notifier;
+		register_reboot_notifier(&mtd->reboot_notifier);
+	}
+
  	return err;
  }
  EXPORT_SYMBOL_GPL(mtd_device_parse_register);
@@ -579,6 +596,9 @@ int mtd_device_unregister(struct mtd_info *master)
  {
  	int err;
 
+	if (master->_reboot)
+		unregister_reboot_notifier(&master->reboot_notifier);
+
  	err = del_mtd_partitions(master);
  	if (err)
  		return err;
include/linux/mtd/mtd.h +1 -0
index 031ff3a9a0bd..c06f5373d870 100644
@@ -227,6 +227,7 @@ struct mtd_info {
  	int (*_block_markbad) (struct mtd_info *mtd, loff_t ofs);
  	int (*_suspend) (struct mtd_info *mtd);
  	void (*_resume) (struct mtd_info *mtd);
+	void (*_reboot) (struct mtd_info *mtd);
  	/*
  	 * If the driver is something smart, like UBI, it may need to maintain
  	 * its own reference counting. The below functions are only for driver.
author maintainer
#151 lore raw

Re: [PATCH] mtd: nand: added nand_shutdown

In reply to Brian Norris

drivers/mtd/nand/nand_base.c int nand_scan_tail(struct mtd_info *mtd) · line 4159

Quoted 1 line · Brian Norris
drivers/mtd/nand/nand_base.c +1 -0
+	mtd->_reboot = nand_shutdown;

Ah, I see you added this here. This is great. We'll try out your patchset on our driver and remove the reboot notifier from it.

author maintainer
#152 lore raw

Re: [PATCH] mtd: nand: added nand_shutdown

In reply to Brian Norris

Hi Brian,

I just sent out a new patch with your changes incorporated.

Thanks,
Scott

Quoted 123 lines · Brian Norris
Quoted 9 lines · Scott Branden

Add nand_shutdown to wait for current nand operations to finish and prevent further operations by changing the nand flash state to FL_SHUTDOWN.

This is addressing a problem observed during reboot tests using UBIFS root file system: NAND erase operations that are in progress during system reboot/shutdown are causing partial erased blocks. Although UBI should be able to detect and recover from this error, this change will avoid the creation of partial erased blocks on reboot in the middle of a NAND erase operation.

[...]

Quoted 5 lines
include/linux/mtd/nand.h +0 -0
index e4d451e..80e4367 100644

include/linux/mtd/nand.h extern int nand_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len); · line 56

Quoted 9 lines
include/linux/mtd/nand.h +6 -0
@@ -48,6 +48,13 @@ extern int nand_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len);
  /* unlocks specified locked blocks */
  extern int nand_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len);
 
+/*
+ * Internal helper for board drivers which need to make sure that the current
+ * nand operation is finished and further operations are prevented before
+ * rebooting the system.
+ */
+extern int nand_shutdown(struct mtd_info *mtd);

I don't think we should push this out to the board drivers. And I definitely don't want to merge this function without any user. It'd turn out like our useless nand_lock() and nand_unlock() functions.

include/linux/mtd/nand.h extern int nand_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len); · line 60

Quoted 4 lines
include/linux/mtd/nand.h +1 -0
+
  /* The maximum number of NAND chips in an array */
  #define NAND_MAX_CHIPS		8
 

So, to do this right, I think maybe we should add an (optional) reboot_notifier field to struct mtd_info, and use it to register a system reboot notifier on behalf of the lower layers. We can do the registration in mtd_device_parse_register(), I think, and any unregistration in mtd_device_unregister().

With this approach, we can actually move the cfi_cmdset_000{1,2}.c reboot notifiers over to the same common code. They just will have to fill out their mtd->reboot_notifier field.

How about the following two untested patches?

From: Brian Norris <[email protected]>

cfi_cmdset_000{1,2}.c already implement their own reboot notifiers, and we're going to add one for NAND. Let's put the boilerplate in one place.

---
  drivers/mtd/mtdcore.c   | 20 ++++++++++++++++++++
  include/linux/mtd/mtd.h |  1 +
  2 files changed, 21 insertions(+)
drivers/mtd/mtdcore.c +20 -0
index 4c611871d7e6..b80d44f9751d 100644
@@ -37,6 +37,7 @@
  #include <linux/backing-dev.h>
  #include <linux/gfp.h>
  #include <linux/slab.h>
+#include <linux/reboot.h>
 
  #include <linux/mtd/mtd.h>
  #include <linux/mtd/partitions.h>
@@ -365,6 +366,17 @@ static struct device_type mtd_devtype = {
  	.release	= mtd_release,
  };
 
+static int mtd_reboot_notifier(struct notifier_block *n, unsigned long state,
+			       void *cmd)
+{
+       struct mtd_info *mtd;
+
+       mtd = container_of(n, struct mtd_info, reboot_notifier);
+       mtd->_reboot(mtd);
+
+       return NOTIFY_DONE;
+}
+
  /**
   *	add_mtd_device - register an MTD device
   *	@mtd: pointer to new MTD device info structure
@@ -565,6 +577,11 @@ int mtd_device_parse_register(struct mtd_info *mtd, const char * const *types,
  			err = -ENODEV;
  	}
 
+	if (mtd->_reboot) {
+		mtd->reboot_notifier.notifier_call = mtd_reboot_notifier;
+		register_reboot_notifier(&mtd->reboot_notifier);
+	}
+
  	return err;
  }
  EXPORT_SYMBOL_GPL(mtd_device_parse_register);
@@ -579,6 +596,9 @@ int mtd_device_unregister(struct mtd_info *master)
  {
  	int err;
 
+	if (master->_reboot)
+		unregister_reboot_notifier(&master->reboot_notifier);
+
  	err = del_mtd_partitions(master);
  	if (err)
  		return err;
include/linux/mtd/mtd.h +1 -0
index 031ff3a9a0bd..c06f5373d870 100644
@@ -227,6 +227,7 @@ struct mtd_info {
  	int (*_block_markbad) (struct mtd_info *mtd, loff_t ofs);
  	int (*_suspend) (struct mtd_info *mtd);
  	void (*_resume) (struct mtd_info *mtd);
+	void (*_reboot) (struct mtd_info *mtd);
  	/*
  	 * If the driver is something smart, like UBI, it may need to maintain
  	 * its own reference counting. The below functions are only for driver.