common.c 2.1 KB
Newer Older
1
/*
2
 * Defines machines for CSR SiRFprimaII
3 4 5 6 7 8
 *
 * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company.
 *
 * Licensed under GPLv2 or later.
 */

9
#include <linux/clocksource.h>
10 11
#include <linux/init.h>
#include <linux/kernel.h>
12
#include <linux/irqchip.h>
13
#include <asm/sizes.h>
14 15 16 17 18 19
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <linux/of.h>
#include <linux/of_platform.h>
#include "common.h"

20 21 22 23 24
void __init sirfsoc_init_late(void)
{
	sirfsoc_pm_init();
}

25 26 27 28 29 30 31
static __init void sirfsoc_init_time(void)
{
	/* initialize clocking early, we want to set the OS timer */
	sirfsoc_of_clk_init();
	clocksource_of_init();
}

32 33 34 35 36 37
static __init void sirfsoc_map_io(void)
{
	sirfsoc_map_lluart();
	sirfsoc_map_scu();
}

38 39 40 41 42 43 44 45
#ifdef CONFIG_ARCH_ATLAS6
static const char *atlas6_dt_match[] __initdata = {
	"sirf,atlas6",
	NULL
};

DT_MACHINE_START(ATLAS6_DT, "Generic ATLAS6 (Flattened Device Tree)")
	/* Maintainer: Barry Song <baohua.song@csr.com> */
A
Arnd Bergmann 已提交
46
	.nr_irqs	= 128,
47
	.map_io         = sirfsoc_map_io,
48
	.init_irq	= irqchip_init,
49
	.init_time	= sirfsoc_init_time,
50 51 52 53 54 55
	.init_late	= sirfsoc_init_late,
	.dt_compat      = atlas6_dt_match,
	.restart	= sirfsoc_restart,
MACHINE_END
#endif

56 57
#ifdef CONFIG_ARCH_PRIMA2
static const char *prima2_dt_match[] __initdata = {
B
Barry Song 已提交
58 59
	"sirf,prima2",
	NULL
60 61
};

62
DT_MACHINE_START(PRIMA2_DT, "Generic PRIMA2 (Flattened Device Tree)")
63
	/* Maintainer: Barry Song <baohua.song@csr.com> */
A
Arnd Bergmann 已提交
64
	.nr_irqs	= 128,
65
	.map_io         = sirfsoc_map_io,
66
	.init_irq	= irqchip_init,
67
	.init_time	= sirfsoc_init_time,
68
	.dma_zone_size	= SZ_256M,
69
	.init_late	= sirfsoc_init_late,
70
	.dt_compat      = prima2_dt_match,
71
	.restart	= sirfsoc_restart,
72
MACHINE_END
73
#endif
74 75 76 77 78 79 80 81 82 83 84

#ifdef CONFIG_ARCH_MARCO
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,
85
	.init_irq	= irqchip_init,
86
	.init_time	= sirfsoc_init_time,
87 88 89 90 91
	.init_late	= sirfsoc_init_late,
	.dt_compat      = marco_dt_match,
	.restart	= sirfsoc_restart,
MACHINE_END
#endif