diff options
Diffstat (limited to 'arch/arm/mach-vexpress')
-rw-r--r-- | arch/arm/mach-vexpress/ct-ca9x4.c | 19 | ||||
-rw-r--r-- | arch/arm/mach-vexpress/include/mach/smp.h | 13 | ||||
-rw-r--r-- | arch/arm/mach-vexpress/v2m.c | 39 |
3 files changed, 36 insertions, 35 deletions
diff --git a/arch/arm/mach-vexpress/ct-ca9x4.c b/arch/arm/mach-vexpress/ct-ca9x4.c index ebc22e759325..765a71ff7f3b 100644 --- a/arch/arm/mach-vexpress/ct-ca9x4.c +++ b/arch/arm/mach-vexpress/ct-ca9x4.c | |||
@@ -71,8 +71,9 @@ static void __init ct_ca9x4_timer_init(void) | |||
71 | writel(0, MMIO_P2V(CT_CA9X4_TIMER0) + TIMER_CTRL); | 71 | writel(0, MMIO_P2V(CT_CA9X4_TIMER0) + TIMER_CTRL); |
72 | writel(0, MMIO_P2V(CT_CA9X4_TIMER1) + TIMER_CTRL); | 72 | writel(0, MMIO_P2V(CT_CA9X4_TIMER1) + TIMER_CTRL); |
73 | 73 | ||
74 | sp804_clocksource_init(MMIO_P2V(CT_CA9X4_TIMER1)); | 74 | sp804_clocksource_init(MMIO_P2V(CT_CA9X4_TIMER1), "ct-timer1"); |
75 | sp804_clockevents_init(MMIO_P2V(CT_CA9X4_TIMER0), IRQ_CT_CA9X4_TIMER0); | 75 | sp804_clockevents_init(MMIO_P2V(CT_CA9X4_TIMER0), IRQ_CT_CA9X4_TIMER0, |
76 | "ct-timer0"); | ||
76 | } | 77 | } |
77 | 78 | ||
78 | static struct sys_timer ct_ca9x4_timer = { | 79 | static struct sys_timer ct_ca9x4_timer = { |
@@ -141,10 +142,22 @@ static struct clk osc1_clk = { | |||
141 | .rate = 24000000, | 142 | .rate = 24000000, |
142 | }; | 143 | }; |
143 | 144 | ||
145 | static struct clk ct_sp804_clk = { | ||
146 | .rate = 1000000, | ||
147 | }; | ||
148 | |||
144 | static struct clk_lookup lookups[] = { | 149 | static struct clk_lookup lookups[] = { |
145 | { /* CLCD */ | 150 | { /* CLCD */ |
146 | .dev_id = "ct:clcd", | 151 | .dev_id = "ct:clcd", |
147 | .clk = &osc1_clk, | 152 | .clk = &osc1_clk, |
153 | }, { /* SP804 timers */ | ||
154 | .dev_id = "sp804", | ||
155 | .con_id = "ct-timer0", | ||
156 | .clk = &ct_sp804_clk, | ||
157 | }, { /* SP804 timers */ | ||
158 | .dev_id = "sp804", | ||
159 | .con_id = "ct-timer1", | ||
160 | .clk = &ct_sp804_clk, | ||
148 | }, | 161 | }, |
149 | }; | 162 | }; |
150 | 163 | ||
@@ -210,6 +223,8 @@ static void ct_ca9x4_init_cpu_map(void) | |||
210 | 223 | ||
211 | for (i = 0; i < ncores; ++i) | 224 | for (i = 0; i < ncores; ++i) |
212 | set_cpu_possible(i, true); | 225 | set_cpu_possible(i, true); |
226 | |||
227 | set_smp_cross_call(gic_raise_softirq); | ||
213 | } | 228 | } |
214 | 229 | ||
215 | static void ct_ca9x4_smp_enable(unsigned int max_cpus) | 230 | static void ct_ca9x4_smp_enable(unsigned int max_cpus) |
diff --git a/arch/arm/mach-vexpress/include/mach/smp.h b/arch/arm/mach-vexpress/include/mach/smp.h deleted file mode 100644 index 4c05e4a9713a..000000000000 --- a/arch/arm/mach-vexpress/include/mach/smp.h +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | #ifndef __MACH_SMP_H | ||
2 | #define __MACH_SMP_H | ||
3 | |||
4 | #include <asm/hardware/gic.h> | ||
5 | |||
6 | /* | ||
7 | * We use IRQ1 as the IPI | ||
8 | */ | ||
9 | static inline void smp_cross_call(const struct cpumask *mask, int ipi) | ||
10 | { | ||
11 | gic_raise_softirq(mask, ipi); | ||
12 | } | ||
13 | #endif | ||
diff --git a/arch/arm/mach-vexpress/v2m.c b/arch/arm/mach-vexpress/v2m.c index ba46e8e07437..285edcd2da2a 100644 --- a/arch/arm/mach-vexpress/v2m.c +++ b/arch/arm/mach-vexpress/v2m.c | |||
@@ -13,11 +13,11 @@ | |||
13 | #include <linux/sysdev.h> | 13 | #include <linux/sysdev.h> |
14 | #include <linux/usb/isp1760.h> | 14 | #include <linux/usb/isp1760.h> |
15 | #include <linux/clkdev.h> | 15 | #include <linux/clkdev.h> |
16 | #include <linux/mtd/physmap.h> | ||
16 | 17 | ||
17 | #include <asm/mach-types.h> | 18 | #include <asm/mach-types.h> |
18 | #include <asm/sizes.h> | 19 | #include <asm/sizes.h> |
19 | #include <asm/mach/arch.h> | 20 | #include <asm/mach/arch.h> |
20 | #include <asm/mach/flash.h> | ||
21 | #include <asm/mach/map.h> | 21 | #include <asm/mach/map.h> |
22 | #include <asm/mach/time.h> | 22 | #include <asm/mach/time.h> |
23 | #include <asm/hardware/arm_timer.h> | 23 | #include <asm/hardware/arm_timer.h> |
@@ -65,8 +65,9 @@ static void __init v2m_timer_init(void) | |||
65 | writel(0, MMIO_P2V(V2M_TIMER0) + TIMER_CTRL); | 65 | writel(0, MMIO_P2V(V2M_TIMER0) + TIMER_CTRL); |
66 | writel(0, MMIO_P2V(V2M_TIMER1) + TIMER_CTRL); | 66 | writel(0, MMIO_P2V(V2M_TIMER1) + TIMER_CTRL); |
67 | 67 | ||
68 | sp804_clocksource_init(MMIO_P2V(V2M_TIMER1)); | 68 | sp804_clocksource_init(MMIO_P2V(V2M_TIMER1), "v2m-timer1"); |
69 | sp804_clockevents_init(MMIO_P2V(V2M_TIMER0), IRQ_V2M_TIMER0); | 69 | sp804_clockevents_init(MMIO_P2V(V2M_TIMER0), IRQ_V2M_TIMER0, |
70 | "v2m-timer0"); | ||
70 | } | 71 | } |
71 | 72 | ||
72 | static struct sys_timer v2m_timer = { | 73 | static struct sys_timer v2m_timer = { |
@@ -206,27 +207,13 @@ static struct platform_device v2m_usb_device = { | |||
206 | .dev.platform_data = &v2m_usb_config, | 207 | .dev.platform_data = &v2m_usb_config, |
207 | }; | 208 | }; |
208 | 209 | ||
209 | static int v2m_flash_init(void) | 210 | static void v2m_flash_set_vpp(struct platform_device *pdev, int on) |
210 | { | ||
211 | writel(0, MMIO_P2V(V2M_SYS_FLASH)); | ||
212 | return 0; | ||
213 | } | ||
214 | |||
215 | static void v2m_flash_exit(void) | ||
216 | { | ||
217 | writel(0, MMIO_P2V(V2M_SYS_FLASH)); | ||
218 | } | ||
219 | |||
220 | static void v2m_flash_set_vpp(int on) | ||
221 | { | 211 | { |
222 | writel(on != 0, MMIO_P2V(V2M_SYS_FLASH)); | 212 | writel(on != 0, MMIO_P2V(V2M_SYS_FLASH)); |
223 | } | 213 | } |
224 | 214 | ||
225 | static struct flash_platform_data v2m_flash_data = { | 215 | static struct physmap_flash_data v2m_flash_data = { |
226 | .map_name = "cfi_probe", | ||
227 | .width = 4, | 216 | .width = 4, |
228 | .init = v2m_flash_init, | ||
229 | .exit = v2m_flash_exit, | ||
230 | .set_vpp = v2m_flash_set_vpp, | 217 | .set_vpp = v2m_flash_set_vpp, |
231 | }; | 218 | }; |
232 | 219 | ||
@@ -243,7 +230,7 @@ static struct resource v2m_flash_resources[] = { | |||
243 | }; | 230 | }; |
244 | 231 | ||
245 | static struct platform_device v2m_flash_device = { | 232 | static struct platform_device v2m_flash_device = { |
246 | .name = "armflash", | 233 | .name = "physmap-flash", |
247 | .id = -1, | 234 | .id = -1, |
248 | .resource = v2m_flash_resources, | 235 | .resource = v2m_flash_resources, |
249 | .num_resources = ARRAY_SIZE(v2m_flash_resources), | 236 | .num_resources = ARRAY_SIZE(v2m_flash_resources), |
@@ -333,6 +320,10 @@ static struct clk osc2_clk = { | |||
333 | .rate = 24000000, | 320 | .rate = 24000000, |
334 | }; | 321 | }; |
335 | 322 | ||
323 | static struct clk v2m_sp804_clk = { | ||
324 | .rate = 1000000, | ||
325 | }; | ||
326 | |||
336 | static struct clk dummy_apb_pclk; | 327 | static struct clk dummy_apb_pclk; |
337 | 328 | ||
338 | static struct clk_lookup v2m_lookups[] = { | 329 | static struct clk_lookup v2m_lookups[] = { |
@@ -363,6 +354,14 @@ static struct clk_lookup v2m_lookups[] = { | |||
363 | }, { /* CLCD */ | 354 | }, { /* CLCD */ |
364 | .dev_id = "mb:clcd", | 355 | .dev_id = "mb:clcd", |
365 | .clk = &osc1_clk, | 356 | .clk = &osc1_clk, |
357 | }, { /* SP804 timers */ | ||
358 | .dev_id = "sp804", | ||
359 | .con_id = "v2m-timer0", | ||
360 | .clk = &v2m_sp804_clk, | ||
361 | }, { /* SP804 timers */ | ||
362 | .dev_id = "sp804", | ||
363 | .con_id = "v2m-timer1", | ||
364 | .clk = &v2m_sp804_clk, | ||
366 | }, | 365 | }, |
367 | }; | 366 | }; |
368 | 367 | ||