aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/kernel/time_32.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc/kernel/time_32.c')
-rw-r--r--arch/sparc/kernel/time_32.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/sparc/kernel/time_32.c b/arch/sparc/kernel/time_32.c
index 772b37986a9c..5923d1e4e7c9 100644
--- a/arch/sparc/kernel/time_32.c
+++ b/arch/sparc/kernel/time_32.c
@@ -36,6 +36,7 @@
36#include <linux/of_device.h> 36#include <linux/of_device.h>
37#include <linux/platform_device.h> 37#include <linux/platform_device.h>
38 38
39#include <asm/mc146818rtc.h>
39#include <asm/oplib.h> 40#include <asm/oplib.h>
40#include <asm/timex.h> 41#include <asm/timex.h>
41#include <asm/timer.h> 42#include <asm/timer.h>
@@ -47,6 +48,7 @@
47#include <asm/irq_regs.h> 48#include <asm/irq_regs.h>
48#include <asm/setup.h> 49#include <asm/setup.h>
49 50
51#include "kernel.h"
50#include "irq.h" 52#include "irq.h"
51 53
52static __cacheline_aligned_in_smp DEFINE_SEQLOCK(timer_cs_lock); 54static __cacheline_aligned_in_smp DEFINE_SEQLOCK(timer_cs_lock);
@@ -83,7 +85,7 @@ unsigned long profile_pc(struct pt_regs *regs)
83 85
84EXPORT_SYMBOL(profile_pc); 86EXPORT_SYMBOL(profile_pc);
85 87
86volatile unsigned int __iomem *master_l10_counter; 88volatile u32 __iomem *master_l10_counter;
87 89
88int update_persistent_clock(struct timespec now) 90int update_persistent_clock(struct timespec now)
89{ 91{
@@ -143,9 +145,9 @@ static __init void setup_timer_ce(void)
143 145
144static unsigned int sbus_cycles_offset(void) 146static unsigned int sbus_cycles_offset(void)
145{ 147{
146 unsigned int val, offset; 148 u32 val, offset;
147 149
148 val = *master_l10_counter; 150 val = sbus_readl(master_l10_counter);
149 offset = (val >> TIMER_VALUE_SHIFT) & TIMER_VALUE_MASK; 151 offset = (val >> TIMER_VALUE_SHIFT) & TIMER_VALUE_MASK;
150 152
151 /* Limit hit? */ 153 /* Limit hit? */