ARM: PRIMA2: add new SiRFmarco SMP SoC infrastructures
Subsystems (4)
PATCH 8/9 ARM: PRIMA2: add new SiRFmarco SMP SoC infrastructures
From: Barry Song <[email protected]>
this patch adds tick timer, smp entries and generic DT machine for SiRFmarco dual-core SMP chips.
with the added marco, we change the defconfig, using the same defconfig, we get a zImage which can work on both prima2 and marco.
--- arch/arm/boot/dts/Makefile | 1 + arch/arm/configs/prima2_defconfig | 3 + arch/arm/mach-prima2/Kconfig | 10 + arch/arm/mach-prima2/Makefile | 3 + arch/arm/mach-prima2/common.c | 41 ++++- arch/arm/mach-prima2/common.h | 10 + arch/arm/mach-prima2/headsmp.S | 79 ++++++++ arch/arm/mach-prima2/hotplug.c | 41 ++++ arch/arm/mach-prima2/platsmp.c | 170 +++++++++++++++++ arch/arm/mach-prima2/timer-marco.c | 359 ++++++++++++++++++++++++++++++++++++ 10 files changed, 716 insertions(+), 1 deletions(-) create mode 100644 arch/arm/mach-prima2/headsmp.S create mode 100644 arch/arm/mach-prima2/hotplug.c create mode 100644 arch/arm/mach-prima2/platsmp.c create mode 100644 arch/arm/mach-prima2/timer-marco.c
arch/arm/boot/dts/Makefile +1 -0
@@ -74,6 +74,7 @@ dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-dns320.dtb \ kirkwood-ts219-6281.dtb \ kirkwood-ts219-6282.dtb \ kirkwood-openblocks_a6.dtb +dtb-$(CONFIG_ARCH_MARCO) += marco-evb.dtb dtb-$(CONFIG_ARCH_MSM) += msm8660-surf.dtb \ msm8960-cdp.dtb dtb-$(CONFIG_ARCH_MVEBU) += armada-370-db.dtb \
arch/arm/configs/prima2_defconfig +3 -0
@@ -11,6 +11,9 @@ CONFIG_PARTITION_ADVANCED=y CONFIG_BSD_DISKLABEL=y CONFIG_SOLARIS_X86_PARTITION=y CONFIG_ARCH_SIRF=y +# CONFIG_SWP_EMULATE is not set +CONFIG_SMP=y +CONFIG_SCHED_MC=y CONFIG_PREEMPT=y CONFIG_AEABI=y CONFIG_KEXEC=y
arch/arm/mach-prima2/Kconfig +10 -0
@@ -11,6 +11,16 @@ config ARCH_PRIMA2 help Support for CSR SiRFSoC ARM Cortex A9 Platform +config ARCH_MARCO + bool "CSR SiRFSoC MARCO ARM Cortex A9 Platform" + default y + select ARM_GIC + select CPU_V7 + select HAVE_SMP + select SMP_ON_UP + help + Support for CSR SiRFSoC ARM Cortex A9 Platform + endmenu config SIRF_IRQ
arch/arm/mach-prima2/Makefile +3 -0
@@ -5,4 +5,7 @@ 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 +obj-$(CONFIG_SMP) += platsmp.o headsmp.o +obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o obj-$(CONFIG_ARCH_PRIMA2) += timer-prima2.o +obj-$(CONFIG_ARCH_MARCO) += timer-marco.o
arch/arm/mach-prima2/common.c +40 -1
65 lines not on this page · raw message
arch/arm/mach-prima2/common.h +10 -0
@@ -14,10 +14,14 @@#include <asm/exception.h> extern struct sys_timer sirfsoc_prima2_timer; +extern struct sys_timer sirfsoc_marco_timer; +extern struct smp_operations sirfsoc_smp_ops;extern void __init sirfsoc_of_irq_init (void );extern void __init sirfsoc_of_clk_init (void );extern void sirfsoc_restart (char ,const char *); +extern void sirfsoc_secondary_startup (void ); +extern void sirfsoc_cpu_die (unsigned int cpu); extern asmlinkage void __exception_irq_entry sirfsoc_handle_irq(struct pt_regs *regs);#ifndef CONFIG_DEBUG_LL
@@ -26,6 +30,12 @@ static inline void sirfsoc_map_lluart(void) {}extern void __init sirfsoc_map_lluart (void );#endif +#ifndef CONFIG_SMP +static inline void sirfsoc_map_scu (void ) {} +#else +extern void sirfsoc_map_scu (void ); +#endif +#ifdef CONFIG_SUSPEND extern int sirfsoc_pm_init (void );#else
arch/arm/mach-prima2/headsmp.S new file +79 -0
79 lines not on this page · raw message
arch/arm/mach-prima2/hotplug.c new file +41 -0
41 lines not on this page · raw message
arch/arm/mach-prima2/platsmp.c new file +170 -0
170 lines not on this page · raw message
arch/arm/mach-prima2/timer-marco.c new file +359 -0
359 lines not on this page · raw message
Signature · 6 lines
1.7.5.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 [email protected]/blog
PATCH 9/9 ARM: PRIMA2: provide two DEBUG_LL ports for prima2 and marco
From: Barry Song <[email protected]>
prima2 and marco has different memory base, the old code will fail if we enable DEBUG_LL in marco.
this patch adds two debuf port, while debugging, we select one of PRIMA2 and MARCO debug ports, in the products, we disable DEBUG_LL.
--- arch/arm/Kconfig.debug | 14 ++++++++++++++ arch/arm/mach-prima2/include/mach/uart.h | 6 ++++++ arch/arm/mach-prima2/include/mach/uncompress.h | 3 +++ 3 files changed, 23 insertions(+), 0 deletions(-)
arch/arm/Kconfig.debug +14 -0
@@ -386,6 +386,20 @@ choice Say Y here if you want kernel low-level debugging support on Tegra based platforms. + config DEBUG_SIRFPRIMA2_UART1 + bool "Kernel low-level debugging messages via SiRFprimaII UART1" + depends on ARCH_PRIMA2 + help + Say Y here if you want the debug print routines to direct + their output to the uart1 port on SiRFprimaII devices. + + config DEBUG_SIRFMARCO_UART1 + bool "Kernel low-level debugging messages via SiRFmarco UART1" + depends on ARCH_MARCO + help + Say Y here if you want the debug print routines to direct + their output to the uart1 port on SiRFmarco devices. + config DEBUG_VEXPRESS_UART0_DETECT bool "Autodetect UART0 on Versatile Express Cortex-A core tiles" depends on ARCH_VEXPRESS && CPU_CP15_MMU
arch/arm/mach-prima2/include/mach/uart.h +6 -0
@@ -10,7 +10,13 @@#define __MACH_PRIMA2_SIRFSOC_UART_H/* UART-1: used as serial debug port */ +#if defined(CONFIG_DEBUG_SIRFPRIMA2_UART1 )#define SIRFSOC_UART1_PA_BASE 0xb0060000 +#elif defined(CONFIG_DEBUG_SIRFMARCO_UART1 ) +#define SIRFSOC_UART1_PA_BASE 0xcc060000 +#else +#define SIRFSOC_UART1_PA_BASE 0 +#endif #define SIRFSOC_UART1_VA_BASE SIRFSOC_VA(0x060000)#define SIRFSOC_UART1_SIZE SZ_4K
arch/arm/mach-prima2/include/mach/uncompress.h +3 -0
@@ -25,6 +25,9 @@ static __inline__ void putc(char c)* during kernel decompression, all mappings are flat: * virt_addr == phys_addr */ +if (!SIRFSOC_UART1_PA_BASE ) +return ; +while (__raw_readl ((void __iomem *)SIRFSOC_UART1_PA_BASE +SIRFSOC_UART_TXFIFO_STATUS ) &SIRFSOC_UART1_TXFIFO_FULL )barrier ();
Signature · 6 lines
1.7.5.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