aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k/atari
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2012-11-08 13:34:55 -0500
committerStephen Warren <swarren@nvidia.com>2012-12-24 11:36:34 -0500
commitc8d5ba1891eda2aa63800f052cb5af128283d130 (patch)
tree59a18c2262607b4067739fe4dfed3c6fa8e40f14 /arch/m68k/atari
parent7b1f62076bba10786d2118006ae68ac120cd6c56 (diff)
m68k: set arch_gettimeoffset directly
remove m68k's mach_gettimeoffset function pointer, and instead directly set the arch_gettimeoffset function pointer. This requires multiplying all function results by 1000, since the removed m68k_gettimeoffset() did this. Also, s/unsigned long/u32/ just to make the function prototypes exactly match that of arch_gettimeoffset. Cc: Joshua Thompson <funaho@jurai.org> Cc: Sam Creasey <sammy@sammy.net> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Phil Blundell <philb@gnu.org> Signed-off-by: Stephen Warren <swarren@nvidia.com>
Diffstat (limited to 'arch/m68k/atari')
-rw-r--r--arch/m68k/atari/config.c4
-rw-r--r--arch/m68k/atari/time.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/arch/m68k/atari/config.c b/arch/m68k/atari/config.c
index d8eb32747ac5..037c11c99331 100644
--- a/arch/m68k/atari/config.c
+++ b/arch/m68k/atari/config.c
@@ -74,7 +74,7 @@ static void atari_heartbeat(int on);
74 74
75/* atari specific timer functions (in time.c) */ 75/* atari specific timer functions (in time.c) */
76extern void atari_sched_init(irq_handler_t); 76extern void atari_sched_init(irq_handler_t);
77extern unsigned long atari_gettimeoffset (void); 77extern u32 atari_gettimeoffset(void);
78extern int atari_mste_hwclk (int, struct rtc_time *); 78extern int atari_mste_hwclk (int, struct rtc_time *);
79extern int atari_tt_hwclk (int, struct rtc_time *); 79extern int atari_tt_hwclk (int, struct rtc_time *);
80extern int atari_mste_set_clock_mmss (unsigned long); 80extern int atari_mste_set_clock_mmss (unsigned long);
@@ -204,7 +204,7 @@ void __init config_atari(void)
204 mach_init_IRQ = atari_init_IRQ; 204 mach_init_IRQ = atari_init_IRQ;
205 mach_get_model = atari_get_model; 205 mach_get_model = atari_get_model;
206 mach_get_hardware_list = atari_get_hardware_list; 206 mach_get_hardware_list = atari_get_hardware_list;
207 mach_gettimeoffset = atari_gettimeoffset; 207 arch_gettimeoffset = atari_gettimeoffset;
208 mach_reset = atari_reset; 208 mach_reset = atari_reset;
209 mach_max_dma_address = 0xffffff; 209 mach_max_dma_address = 0xffffff;
210#if defined(CONFIG_INPUT_M68K_BEEP) || defined(CONFIG_INPUT_M68K_BEEP_MODULE) 210#if defined(CONFIG_INPUT_M68K_BEEP) || defined(CONFIG_INPUT_M68K_BEEP_MODULE)
diff --git a/arch/m68k/atari/time.c b/arch/m68k/atari/time.c
index c0cc68a2c829..da8f981c36d6 100644
--- a/arch/m68k/atari/time.c
+++ b/arch/m68k/atari/time.c
@@ -42,9 +42,9 @@ atari_sched_init(irq_handler_t timer_routine)
42#define TICK_SIZE 10000 42#define TICK_SIZE 10000
43 43
44/* This is always executed with interrupts disabled. */ 44/* This is always executed with interrupts disabled. */
45unsigned long atari_gettimeoffset (void) 45u32 atari_gettimeoffset(void)
46{ 46{
47 unsigned long ticks, offset = 0; 47 u32 ticks, offset = 0;
48 48
49 /* read MFP timer C current value */ 49 /* read MFP timer C current value */
50 ticks = st_mfp.tim_dt_c; 50 ticks = st_mfp.tim_dt_c;
@@ -57,7 +57,7 @@ unsigned long atari_gettimeoffset (void)
57 ticks = INT_TICKS - ticks; 57 ticks = INT_TICKS - ticks;
58 ticks = ticks * 10000L / INT_TICKS; 58 ticks = ticks * 10000L / INT_TICKS;
59 59
60 return ticks + offset; 60 return (ticks + offset) * 1000;
61} 61}
62 62
63 63