blob: 2c70f74fed5dcfc7f0aa6c8d635691ca85a73502 [file] [log] [blame]
Binghua Duan02c981c2011-07-08 17:40:12 +08001/*
Barry Song013dd122011-09-22 22:51:30 -07002 * Defines machines for CSR SiRFprimaII
Binghua Duan02c981c2011-07-08 17:40:12 +08003 *
4 * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company.
5 *
6 * Licensed under GPLv2 or later.
7 */
8
Arnd Bergmann275786b2013-03-19 15:27:22 +01009#include <linux/clocksource.h>
Binghua Duan02c981c2011-07-08 17:40:12 +080010#include <linux/init.h>
11#include <linux/kernel.h>
Barry Song1bdfd27a2011-11-17 22:18:14 +080012#include <asm/sizes.h>
Binghua Duan02c981c2011-07-08 17:40:12 +080013#include <asm/mach-types.h>
14#include <asm/mach/arch.h>
15#include <linux/of.h>
16#include <linux/of_platform.h>
17#include "common.h"
18
Shawn Guoa4b46742012-04-26 20:51:36 +080019void __init sirfsoc_init_late(void)
20{
21 sirfsoc_pm_init();
22}
23
Arnd Bergmann275786b2013-03-19 15:27:22 +010024static __init void sirfsoc_init_time(void)
25{
26 /* initialize clocking early, we want to set the OS timer */
27 sirfsoc_of_clk_init();
28 clocksource_of_init();
29}
30
Barry Song4898de32012-12-20 19:37:32 +080031static __init void sirfsoc_map_io(void)
32{
33 sirfsoc_map_lluart();
34 sirfsoc_map_scu();
35}
36
Barry Songd4fe49e2013-03-18 15:04:38 +080037#ifdef CONFIG_ARCH_ATLAS6
38static const char *atlas6_dt_match[] __initdata = {
39 "sirf,atlas6",
40 NULL
41};
42
43DT_MACHINE_START(ATLAS6_DT, "Generic ATLAS6 (Flattened Device Tree)")
44 /* Maintainer: Barry Song <baohua.song@csr.com> */
Arnd Bergmann630be7e2013-03-19 12:19:01 +010045 .nr_irqs = 128,
Barry Songd4fe49e2013-03-18 15:04:38 +080046 .map_io = sirfsoc_map_io,
Arnd Bergmann275786b2013-03-19 15:27:22 +010047 .init_time = sirfsoc_init_time,
Barry Songd4fe49e2013-03-18 15:04:38 +080048 .init_late = sirfsoc_init_late,
49 .dt_compat = atlas6_dt_match,
50 .restart = sirfsoc_restart,
51MACHINE_END
52#endif
53
Barry Songd0ec63f2012-08-23 13:41:57 +080054#ifdef CONFIG_ARCH_PRIMA2
55static const char *prima2_dt_match[] __initdata = {
Barry Song5a0ec562013-03-05 11:00:43 +080056 "sirf,prima2",
57 NULL
Binghua Duan02c981c2011-07-08 17:40:12 +080058};
59
Barry Songd0ec63f2012-08-23 13:41:57 +080060DT_MACHINE_START(PRIMA2_DT, "Generic PRIMA2 (Flattened Device Tree)")
Binghua Duan02c981c2011-07-08 17:40:12 +080061 /* Maintainer: Barry Song <baohua.song@csr.com> */
Arnd Bergmann630be7e2013-03-19 12:19:01 +010062 .nr_irqs = 128,
Barry Song4898de32012-12-20 19:37:32 +080063 .map_io = sirfsoc_map_io,
Arnd Bergmann275786b2013-03-19 15:27:22 +010064 .init_time = sirfsoc_init_time,
Nicolas Pitre98b01242011-09-02 21:05:10 -040065 .dma_zone_size = SZ_256M,
Shawn Guoa4b46742012-04-26 20:51:36 +080066 .init_late = sirfsoc_init_late,
Barry Songd0ec63f2012-08-23 13:41:57 +080067 .dt_compat = prima2_dt_match,
Russell King125c4032011-11-05 10:23:27 +000068 .restart = sirfsoc_restart,
Binghua Duan02c981c2011-07-08 17:40:12 +080069MACHINE_END
Barry Songd0ec63f2012-08-23 13:41:57 +080070#endif
Barry Song4898de32012-12-20 19:37:32 +080071
72#ifdef CONFIG_ARCH_MARCO
Barry Song4898de32012-12-20 19:37:32 +080073static const char *marco_dt_match[] __initdata = {
74 "sirf,marco",
75 NULL
76};
77
78DT_MACHINE_START(MARCO_DT, "Generic MARCO (Flattened Device Tree)")
79 /* Maintainer: Barry Song <baohua.song@csr.com> */
80 .smp = smp_ops(sirfsoc_smp_ops),
81 .map_io = sirfsoc_map_io,
Arnd Bergmann275786b2013-03-19 15:27:22 +010082 .init_time = sirfsoc_init_time,
Barry Song4898de32012-12-20 19:37:32 +080083 .init_late = sirfsoc_init_late,
84 .dt_compat = marco_dt_match,
85 .restart = sirfsoc_restart,
86MACHINE_END
87#endif