diff options
author | Barry Song <Baohua.Song@csr.com> | 2012-12-20 19:37:32 +0800 |
---|---|---|
committer | Barry Song <Barry.Song@csr.com> | 2013-01-22 19:53:27 +0800 |
commit | 4898de3d15d8ba34aa7a1b0f753a476d52ebdf92 (patch) | |
tree | e2606fb82bab7bcbe0503404ecd67fd0d3d47427 /arch/arm/mach-prima2/common.c | |
parent | f2a94192d953990c5c928f52dd4122a67f93b980 (diff) | |
download | linux-stable-4898de3d15d8ba34aa7a1b0f753a476d52ebdf92.tar.gz linux-stable-4898de3d15d8ba34aa7a1b0f753a476d52ebdf92.tar.bz2 linux-stable-4898de3d15d8ba34aa7a1b0f753a476d52ebdf92.zip |
ARM: PRIMA2: add new SiRFmarco SMP SoC infrastructures
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.
Signed-off-by: Barry Song <Baohua.Song@csr.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Diffstat (limited to 'arch/arm/mach-prima2/common.c')
-rw-r--r-- | arch/arm/mach-prima2/common.c | 40 |
1 files changed, 39 insertions, 1 deletions
diff --git a/arch/arm/mach-prima2/common.c b/arch/arm/mach-prima2/common.c index 99f9c7e391f5..00a65649a7e2 100644 --- a/arch/arm/mach-prima2/common.c +++ b/arch/arm/mach-prima2/common.c @@ -8,9 +8,11 @@ #include <linux/init.h> #include <linux/kernel.h> +#include <linux/of_irq.h> #include <asm/sizes.h> #include <asm/mach-types.h> #include <asm/mach/arch.h> +#include <asm/hardware/gic.h> #include <linux/of.h> #include <linux/of_platform.h> #include "common.h" @@ -30,6 +32,12 @@ void __init sirfsoc_init_late(void) sirfsoc_pm_init(); } +static __init void sirfsoc_map_io(void) +{ + sirfsoc_map_lluart(); + sirfsoc_map_scu(); +} + #ifdef CONFIG_ARCH_PRIMA2 static const char *prima2_dt_match[] __initdata = { "sirf,prima2", @@ -38,7 +46,7 @@ static const char *prima2_dt_match[] __initdata = { DT_MACHINE_START(PRIMA2_DT, "Generic PRIMA2 (Flattened Device Tree)") /* Maintainer: Barry Song <baohua.song@csr.com> */ - .map_io = sirfsoc_map_lluart, + .map_io = sirfsoc_map_io, .init_irq = sirfsoc_of_irq_init, .init_time = sirfsoc_prima2_timer_init, #ifdef CONFIG_MULTI_IRQ_HANDLER @@ -51,3 +59,33 @@ DT_MACHINE_START(PRIMA2_DT, "Generic PRIMA2 (Flattened Device Tree)") .restart = sirfsoc_restart, MACHINE_END #endif + +#ifdef CONFIG_ARCH_MARCO +static const struct of_device_id marco_irq_match[] __initconst = { + { .compatible = "arm,cortex-a9-gic", .data = gic_of_init, }, + { /* sentinel */ } +}; + +static void __init marco_init_irq(void) +{ + of_irq_init(marco_irq_match); +} + +static const char *marco_dt_match[] __initdata = { + "sirf,marco", + NULL +}; + +DT_MACHINE_START(MARCO_DT, "Generic MARCO (Flattened Device Tree)") + /* Maintainer: Barry Song <baohua.song@csr.com> */ + .smp = smp_ops(sirfsoc_smp_ops), + .map_io = sirfsoc_map_io, + .init_irq = marco_init_irq, + .init_time = sirfsoc_marco_timer_init, + .handle_irq = gic_handle_irq, + .init_machine = sirfsoc_mach_init, + .init_late = sirfsoc_init_late, + .dt_compat = marco_dt_match, + .restart = sirfsoc_restart, +MACHINE_END +#endif |