aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap1
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap1')
-rw-r--r--arch/arm/mach-omap1/board-ams-delta.c1
-rw-r--r--arch/arm/mach-omap1/board-fsample.c1
-rw-r--r--arch/arm/mach-omap1/board-generic.c1
-rw-r--r--arch/arm/mach-omap1/board-h2.c1
-rw-r--r--arch/arm/mach-omap1/board-h3.c1
-rw-r--r--arch/arm/mach-omap1/board-htcherald.c1
-rw-r--r--arch/arm/mach-omap1/board-innovator.c1
-rw-r--r--arch/arm/mach-omap1/board-nokia770.c1
-rw-r--r--arch/arm/mach-omap1/board-osk.c1
-rw-r--r--arch/arm/mach-omap1/board-palmte.c1
-rw-r--r--arch/arm/mach-omap1/board-palmtt.c1
-rw-r--r--arch/arm/mach-omap1/board-palmz71.c1
-rw-r--r--arch/arm/mach-omap1/board-perseus2.c1
-rw-r--r--arch/arm/mach-omap1/board-sx1.c1
-rw-r--r--arch/arm/mach-omap1/board-voiceblue.c6
-rw-r--r--arch/arm/mach-omap1/common.h1
-rw-r--r--arch/arm/mach-omap1/reset.c5
-rw-r--r--arch/arm/mach-omap1/time.c58
18 files changed, 22 insertions, 62 deletions
diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c
index af7911963c0d..88909cc0b254 100644
--- a/arch/arm/mach-omap1/board-ams-delta.c
+++ b/arch/arm/mach-omap1/board-ams-delta.c
@@ -386,6 +386,7 @@ MACHINE_START(AMS_DELTA, "Amstrad E3 (Delta)")
386 .init_irq = omap1_init_irq, 386 .init_irq = omap1_init_irq,
387 .init_machine = ams_delta_init, 387 .init_machine = ams_delta_init,
388 .timer = &omap1_timer, 388 .timer = &omap1_timer,
389 .restart = omap1_restart,
389MACHINE_END 390MACHINE_END
390 391
391EXPORT_SYMBOL(ams_delta_latch1_write); 392EXPORT_SYMBOL(ams_delta_latch1_write);
diff --git a/arch/arm/mach-omap1/board-fsample.c b/arch/arm/mach-omap1/board-fsample.c
index b9c4c0f933ee..0b9464b41212 100644
--- a/arch/arm/mach-omap1/board-fsample.c
+++ b/arch/arm/mach-omap1/board-fsample.c
@@ -390,4 +390,5 @@ MACHINE_START(OMAP_FSAMPLE, "OMAP730 F-Sample")
390 .init_irq = omap1_init_irq, 390 .init_irq = omap1_init_irq,
391 .init_machine = omap_fsample_init, 391 .init_machine = omap_fsample_init,
392 .timer = &omap1_timer, 392 .timer = &omap1_timer,
393 .restart = omap1_restart,
393MACHINE_END 394MACHINE_END
diff --git a/arch/arm/mach-omap1/board-generic.c b/arch/arm/mach-omap1/board-generic.c
index 7f41d7a504a5..9a5fe581bc1c 100644
--- a/arch/arm/mach-omap1/board-generic.c
+++ b/arch/arm/mach-omap1/board-generic.c
@@ -89,4 +89,5 @@ MACHINE_START(OMAP_GENERIC, "Generic OMAP1510/1610/1710")
89 .init_irq = omap1_init_irq, 89 .init_irq = omap1_init_irq,
90 .init_machine = omap_generic_init, 90 .init_machine = omap_generic_init,
91 .timer = &omap1_timer, 91 .timer = &omap1_timer,
92 .restart = omap1_restart,
92MACHINE_END 93MACHINE_END
diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c
index 7933b97698f8..00ad6b22d60a 100644
--- a/arch/arm/mach-omap1/board-h2.c
+++ b/arch/arm/mach-omap1/board-h2.c
@@ -456,4 +456,5 @@ MACHINE_START(OMAP_H2, "TI-H2")
456 .init_irq = omap1_init_irq, 456 .init_irq = omap1_init_irq,
457 .init_machine = h2_init, 457 .init_machine = h2_init,
458 .timer = &omap1_timer, 458 .timer = &omap1_timer,
459 .restart = omap1_restart,
459MACHINE_END 460MACHINE_END
diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c
index 04be2f83ca09..4a7f25149703 100644
--- a/arch/arm/mach-omap1/board-h3.c
+++ b/arch/arm/mach-omap1/board-h3.c
@@ -444,4 +444,5 @@ MACHINE_START(OMAP_H3, "TI OMAP1710 H3 board")
444 .init_irq = omap1_init_irq, 444 .init_irq = omap1_init_irq,
445 .init_machine = h3_init, 445 .init_machine = h3_init,
446 .timer = &omap1_timer, 446 .timer = &omap1_timer,
447 .restart = omap1_restart,
447MACHINE_END 448MACHINE_END
diff --git a/arch/arm/mach-omap1/board-htcherald.c b/arch/arm/mach-omap1/board-htcherald.c
index 46fcfeb1f11e..731cc3db7ab3 100644
--- a/arch/arm/mach-omap1/board-htcherald.c
+++ b/arch/arm/mach-omap1/board-htcherald.c
@@ -610,4 +610,5 @@ MACHINE_START(HERALD, "HTC Herald")
610 .init_irq = omap1_init_irq, 610 .init_irq = omap1_init_irq,
611 .init_machine = htcherald_init, 611 .init_machine = htcherald_init,
612 .timer = &omap1_timer, 612 .timer = &omap1_timer,
613 .restart = omap1_restart,
613MACHINE_END 614MACHINE_END
diff --git a/arch/arm/mach-omap1/board-innovator.c b/arch/arm/mach-omap1/board-innovator.c
index f99d11de1531..309369ea6978 100644
--- a/arch/arm/mach-omap1/board-innovator.c
+++ b/arch/arm/mach-omap1/board-innovator.c
@@ -460,4 +460,5 @@ MACHINE_START(OMAP_INNOVATOR, "TI-Innovator")
460 .init_irq = omap1_init_irq, 460 .init_irq = omap1_init_irq,
461 .init_machine = innovator_init, 461 .init_machine = innovator_init,
462 .timer = &omap1_timer, 462 .timer = &omap1_timer,
463 .restart = omap1_restart,
463MACHINE_END 464MACHINE_END
diff --git a/arch/arm/mach-omap1/board-nokia770.c b/arch/arm/mach-omap1/board-nokia770.c
index c64342388ec3..f9efc036ba96 100644
--- a/arch/arm/mach-omap1/board-nokia770.c
+++ b/arch/arm/mach-omap1/board-nokia770.c
@@ -259,4 +259,5 @@ MACHINE_START(NOKIA770, "Nokia 770")
259 .init_irq = omap1_init_irq, 259 .init_irq = omap1_init_irq,
260 .init_machine = omap_nokia770_init, 260 .init_machine = omap_nokia770_init,
261 .timer = &omap1_timer, 261 .timer = &omap1_timer,
262 .restart = omap1_restart,
262MACHINE_END 263MACHINE_END
diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c
index a409dfcc5b18..675de06557aa 100644
--- a/arch/arm/mach-omap1/board-osk.c
+++ b/arch/arm/mach-omap1/board-osk.c
@@ -578,4 +578,5 @@ MACHINE_START(OMAP_OSK, "TI-OSK")
578 .init_irq = omap1_init_irq, 578 .init_irq = omap1_init_irq,
579 .init_machine = osk_init, 579 .init_machine = osk_init,
580 .timer = &omap1_timer, 580 .timer = &omap1_timer,
581 .restart = omap1_restart,
581MACHINE_END 582MACHINE_END
diff --git a/arch/arm/mach-omap1/board-palmte.c b/arch/arm/mach-omap1/board-palmte.c
index 105292d39484..81fa27f88369 100644
--- a/arch/arm/mach-omap1/board-palmte.c
+++ b/arch/arm/mach-omap1/board-palmte.c
@@ -270,4 +270,5 @@ MACHINE_START(OMAP_PALMTE, "OMAP310 based Palm Tungsten E")
270 .init_irq = omap1_init_irq, 270 .init_irq = omap1_init_irq,
271 .init_machine = omap_palmte_init, 271 .init_machine = omap_palmte_init,
272 .timer = &omap1_timer, 272 .timer = &omap1_timer,
273 .restart = omap1_restart,
273MACHINE_END 274MACHINE_END
diff --git a/arch/arm/mach-omap1/board-palmtt.c b/arch/arm/mach-omap1/board-palmtt.c
index 387a9006358d..81cb82178388 100644
--- a/arch/arm/mach-omap1/board-palmtt.c
+++ b/arch/arm/mach-omap1/board-palmtt.c
@@ -317,4 +317,5 @@ MACHINE_START(OMAP_PALMTT, "OMAP1510 based Palm Tungsten|T")
317 .init_irq = omap1_init_irq, 317 .init_irq = omap1_init_irq,
318 .init_machine = omap_palmtt_init, 318 .init_machine = omap_palmtt_init,
319 .timer = &omap1_timer, 319 .timer = &omap1_timer,
320 .restart = omap1_restart,
320MACHINE_END 321MACHINE_END
diff --git a/arch/arm/mach-omap1/board-palmz71.c b/arch/arm/mach-omap1/board-palmz71.c
index df6d15e68aad..e881945ce8ec 100644
--- a/arch/arm/mach-omap1/board-palmz71.c
+++ b/arch/arm/mach-omap1/board-palmz71.c
@@ -334,4 +334,5 @@ MACHINE_START(OMAP_PALMZ71, "OMAP310 based Palm Zire71")
334 .init_irq = omap1_init_irq, 334 .init_irq = omap1_init_irq,
335 .init_machine = omap_palmz71_init, 335 .init_machine = omap_palmz71_init,
336 .timer = &omap1_timer, 336 .timer = &omap1_timer,
337 .restart = omap1_restart,
337MACHINE_END 338MACHINE_END
diff --git a/arch/arm/mach-omap1/board-perseus2.c b/arch/arm/mach-omap1/board-perseus2.c
index 57ecd7e09831..c000bed76276 100644
--- a/arch/arm/mach-omap1/board-perseus2.c
+++ b/arch/arm/mach-omap1/board-perseus2.c
@@ -352,4 +352,5 @@ MACHINE_START(OMAP_PERSEUS2, "OMAP730 Perseus2")
352 .init_irq = omap1_init_irq, 352 .init_irq = omap1_init_irq,
353 .init_machine = omap_perseus2_init, 353 .init_machine = omap_perseus2_init,
354 .timer = &omap1_timer, 354 .timer = &omap1_timer,
355 .restart = omap1_restart,
355MACHINE_END 356MACHINE_END
diff --git a/arch/arm/mach-omap1/board-sx1.c b/arch/arm/mach-omap1/board-sx1.c
index 774ae39fd636..7bcd82ab0fd0 100644
--- a/arch/arm/mach-omap1/board-sx1.c
+++ b/arch/arm/mach-omap1/board-sx1.c
@@ -416,4 +416,5 @@ MACHINE_START(SX1, "OMAP310 based Siemens SX1")
416 .init_irq = omap1_init_irq, 416 .init_irq = omap1_init_irq,
417 .init_machine = omap_sx1_init, 417 .init_machine = omap_sx1_init,
418 .timer = &omap1_timer, 418 .timer = &omap1_timer,
419 .restart = omap1_restart,
419MACHINE_END 420MACHINE_END
diff --git a/arch/arm/mach-omap1/board-voiceblue.c b/arch/arm/mach-omap1/board-voiceblue.c
index 7721c146d8d6..f83a502dc93c 100644
--- a/arch/arm/mach-omap1/board-voiceblue.c
+++ b/arch/arm/mach-omap1/board-voiceblue.c
@@ -28,7 +28,6 @@
28#include <linux/export.h> 28#include <linux/export.h>
29 29
30#include <mach/hardware.h> 30#include <mach/hardware.h>
31#include <mach/system.h>
32#include <asm/mach-types.h> 31#include <asm/mach-types.h>
33#include <asm/mach/arch.h> 32#include <asm/mach/arch.h>
34#include <asm/mach/map.h> 33#include <asm/mach/map.h>
@@ -221,7 +220,7 @@ void voiceblue_wdt_ping(void)
221 gpio_set_value(0, wdt_gpio_state); 220 gpio_set_value(0, wdt_gpio_state);
222} 221}
223 222
224static void voiceblue_reset(char mode, const char *cmd) 223static void voiceblue_restart(char mode, const char *cmd)
225{ 224{
226 /* 225 /*
227 * Workaround for 5912/1611b bug mentioned in sprz209d.pdf p. 28 226 * Workaround for 5912/1611b bug mentioned in sprz209d.pdf p. 28
@@ -285,8 +284,6 @@ static void __init voiceblue_init(void)
285 * (it is connected through invertor) */ 284 * (it is connected through invertor) */
286 omap_writeb(0x00, OMAP_LPG1_LCR); 285 omap_writeb(0x00, OMAP_LPG1_LCR);
287 omap_writeb(0x00, OMAP_LPG1_PMR); /* Disable clock */ 286 omap_writeb(0x00, OMAP_LPG1_PMR); /* Disable clock */
288
289 arch_reset = voiceblue_reset;
290} 287}
291 288
292MACHINE_START(VOICEBLUE, "VoiceBlue OMAP5910") 289MACHINE_START(VOICEBLUE, "VoiceBlue OMAP5910")
@@ -298,4 +295,5 @@ MACHINE_START(VOICEBLUE, "VoiceBlue OMAP5910")
298 .init_irq = omap1_init_irq, 295 .init_irq = omap1_init_irq,
299 .init_machine = voiceblue_init, 296 .init_machine = voiceblue_init,
300 .timer = &omap1_timer, 297 .timer = &omap1_timer,
298 .restart = voiceblue_restart,
301MACHINE_END 299MACHINE_END
diff --git a/arch/arm/mach-omap1/common.h b/arch/arm/mach-omap1/common.h
index 52c4eda97fa8..a9a5146dd2d4 100644
--- a/arch/arm/mach-omap1/common.h
+++ b/arch/arm/mach-omap1/common.h
@@ -54,6 +54,7 @@ static inline void omap16xx_map_io(void)
54 54
55void omap1_init_early(void); 55void omap1_init_early(void);
56void omap1_init_irq(void); 56void omap1_init_irq(void);
57void omap1_restart(char, const char *);
57 58
58extern struct sys_timer omap1_timer; 59extern struct sys_timer omap1_timer;
59extern bool omap_32k_timer_init(void); 60extern bool omap_32k_timer_init(void);
diff --git a/arch/arm/mach-omap1/reset.c b/arch/arm/mach-omap1/reset.c
index ad951ee69205..91d199b64979 100644
--- a/arch/arm/mach-omap1/reset.c
+++ b/arch/arm/mach-omap1/reset.c
@@ -5,10 +5,9 @@
5#include <linux/io.h> 5#include <linux/io.h>
6 6
7#include <mach/hardware.h> 7#include <mach/hardware.h>
8#include <mach/system.h>
9#include <plat/prcm.h> 8#include <plat/prcm.h>
10 9
11void omap1_arch_reset(char mode, const char *cmd) 10void omap1_restart(char mode, const char *cmd)
12{ 11{
13 /* 12 /*
14 * Workaround for 5912/1611b bug mentioned in sprz209d.pdf p. 28 13 * Workaround for 5912/1611b bug mentioned in sprz209d.pdf p. 28
@@ -21,5 +20,3 @@ void omap1_arch_reset(char mode, const char *cmd)
21 20
22 omap_writew(1, ARM_RSTCT1); 21 omap_writew(1, ARM_RSTCT1);
23} 22}
24
25void (*arch_reset)(char, const char *) = omap1_arch_reset;
diff --git a/arch/arm/mach-omap1/time.c b/arch/arm/mach-omap1/time.c
index 485a21d31004..b8faffa44f9e 100644
--- a/arch/arm/mach-omap1/time.c
+++ b/arch/arm/mach-omap1/time.c
@@ -37,7 +37,6 @@
37#include <linux/init.h> 37#include <linux/init.h>
38#include <linux/delay.h> 38#include <linux/delay.h>
39#include <linux/interrupt.h> 39#include <linux/interrupt.h>
40#include <linux/sched.h>
41#include <linux/spinlock.h> 40#include <linux/spinlock.h>
42#include <linux/clk.h> 41#include <linux/clk.h>
43#include <linux/err.h> 42#include <linux/err.h>
@@ -190,30 +189,9 @@ static __init void omap_init_mpu_timer(unsigned long rate)
190 * --------------------------------------------------------------------------- 189 * ---------------------------------------------------------------------------
191 */ 190 */
192 191
193static DEFINE_CLOCK_DATA(cd); 192static u32 notrace omap_mpu_read_sched_clock(void)
194
195static inline unsigned long long notrace _omap_mpu_sched_clock(void)
196{
197 u32 cyc = ~omap_mpu_timer_read(1);
198 return cyc_to_sched_clock(&cd, cyc, (u32)~0);
199}
200
201#ifndef CONFIG_OMAP_32K_TIMER
202unsigned long long notrace sched_clock(void)
203{
204 return _omap_mpu_sched_clock();
205}
206#else
207static unsigned long long notrace omap_mpu_sched_clock(void)
208{
209 return _omap_mpu_sched_clock();
210}
211#endif
212
213static void notrace mpu_update_sched_clock(void)
214{ 193{
215 u32 cyc = ~omap_mpu_timer_read(1); 194 return ~omap_mpu_timer_read(1);
216 update_sched_clock(&cd, cyc, (u32)~0);
217} 195}
218 196
219static void __init omap_init_clocksource(unsigned long rate) 197static void __init omap_init_clocksource(unsigned long rate)
@@ -223,7 +201,7 @@ static void __init omap_init_clocksource(unsigned long rate)
223 "%s: can't register clocksource!\n"; 201 "%s: can't register clocksource!\n";
224 202
225 omap_mpu_timer_start(1, ~0, 1); 203 omap_mpu_timer_start(1, ~0, 1);
226 init_sched_clock(&cd, mpu_update_sched_clock, 32, rate); 204 setup_sched_clock(omap_mpu_read_sched_clock, 32, rate);
227 205
228 if (clocksource_mmio_init(&timer->read_tim, "mpu_timer2", rate, 206 if (clocksource_mmio_init(&timer->read_tim, "mpu_timer2", rate,
229 300, 32, clocksource_mmio_readl_down)) 207 300, 32, clocksource_mmio_readl_down))
@@ -254,30 +232,6 @@ static inline void omap_mpu_timer_init(void)
254} 232}
255#endif /* CONFIG_OMAP_MPU_TIMER */ 233#endif /* CONFIG_OMAP_MPU_TIMER */
256 234
257#if defined(CONFIG_OMAP_MPU_TIMER) && defined(CONFIG_OMAP_32K_TIMER)
258static unsigned long long (*preferred_sched_clock)(void);
259
260unsigned long long notrace sched_clock(void)
261{
262 if (!preferred_sched_clock)
263 return 0;
264
265 return preferred_sched_clock();
266}
267
268static inline void preferred_sched_clock_init(bool use_32k_sched_clock)
269{
270 if (use_32k_sched_clock)
271 preferred_sched_clock = omap_32k_sched_clock;
272 else
273 preferred_sched_clock = omap_mpu_sched_clock;
274}
275#else
276static inline void preferred_sched_clock_init(bool use_32k_sched_clcok)
277{
278}
279#endif
280
281static inline int omap_32k_timer_usable(void) 235static inline int omap_32k_timer_usable(void)
282{ 236{
283 int res = false; 237 int res = false;
@@ -299,12 +253,8 @@ static inline int omap_32k_timer_usable(void)
299 */ 253 */
300static void __init omap1_timer_init(void) 254static void __init omap1_timer_init(void)
301{ 255{
302 if (omap_32k_timer_usable()) { 256 if (!omap_32k_timer_usable())
303 preferred_sched_clock_init(1);
304 } else {
305 omap_mpu_timer_init(); 257 omap_mpu_timer_init();
306 preferred_sched_clock_init(0);
307 }
308} 258}
309 259
310struct sys_timer omap1_timer = { 260struct sys_timer omap1_timer = {