diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-06 20:59:33 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-06 20:59:33 -0500 |
commit | c77417132c12af338a7d37956809b2b98d20413c (patch) | |
tree | 02cb0ef1f8dfa1af8ce0965883dd449adf33eb2c /arch/m68k/platform/coldfire/sltimers.c | |
parent | e4e88f31bcb5f05f24b9ae518d4ecb44e1a7774d (diff) | |
parent | 1f7034b9616e6f14dc7b6aa280210421428f31af (diff) |
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu
* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: (56 commits)
m68k: allow ColdFire 547x and 548x CPUs to be built with MMU enabled
m68k/Kconfig: Separate classic m68k and coldfire early
m68k: add ColdFire with MMU enabled support to the m68k mem init code
m68k: do not use m68k startup or interrupt code for ColdFire CPUs
m68k: add ColdFire FPU support for the V4e ColdFire CPUs
m68k: adjustments to stack frame for ColdFire with MMU enabled
m68k: use non-MMU linker script for ColdFire MMU builds
m68k: ColdFire with MMU enabled uses same clocking code as non-MMU
m68k: add code to setup a ColdFire 54xx platform when MMU enabled
m68k: use non-MMU entry.S code when compiling for ColdFire CPU
m68k: create ColdFire MMU pgalloc code
m68k: compile appropriate mm arch files for ColdFire MMU support
m68k: ColdFire V4e MMU paging init code and miss handler
m68k: use ColdFire MMU read/write bit flags when ioremapping
m68k: modify cache push and clear code for ColdFire with MMU enable
m68k: use tracehook_report_syscall_entry/exit for ColdFire MMU ptrace path
m68k: ColdFire V4e MMU context support code
m68k: MMU enabled ColdFire needs 8k ELF alignment
m68k: set ColdFire MMU page size
m68k: define PAGE_OFFSET_RAW for ColdFire CPU with MMU enabled
...
Diffstat (limited to 'arch/m68k/platform/coldfire/sltimers.c')
-rw-r--r-- | arch/m68k/platform/coldfire/sltimers.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/m68k/platform/coldfire/sltimers.c b/arch/m68k/platform/coldfire/sltimers.c index b7f822b552bb..54e1452f853a 100644 --- a/arch/m68k/platform/coldfire/sltimers.c +++ b/arch/m68k/platform/coldfire/sltimers.c | |||
@@ -98,16 +98,19 @@ static struct irqaction mcfslt_timer_irq = { | |||
98 | static cycle_t mcfslt_read_clk(struct clocksource *cs) | 98 | static cycle_t mcfslt_read_clk(struct clocksource *cs) |
99 | { | 99 | { |
100 | unsigned long flags; | 100 | unsigned long flags; |
101 | u32 cycles; | 101 | u32 cycles, scnt; |
102 | u16 scnt; | ||
103 | 102 | ||
104 | local_irq_save(flags); | 103 | local_irq_save(flags); |
105 | scnt = __raw_readl(TA(MCFSLT_SCNT)); | 104 | scnt = __raw_readl(TA(MCFSLT_SCNT)); |
106 | cycles = mcfslt_cnt; | 105 | cycles = mcfslt_cnt; |
106 | if (__raw_readl(TA(MCFSLT_SSR)) & MCFSLT_SSR_TE) { | ||
107 | cycles += mcfslt_cycles_per_jiffy; | ||
108 | scnt = __raw_readl(TA(MCFSLT_SCNT)); | ||
109 | } | ||
107 | local_irq_restore(flags); | 110 | local_irq_restore(flags); |
108 | 111 | ||
109 | /* subtract because slice timers count down */ | 112 | /* subtract because slice timers count down */ |
110 | return cycles - scnt; | 113 | return cycles + ((mcfslt_cycles_per_jiffy - 1) - scnt); |
111 | } | 114 | } |
112 | 115 | ||
113 | static struct clocksource mcfslt_clk = { | 116 | static struct clocksource mcfslt_clk = { |