Binghua Duan | 02c981c | 2011-07-08 17:40:12 +0800 | [diff] [blame] | 1 | /* |
Barry Song | 013dd12 | 2011-09-22 22:51:30 -0700 | [diff] [blame] | 2 | * Defines machines for CSR SiRFprimaII |
Binghua Duan | 02c981c | 2011-07-08 17:40:12 +0800 | [diff] [blame] | 3 | * |
| 4 | * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company. |
| 5 | * |
| 6 | * Licensed under GPLv2 or later. |
| 7 | */ |
| 8 | |
Arnd Bergmann | 275786b | 2013-03-19 15:27:22 +0100 | [diff] [blame] | 9 | #include <linux/clocksource.h> |
Binghua Duan | 02c981c | 2011-07-08 17:40:12 +0800 | [diff] [blame] | 10 | #include <linux/init.h> |
| 11 | #include <linux/kernel.h> |
Barry Song | 1bdfd27a | 2011-11-17 22:18:14 +0800 | [diff] [blame] | 12 | #include <asm/sizes.h> |
Binghua Duan | 02c981c | 2011-07-08 17:40:12 +0800 | [diff] [blame] | 13 | #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 Guo | a4b4674 | 2012-04-26 20:51:36 +0800 | [diff] [blame] | 19 | void __init sirfsoc_init_late(void) |
| 20 | { |
| 21 | sirfsoc_pm_init(); |
| 22 | } |
| 23 | |
Arnd Bergmann | 275786b | 2013-03-19 15:27:22 +0100 | [diff] [blame] | 24 | static __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 Song | 4898de3 | 2012-12-20 19:37:32 +0800 | [diff] [blame] | 31 | static __init void sirfsoc_map_io(void) |
| 32 | { |
| 33 | sirfsoc_map_lluart(); |
| 34 | sirfsoc_map_scu(); |
| 35 | } |
| 36 | |
Barry Song | d4fe49e | 2013-03-18 15:04:38 +0800 | [diff] [blame] | 37 | #ifdef CONFIG_ARCH_ATLAS6 |
| 38 | static const char *atlas6_dt_match[] __initdata = { |
| 39 | "sirf,atlas6", |
| 40 | NULL |
| 41 | }; |
| 42 | |
| 43 | DT_MACHINE_START(ATLAS6_DT, "Generic ATLAS6 (Flattened Device Tree)") |
| 44 | /* Maintainer: Barry Song <baohua.song@csr.com> */ |
Arnd Bergmann | 630be7e | 2013-03-19 12:19:01 +0100 | [diff] [blame] | 45 | .nr_irqs = 128, |
Barry Song | d4fe49e | 2013-03-18 15:04:38 +0800 | [diff] [blame] | 46 | .map_io = sirfsoc_map_io, |
Arnd Bergmann | 275786b | 2013-03-19 15:27:22 +0100 | [diff] [blame] | 47 | .init_time = sirfsoc_init_time, |
Barry Song | d4fe49e | 2013-03-18 15:04:38 +0800 | [diff] [blame] | 48 | .init_late = sirfsoc_init_late, |
| 49 | .dt_compat = atlas6_dt_match, |
| 50 | .restart = sirfsoc_restart, |
| 51 | MACHINE_END |
| 52 | #endif |
| 53 | |
Barry Song | d0ec63f | 2012-08-23 13:41:57 +0800 | [diff] [blame] | 54 | #ifdef CONFIG_ARCH_PRIMA2 |
| 55 | static const char *prima2_dt_match[] __initdata = { |
Barry Song | 5a0ec56 | 2013-03-05 11:00:43 +0800 | [diff] [blame] | 56 | "sirf,prima2", |
| 57 | NULL |
Binghua Duan | 02c981c | 2011-07-08 17:40:12 +0800 | [diff] [blame] | 58 | }; |
| 59 | |
Barry Song | d0ec63f | 2012-08-23 13:41:57 +0800 | [diff] [blame] | 60 | DT_MACHINE_START(PRIMA2_DT, "Generic PRIMA2 (Flattened Device Tree)") |
Binghua Duan | 02c981c | 2011-07-08 17:40:12 +0800 | [diff] [blame] | 61 | /* Maintainer: Barry Song <baohua.song@csr.com> */ |
Arnd Bergmann | 630be7e | 2013-03-19 12:19:01 +0100 | [diff] [blame] | 62 | .nr_irqs = 128, |
Barry Song | 4898de3 | 2012-12-20 19:37:32 +0800 | [diff] [blame] | 63 | .map_io = sirfsoc_map_io, |
Arnd Bergmann | 275786b | 2013-03-19 15:27:22 +0100 | [diff] [blame] | 64 | .init_time = sirfsoc_init_time, |
Nicolas Pitre | 98b0124 | 2011-09-02 21:05:10 -0400 | [diff] [blame] | 65 | .dma_zone_size = SZ_256M, |
Shawn Guo | a4b4674 | 2012-04-26 20:51:36 +0800 | [diff] [blame] | 66 | .init_late = sirfsoc_init_late, |
Barry Song | d0ec63f | 2012-08-23 13:41:57 +0800 | [diff] [blame] | 67 | .dt_compat = prima2_dt_match, |
Russell King | 125c403 | 2011-11-05 10:23:27 +0000 | [diff] [blame] | 68 | .restart = sirfsoc_restart, |
Binghua Duan | 02c981c | 2011-07-08 17:40:12 +0800 | [diff] [blame] | 69 | MACHINE_END |
Barry Song | d0ec63f | 2012-08-23 13:41:57 +0800 | [diff] [blame] | 70 | #endif |
Barry Song | 4898de3 | 2012-12-20 19:37:32 +0800 | [diff] [blame] | 71 | |
| 72 | #ifdef CONFIG_ARCH_MARCO |
Barry Song | 4898de3 | 2012-12-20 19:37:32 +0800 | [diff] [blame] | 73 | static const char *marco_dt_match[] __initdata = { |
| 74 | "sirf,marco", |
| 75 | NULL |
| 76 | }; |
| 77 | |
| 78 | DT_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 Bergmann | 275786b | 2013-03-19 15:27:22 +0100 | [diff] [blame] | 82 | .init_time = sirfsoc_init_time, |
Barry Song | 4898de3 | 2012-12-20 19:37:32 +0800 | [diff] [blame] | 83 | .init_late = sirfsoc_init_late, |
| 84 | .dt_compat = marco_dt_match, |
| 85 | .restart = sirfsoc_restart, |
| 86 | MACHINE_END |
| 87 | #endif |