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