Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4898de3d authored by Barry Song's avatar Barry Song Committed by Barry Song
Browse files

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: default avatarBarry Song <Baohua.Song@csr.com>
Cc: Mark Rutland <mark.rutland@arm.com>
parent f2a94192
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -73,6 +73,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 \
+3 −0
Original line number Diff line number Diff line
@@ -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
+10 −0
Original line number Diff line number Diff line
@@ -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
+3 −0
Original line number Diff line number Diff line
@@ -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
+39 −1
Original line number Diff line number Diff line
@@ -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
Loading