aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68knommu/platform/5307/pit.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/m68knommu/platform/5307/pit.c')
-rw-r--r--arch/m68knommu/platform/5307/pit.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/arch/m68knommu/platform/5307/pit.c b/arch/m68knommu/platform/5307/pit.c
index f18352fa35a6..173b754d1cda 100644
--- a/arch/m68knommu/platform/5307/pit.c
+++ b/arch/m68knommu/platform/5307/pit.c
@@ -17,6 +17,7 @@
17#include <linux/init.h> 17#include <linux/init.h>
18#include <linux/interrupt.h> 18#include <linux/interrupt.h>
19#include <linux/irq.h> 19#include <linux/irq.h>
20#include <asm/machdep.h>
20#include <asm/io.h> 21#include <asm/io.h>
21#include <asm/coldfire.h> 22#include <asm/coldfire.h>
22#include <asm/mcfpit.h> 23#include <asm/mcfpit.h>
@@ -31,28 +32,30 @@
31 32
32/***************************************************************************/ 33/***************************************************************************/
33 34
34void coldfire_pit_tick(void) 35static irqreturn_t hw_tick(int irq, void *dummy)
35{ 36{
36 unsigned short pcsr; 37 unsigned short pcsr;
37 38
38 /* Reset the ColdFire timer */ 39 /* Reset the ColdFire timer */
39 pcsr = __raw_readw(TA(MCFPIT_PCSR)); 40 pcsr = __raw_readw(TA(MCFPIT_PCSR));
40 __raw_writew(pcsr | MCFPIT_PCSR_PIF, TA(MCFPIT_PCSR)); 41 __raw_writew(pcsr | MCFPIT_PCSR_PIF, TA(MCFPIT_PCSR));
42
43 return arch_timer_interrupt(irq, dummy);
41} 44}
42 45
43/***************************************************************************/ 46/***************************************************************************/
44 47
45static struct irqaction coldfire_pit_irq = { 48static struct irqaction coldfire_pit_irq = {
46 .name = "timer", 49 .name = "timer",
47 .flags = IRQF_DISABLED | IRQF_TIMER, 50 .flags = IRQF_DISABLED | IRQF_TIMER,
51 .handler = hw_tick,
48}; 52};
49 53
50void coldfire_pit_init(irq_handler_t handler) 54void hw_timer_init(void)
51{ 55{
52 volatile unsigned char *icrp; 56 volatile unsigned char *icrp;
53 volatile unsigned long *imrp; 57 volatile unsigned long *imrp;
54 58
55 coldfire_pit_irq.handler = handler;
56 setup_irq(MCFINT_VECBASE + MCFINT_PIT1, &coldfire_pit_irq); 59 setup_irq(MCFINT_VECBASE + MCFINT_PIT1, &coldfire_pit_irq);
57 60
58 icrp = (volatile unsigned char *) (MCF_IPSBAR + MCFICM_INTC0 + 61 icrp = (volatile unsigned char *) (MCF_IPSBAR + MCFICM_INTC0 +
@@ -71,7 +74,7 @@ void coldfire_pit_init(irq_handler_t handler)
71 74
72/***************************************************************************/ 75/***************************************************************************/
73 76
74unsigned long coldfire_pit_offset(void) 77unsigned long hw_timer_offset(void)
75{ 78{
76 volatile unsigned long *ipr; 79 volatile unsigned long *ipr;
77 unsigned long pmr, pcntr, offset; 80 unsigned long pmr, pcntr, offset;