diff options
Diffstat (limited to 'arch/arm/mach-vexpress/v2m.c')
-rw-r--r-- | arch/arm/mach-vexpress/v2m.c | 39 |
1 files changed, 19 insertions, 20 deletions
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 | ||