Skip to contentSkip to conversation

ARM: PRIMA2: some patches prepared to support new SiRF SoCs

PATCH New Barry Song 3 participants 6 messages Aug 23, 2012

Subsystems (2)
lore
Share & tools
lore

Barry Song

author
#0 lore raw

v2 cover ARM: PRIMA2: some patches prepared to support new SiRF SoCs

we will support SiRFmarco and SiRFpolo SMP SoCs, this series is making mach-prima2 common for all of them.

Barry Song (3):
ARM: PRIMA2: use DT_MACHINE_START and convert to generic board
ARM: PRIMA2: adjust Kconfig to support select SoC features
ARM: SIRF: make sirf irqchip driver optional since new SoCs will have
GIC

 arch/arm/Kconfig                            |   10 +++++-----
 arch/arm/configs/prima2_defconfig           |    7 +++----
 arch/arm/mach-prima2/Kconfig                |   19 +++++++++++++++++++
 arch/arm/mach-prima2/Makefile               |    4 ++--
 arch/arm/mach-prima2/{prima2.c => common.c} |   11 ++++++-----
 arch/arm/mach-prima2/irq.c                  |    2 +-
 6 files changed, 36 insertions(+), 17 deletions(-)
 create mode 100644 arch/arm/mach-prima2/Kconfig
 rename arch/arm/mach-prima2/{prima2.c => common.c} (81%)

Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom More information can be found at www.csr.com. Follow CSR on Twitter at http://twitter.com/CSR_PLC and read our blog at www.csr.com/blog

author
#1 lore raw

PATCH v2 1/3 ARM: PRIMA2: use DT_MACHINE_START and convert to generic board

From: Barry Song <[email protected]>

we will have SiRFMarco and SiRFPolo, all of them will be in the generic board.

---
-v2: rename prima2.c to common.c instead of board-generic.c delete redundant atag_offset

 arch/arm/mach-prima2/Makefile               |    2 +-
 arch/arm/mach-prima2/{prima2.c => common.c} |   11 ++++++-----
 2 files changed, 7 insertions(+), 6 deletions(-)
 rename arch/arm/mach-prima2/{prima2.c => common.c} (81%)
arch/arm/mach-prima2/Makefile +1 -1
index 841847d..f2cde60 100644
@@ -1,7 +1,7 @@
 obj-y := timer.o
 obj-y += irq.o
 obj-y += rstc.o
-obj-y += prima2.o
+obj-y += common.o
 obj-y += rtciobrg.o
 obj-$(CONFIG_DEBUG_LL) += lluart.o
 obj-$(CONFIG_CACHE_L2X0) += l2x0.o
arch/arm/mach-prima2/common.c renamed from arch/arm/mach-prima2/prima2.c +6 -5
similarity index 81%
rename from arch/arm/mach-prima2/prima2.c
rename to arch/arm/mach-prima2/common.c
index e9a17ae..f25a541 100644
@@ -30,20 +30,21 @@ void __init sirfsoc_init_late(void)
 	sirfsoc_pm_init();
 }
 
-static const char *prima2cb_dt_match[] __initdata = {
-       "sirf,prima2-cb",
+#ifdef CONFIG_ARCH_PRIMA2
+static const char *prima2_dt_match[] __initdata = {
+       "sirf,prima2",
        NULL
 };
 
-MACHINE_START(PRIMA2_EVB, "prima2cb")
+DT_MACHINE_START(PRIMA2_DT, "Generic PRIMA2 (Flattened Device Tree)")
 	/* Maintainer: Barry Song <[email protected]> */
-	.atag_offset	= 0x100,
 	.map_io         = sirfsoc_map_lluart,
 	.init_irq	= sirfsoc_of_irq_init,
 	.timer		= &sirfsoc_timer,
 	.dma_zone_size	= SZ_256M,
 	.init_machine	= sirfsoc_mach_init,
 	.init_late	= sirfsoc_init_late,
-	.dt_compat      = prima2cb_dt_match,
+	.dt_compat      = prima2_dt_match,
 	.restart	= sirfsoc_restart,
 MACHINE_END
+#endif
Signature · 6 lines
1.7.0.4



Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
More information can be found at www.csr.com. Follow CSR on Twitter at http://twitter.com/CSR_PLC and read our blog at www.csr.com/blog
author
#2 lore raw

PATCH v2 2/3 ARM: PRIMA2: adjust Kconfig to support select SoC features

In reply to Barry Song

From: Barry Song <[email protected]>

Now we have primaII, but will include Marco and Polo in mach-prima2 as well. We add Kconfig menu so that we can select necessary SoC features.

---
-v2:
fix typo;
don't rename mach-prima2 to mach-sirf;
make ARCH_PRIMA2 become an enable feature but not a choice of SoC types;

 arch/arm/Kconfig                  |   10 +++++-----
 arch/arm/configs/prima2_defconfig |    7 +++----
 arch/arm/mach-prima2/Kconfig      |   15 +++++++++++++++
 3 files changed, 23 insertions(+), 9 deletions(-)
 create mode 100644 arch/arm/mach-prima2/Kconfig
arch/arm/Kconfig +5 -5
index fb60148..2c1ca9f 100644
@@ -407,9 +407,8 @@ config ARCH_GEMINI
 	help
 	  Support for the Cortina Systems Gemini family SoCs
 
-config ARCH_PRIMA2
-	bool "CSR SiRFSoC PRIMA2 ARM Cortex A9 Platform"
-	select CPU_V7
+config ARCH_SIRF
+	bool "CSR SiRF"
 	select NO_IOPORT
 	select ARCH_REQUIRE_GPIOLIB
 	select GENERIC_CLOCKEVENTS
@@ -419,9 +418,8 @@ config ARCH_PRIMA2
 	select PINCTRL
 	select PINCTRL_SIRF
 	select USE_OF
-	select ZONE_DMA
 	help
-          Support for CSR SiRFSoC ARM Cortex A9 Platform
+	  Support for CSR SiRFprimaII/Marco/Polo platforms
 
 config ARCH_EBSA110
 	bool "EBSA-110"
@@ -1118,6 +1116,8 @@ source "arch/arm/mach-exynos/Kconfig"
 
 source "arch/arm/mach-shmobile/Kconfig"
 
+source "arch/arm/mach-prima2/Kconfig"
+
 source "arch/arm/mach-tegra/Kconfig"
 
 source "arch/arm/mach-u300/Kconfig"
arch/arm/configs/prima2_defconfig +3 -4
index c328ac6..807d4e2 100644
@@ -1,4 +1,6 @@
 CONFIG_EXPERIMENTAL=y
+CONFIG_NO_HZ=y
+CONFIG_HIGH_RES_TIMERS=y
 CONFIG_RELAY=y
 CONFIG_BLK_DEV_INITRD=y
 CONFIG_KALLSYMS_ALL=y
@@ -8,9 +10,7 @@ CONFIG_MODULE_UNLOAD=y
 CONFIG_PARTITION_ADVANCED=y
 CONFIG_BSD_DISKLABEL=y
 CONFIG_SOLARIS_X86_PARTITION=y
-CONFIG_ARCH_PRIMA2=y
-CONFIG_NO_HZ=y
-CONFIG_HIGH_RES_TIMERS=y
+CONFIG_ARCH_SIRF=y
 CONFIG_PREEMPT=y
 CONFIG_AEABI=y
 CONFIG_KEXEC=y
@@ -36,7 +36,6 @@ CONFIG_SPI=y
 CONFIG_SPI_SIRF=y
 CONFIG_SPI_SPIDEV=y
 # CONFIG_HWMON is not set
-# CONFIG_HID_SUPPORT is not set
 CONFIG_USB_GADGET=y
 CONFIG_USB_FILE_STORAGE=m
 CONFIG_USB_MASS_STORAGE=m
arch/arm/mach-prima2/Kconfig new file +15 -0
new file mode 100644
index 0000000..65438e1
@@ -0,0 +1,15 @@
+if ARCH_SIRF
+
+menu "CSR SiRF primaII/Marco/Polo Specific Features"
+
+config ARCH_PRIMA2
+	bool "CSR SiRFSoC PRIMA2 ARM Cortex A9 Platform"
+	default y
+	select CPU_V7
+	select ZONE_DMA
+	help
+          Support for CSR SiRFSoC ARM Cortex A9 Platform
+
+endmenu
+
+endif
Signature · 6 lines
1.7.0.4



Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
More information can be found at www.csr.com. Follow CSR on Twitter at http://twitter.com/CSR_PLC and read our blog at www.csr.com/blog
author
#3 lore raw

PATCH v2 3/3 ARM: SIRF: make sirf irqchip driver optional since new SoCs will have GIC

In reply to Barry Song

From: Barry Song <[email protected]>

New MARCO and POLO SoC use GIC, so make irq.c optional and enable it only if we enable ARCH_PRIMA2 in Kconfig

---
-v2: if dt node is not found, return but not panic since we might enable ARCH_PRIMA2 even we work on ARCH_MARCO

 arch/arm/mach-prima2/Kconfig  |    4 ++++
 arch/arm/mach-prima2/Makefile |    2 +-
 arch/arm/mach-prima2/irq.c    |    2 +-
 3 files changed, 6 insertions(+), 2 deletions(-)
arch/arm/mach-prima2/Kconfig +4 -0
index 65438e1..41fc853 100644
@@ -7,9 +7,13 @@ config ARCH_PRIMA2
 	default y
 	select CPU_V7
 	select ZONE_DMA
+	select SIRF_IRQ
 	help
           Support for CSR SiRFSoC ARM Cortex A9 Platform
 
 endmenu
 
+config SIRF_IRQ
+	bool
+
 endif
arch/arm/mach-prima2/Makefile +1 -1
index f2cde60..fc9ce22 100644
@@ -1,8 +1,8 @@
 obj-y := timer.o
-obj-y += irq.o
 obj-y += rstc.o
 obj-y += common.o
 obj-y += rtciobrg.o
 obj-$(CONFIG_DEBUG_LL) += lluart.o
 obj-$(CONFIG_CACHE_L2X0) += l2x0.o
 obj-$(CONFIG_SUSPEND) += pm.o sleep.o
+obj-$(CONFIG_SIRF_IRQ) += irq.o
arch/arm/mach-prima2/irq.c +1 -1
index a7b9415..7dee917 100644
@@ -63,7 +63,7 @@ void __init sirfsoc_of_irq_init(void)
 
 	np = of_find_matching_node(NULL, intc_ids);
 	if (!np)
-		panic("unable to find compatible intc node in dtb\n");
+		return;
 
 	sirfsoc_intc_base = of_iomap(np, 0);
 	if (!sirfsoc_intc_base)
Signature · 6 lines
1.7.0.4



Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
More information can be found at www.csr.com. Follow CSR on Twitter at http://twitter.com/CSR_PLC and read our blog at www.csr.com/blog
#4 lore raw

v2 cover ARM: PRIMA2: some patches prepared to support new SiRF SoCs

In reply to Barry Song
Quoted 8 lines · Barry Song

we will support SiRFmarco and SiRFpolo SMP SoCs, this series is making mach-prima2 common for all of them.

Barry Song (3):
ARM: PRIMA2: use DT_MACHINE_START and convert to generic board
ARM: PRIMA2: adjust Kconfig to support select SoC features
ARM: SIRF: make sirf irqchip driver optional since new SoCs will have
GIC

Looks all good. Are you planning to send a git pull request, or should we apply the patches from email?

Arnd

#5 lore raw

v2 cover ARM: PRIMA2: some patches prepared to support new SiRF SoCs

Hi Arnd,
2012/8/23 Arnd Bergmann <[email protected]>:

Quoted 12 lines · Barry Song
Quoted 8 lines

we will support SiRFmarco and SiRFpolo SMP SoCs, this series is making mach-prima2 common for all of them.

Barry Song (3):
ARM: PRIMA2: use DT_MACHINE_START and convert to generic board
ARM: PRIMA2: adjust Kconfig to support select SoC features
ARM: SIRF: make sirf irqchip driver optional since new SoCs will have
GIC

Looks all good. Are you planning to send a git pull request, or should we apply the patches from email?

I will send a git pull request based on -rc.

Quoted 2 lines

Arnd

-barry