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 | ef4acb7 | 2013-02-04 13:41:36 +0800 | [diff] [blame] | 12 | #include <linux/irqchip.h> |
Barry Song | 1bdfd27a | 2011-11-17 22:18:14 +0800 | [diff] [blame] | 13 | #include <asm/sizes.h> |
Binghua Duan | 02c981c | 2011-07-08 17:40:12 +0800 | [diff] [blame] | 14 | #include <asm/mach-types.h> |
| 15 | #include <asm/mach/arch.h> |
| 16 | #include <linux/of.h> |
| 17 | #include <linux/of_platform.h> |
| 18 | #include "common.h" |
| 19 | |
| 20 | static struct of_device_id sirfsoc_of_bus_ids[] __initdata = { |
| 21 | { .compatible = "simple-bus", }, |
| 22 | {}, |
| 23 | }; |
| 24 | |
| 25 | void __init sirfsoc_mach_init(void) |
| 26 | { |
| 27 | of_platform_bus_probe(NULL, sirfsoc_of_bus_ids, NULL); |
| 28 | } |
| 29 | |
Shawn Guo | a4b4674 | 2012-04-26 20:51:36 +0800 | [diff] [blame] | 30 | void __init sirfsoc_init_late(void) |
| 31 | { |
| 32 | sirfsoc_pm_init(); |
| 33 | } |
| 34 | |
Arnd Bergmann | 275786b | 2013-03-19 15:27:22 +0100 | [diff] [blame] | 35 | static __init void sirfsoc_init_time(void) |
| 36 | { |
| 37 | /* initialize clocking early, we want to set the OS timer */ |
| 38 | sirfsoc_of_clk_init(); |
| 39 | clocksource_of_init(); |
| 40 | } |
| 41 | |
Barry Song | 4898de3 | 2012-12-20 19:37:32 +0800 | [diff] [blame] | 42 | static __init void sirfsoc_map_io(void) |
| 43 | { |
| 44 | sirfsoc_map_lluart(); |
| 45 | sirfsoc_map_scu(); |
| 46 | } |
| 47 | |
Barry Song | d4fe49e | 2013-03-18 15:04:38 +0800 | [diff] [blame] | 48 | #ifdef CONFIG_ARCH_ATLAS6 |
| 49 | static const char *atlas6_dt_match[] __initdata = { |
| 50 | "sirf,atlas6", |
| 51 | NULL |
| 52 | }; |
| 53 | |
| 54 | DT_MACHINE_START(ATLAS6_DT, "Generic ATLAS6 (Flattened Device Tree)") |
| 55 | /* Maintainer: Barry Song <baohua.song@csr.com> */ |
Arnd Bergmann | 630be7e | 2013-03-19 12:19:01 +0100 | [diff] [blame] | 56 | .nr_irqs = 128, |
Barry Song | d4fe49e | 2013-03-18 15:04:38 +0800 | [diff] [blame] | 57 | .map_io = sirfsoc_map_io, |
Arnd Bergmann | 60dbd76 | 2013-03-19 11:21:44 +0100 | [diff] [blame] | 58 | .init_irq = irqchip_init, |
Arnd Bergmann | 275786b | 2013-03-19 15:27:22 +0100 | [diff] [blame] | 59 | .init_time = sirfsoc_init_time, |
Barry Song | d4fe49e | 2013-03-18 15:04:38 +0800 | [diff] [blame] | 60 | .init_machine = sirfsoc_mach_init, |
| 61 | .init_late = sirfsoc_init_late, |
| 62 | .dt_compat = atlas6_dt_match, |
| 63 | .restart = sirfsoc_restart, |
| 64 | MACHINE_END |
| 65 | #endif |
| 66 | |
Barry Song | d0ec63f | 2012-08-23 13:41:57 +0800 | [diff] [blame] | 67 | #ifdef CONFIG_ARCH_PRIMA2 |
| 68 | static const char *prima2_dt_match[] __initdata = { |
Barry Song | 5a0ec56 | 2013-03-05 11:00:43 +0800 | [diff] [blame^] | 69 | "sirf,prima2", |
| 70 | NULL |
Binghua Duan | 02c981c | 2011-07-08 17:40:12 +0800 | [diff] [blame] | 71 | }; |
| 72 | |
Barry Song | d0ec63f | 2012-08-23 13:41:57 +0800 | [diff] [blame] | 73 | DT_MACHINE_START(PRIMA2_DT, "Generic PRIMA2 (Flattened Device Tree)") |
Binghua Duan | 02c981c | 2011-07-08 17:40:12 +0800 | [diff] [blame] | 74 | /* Maintainer: Barry Song <baohua.song@csr.com> */ |
Arnd Bergmann | 630be7e | 2013-03-19 12:19:01 +0100 | [diff] [blame] | 75 | .nr_irqs = 128, |
Barry Song | 4898de3 | 2012-12-20 19:37:32 +0800 | [diff] [blame] | 76 | .map_io = sirfsoc_map_io, |
Arnd Bergmann | 60dbd76 | 2013-03-19 11:21:44 +0100 | [diff] [blame] | 77 | .init_irq = irqchip_init, |
Arnd Bergmann | 275786b | 2013-03-19 15:27:22 +0100 | [diff] [blame] | 78 | .init_time = sirfsoc_init_time, |
Nicolas Pitre | 98b0124 | 2011-09-02 21:05:10 -0400 | [diff] [blame] | 79 | .dma_zone_size = SZ_256M, |
Binghua Duan | 02c981c | 2011-07-08 17:40:12 +0800 | [diff] [blame] | 80 | .init_machine = sirfsoc_mach_init, |
Shawn Guo | a4b4674 | 2012-04-26 20:51:36 +0800 | [diff] [blame] | 81 | .init_late = sirfsoc_init_late, |
Barry Song | d0ec63f | 2012-08-23 13:41:57 +0800 | [diff] [blame] | 82 | .dt_compat = prima2_dt_match, |
Russell King | 125c403 | 2011-11-05 10:23:27 +0000 | [diff] [blame] | 83 | .restart = sirfsoc_restart, |
Binghua Duan | 02c981c | 2011-07-08 17:40:12 +0800 | [diff] [blame] | 84 | MACHINE_END |
Barry Song | d0ec63f | 2012-08-23 13:41:57 +0800 | [diff] [blame] | 85 | #endif |
Barry Song | 4898de3 | 2012-12-20 19:37:32 +0800 | [diff] [blame] | 86 | |
| 87 | #ifdef CONFIG_ARCH_MARCO |
Barry Song | 4898de3 | 2012-12-20 19:37:32 +0800 | [diff] [blame] | 88 | static const char *marco_dt_match[] __initdata = { |
| 89 | "sirf,marco", |
| 90 | NULL |
| 91 | }; |
| 92 | |
| 93 | DT_MACHINE_START(MARCO_DT, "Generic MARCO (Flattened Device Tree)") |
| 94 | /* Maintainer: Barry Song <baohua.song@csr.com> */ |
| 95 | .smp = smp_ops(sirfsoc_smp_ops), |
| 96 | .map_io = sirfsoc_map_io, |
Barry Song | ef4acb7 | 2013-02-04 13:41:36 +0800 | [diff] [blame] | 97 | .init_irq = irqchip_init, |
Arnd Bergmann | 275786b | 2013-03-19 15:27:22 +0100 | [diff] [blame] | 98 | .init_time = sirfsoc_init_time, |
Barry Song | 4898de3 | 2012-12-20 19:37:32 +0800 | [diff] [blame] | 99 | .init_machine = sirfsoc_mach_init, |
| 100 | .init_late = sirfsoc_init_late, |
| 101 | .dt_compat = marco_dt_match, |
| 102 | .restart = sirfsoc_restart, |
| 103 | MACHINE_END |
| 104 | #endif |