diff options
Diffstat (limited to 'arch/arm/mach-versatile')
-rw-r--r-- | arch/arm/mach-versatile/core.c | 44 |
1 files changed, 14 insertions, 30 deletions
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c index eb7ffa0ee8b5..0c99cf076c63 100644 --- a/arch/arm/mach-versatile/core.c +++ b/arch/arm/mach-versatile/core.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/io.h> | 32 | #include <linux/io.h> |
33 | #include <linux/gfp.h> | 33 | #include <linux/gfp.h> |
34 | #include <linux/clkdev.h> | 34 | #include <linux/clkdev.h> |
35 | #include <linux/mtd/physmap.h> | ||
35 | 36 | ||
36 | #include <asm/system.h> | 37 | #include <asm/system.h> |
37 | #include <asm/irq.h> | 38 | #include <asm/irq.h> |
@@ -42,7 +43,6 @@ | |||
42 | #include <asm/mach-types.h> | 43 | #include <asm/mach-types.h> |
43 | 44 | ||
44 | #include <asm/mach/arch.h> | 45 | #include <asm/mach/arch.h> |
45 | #include <asm/mach/flash.h> | ||
46 | #include <asm/mach/irq.h> | 46 | #include <asm/mach/irq.h> |
47 | #include <asm/mach/time.h> | 47 | #include <asm/mach/time.h> |
48 | #include <asm/mach/map.h> | 48 | #include <asm/mach/map.h> |
@@ -190,27 +190,7 @@ void __init versatile_map_io(void) | |||
190 | 190 | ||
191 | #define VERSATILE_FLASHCTRL (__io_address(VERSATILE_SYS_BASE) + VERSATILE_SYS_FLASH_OFFSET) | 191 | #define VERSATILE_FLASHCTRL (__io_address(VERSATILE_SYS_BASE) + VERSATILE_SYS_FLASH_OFFSET) |
192 | 192 | ||
193 | static int versatile_flash_init(void) | 193 | static void versatile_flash_set_vpp(struct platform_device *pdev, int on) |
194 | { | ||
195 | u32 val; | ||
196 | |||
197 | val = __raw_readl(VERSATILE_FLASHCTRL); | ||
198 | val &= ~VERSATILE_FLASHPROG_FLVPPEN; | ||
199 | __raw_writel(val, VERSATILE_FLASHCTRL); | ||
200 | |||
201 | return 0; | ||
202 | } | ||
203 | |||
204 | static void versatile_flash_exit(void) | ||
205 | { | ||
206 | u32 val; | ||
207 | |||
208 | val = __raw_readl(VERSATILE_FLASHCTRL); | ||
209 | val &= ~VERSATILE_FLASHPROG_FLVPPEN; | ||
210 | __raw_writel(val, VERSATILE_FLASHCTRL); | ||
211 | } | ||
212 | |||
213 | static void versatile_flash_set_vpp(int on) | ||
214 | { | 194 | { |
215 | u32 val; | 195 | u32 val; |
216 | 196 | ||
@@ -222,11 +202,8 @@ static void versatile_flash_set_vpp(int on) | |||
222 | __raw_writel(val, VERSATILE_FLASHCTRL); | 202 | __raw_writel(val, VERSATILE_FLASHCTRL); |
223 | } | 203 | } |
224 | 204 | ||
225 | static struct flash_platform_data versatile_flash_data = { | 205 | static struct physmap_flash_data versatile_flash_data = { |
226 | .map_name = "cfi_probe", | ||
227 | .width = 4, | 206 | .width = 4, |
228 | .init = versatile_flash_init, | ||
229 | .exit = versatile_flash_exit, | ||
230 | .set_vpp = versatile_flash_set_vpp, | 207 | .set_vpp = versatile_flash_set_vpp, |
231 | }; | 208 | }; |
232 | 209 | ||
@@ -237,7 +214,7 @@ static struct resource versatile_flash_resource = { | |||
237 | }; | 214 | }; |
238 | 215 | ||
239 | static struct platform_device versatile_flash_device = { | 216 | static struct platform_device versatile_flash_device = { |
240 | .name = "armflash", | 217 | .name = "physmap-flash", |
241 | .id = 0, | 218 | .id = 0, |
242 | .dev = { | 219 | .dev = { |
243 | .platform_data = &versatile_flash_data, | 220 | .platform_data = &versatile_flash_data, |
@@ -375,6 +352,10 @@ static struct clk ref24_clk = { | |||
375 | .rate = 24000000, | 352 | .rate = 24000000, |
376 | }; | 353 | }; |
377 | 354 | ||
355 | static struct clk sp804_clk = { | ||
356 | .rate = 1000000, | ||
357 | }; | ||
358 | |||
378 | static struct clk dummy_apb_pclk; | 359 | static struct clk dummy_apb_pclk; |
379 | 360 | ||
380 | static struct clk_lookup lookups[] = { | 361 | static struct clk_lookup lookups[] = { |
@@ -411,7 +392,10 @@ static struct clk_lookup lookups[] = { | |||
411 | }, { /* CLCD */ | 392 | }, { /* CLCD */ |
412 | .dev_id = "dev:20", | 393 | .dev_id = "dev:20", |
413 | .clk = &osc4_clk, | 394 | .clk = &osc4_clk, |
414 | } | 395 | }, { /* SP804 timers */ |
396 | .dev_id = "sp804", | ||
397 | .clk = &sp804_clk, | ||
398 | }, | ||
415 | }; | 399 | }; |
416 | 400 | ||
417 | /* | 401 | /* |
@@ -764,8 +748,8 @@ static void __init versatile_timer_init(void) | |||
764 | writel(0, TIMER2_VA_BASE + TIMER_CTRL); | 748 | writel(0, TIMER2_VA_BASE + TIMER_CTRL); |
765 | writel(0, TIMER3_VA_BASE + TIMER_CTRL); | 749 | writel(0, TIMER3_VA_BASE + TIMER_CTRL); |
766 | 750 | ||
767 | sp804_clocksource_init(TIMER3_VA_BASE); | 751 | sp804_clocksource_init(TIMER3_VA_BASE, "timer3"); |
768 | sp804_clockevents_init(TIMER0_VA_BASE, IRQ_TIMERINT0_1); | 752 | sp804_clockevents_init(TIMER0_VA_BASE, IRQ_TIMERINT0_1, "timer0"); |
769 | } | 753 | } |
770 | 754 | ||
771 | struct sys_timer versatile_timer = { | 755 | struct sys_timer versatile_timer = { |