diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/m68knommu/platform/5307/pit.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/m68knommu/platform/5307/pit.c b/arch/m68knommu/platform/5307/pit.c index a9b2c2e7e280..323f2677e49d 100644 --- a/arch/m68knommu/platform/5307/pit.c +++ b/arch/m68knommu/platform/5307/pit.c | |||
@@ -3,7 +3,7 @@ | |||
3 | /* | 3 | /* |
4 | * pit.c -- Motorola ColdFire PIT timer. Currently this type of | 4 | * pit.c -- Motorola ColdFire PIT timer. Currently this type of |
5 | * hardware timer only exists in the Motorola ColdFire | 5 | * hardware timer only exists in the Motorola ColdFire |
6 | * 5270/5271 and 5282 CPUs. | 6 | * 5270/5271, 5282 and other CPUs. |
7 | * | 7 | * |
8 | * Copyright (C) 1999-2004, Greg Ungerer (gerg@snapgear.com) | 8 | * Copyright (C) 1999-2004, Greg Ungerer (gerg@snapgear.com) |
9 | * Copyright (C) 2001-2004, SnapGear Inc. (www.snapgear.com) | 9 | * Copyright (C) 2001-2004, SnapGear Inc. (www.snapgear.com) |
@@ -47,10 +47,10 @@ void coldfire_pit_init(irqreturn_t (*handler)(int, void *, struct pt_regs *)) | |||
47 | 47 | ||
48 | icrp = (volatile unsigned char *) (MCF_IPSBAR + MCFICM_INTC0 + | 48 | icrp = (volatile unsigned char *) (MCF_IPSBAR + MCFICM_INTC0 + |
49 | MCFINTC_ICR0 + MCFINT_PIT1); | 49 | MCFINTC_ICR0 + MCFINT_PIT1); |
50 | *icrp = 0x2b; /* PIT1 with level 5, priority 3 */ | 50 | *icrp = ICR_INTRCONF; |
51 | 51 | ||
52 | imrp = (volatile unsigned long *) (MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_IMRH); | 52 | imrp = (volatile unsigned long *) (MCF_IPSBAR + MCFICM_INTC0 + MCFPIT_IMR); |
53 | *imrp &= ~(1 << (MCFINT_PIT1 - 32)); | 53 | *imrp &= ~MCFPIT_IMR_IBIT; |
54 | 54 | ||
55 | /* Set up PIT timer 1 as poll clock */ | 55 | /* Set up PIT timer 1 as poll clock */ |
56 | tp = (volatile struct mcfpit *) (MCF_IPSBAR + MCFPIT_BASE1); | 56 | tp = (volatile struct mcfpit *) (MCF_IPSBAR + MCFPIT_BASE1); |
@@ -70,7 +70,7 @@ unsigned long coldfire_pit_offset(void) | |||
70 | unsigned long pmr, pcntr, offset; | 70 | unsigned long pmr, pcntr, offset; |
71 | 71 | ||
72 | tp = (volatile struct mcfpit *) (MCF_IPSBAR + MCFPIT_BASE1); | 72 | tp = (volatile struct mcfpit *) (MCF_IPSBAR + MCFPIT_BASE1); |
73 | ipr = (volatile unsigned long *) (MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_IPRH); | 73 | ipr = (volatile unsigned long *) (MCF_IPSBAR + MCFICM_INTC0 + MCFPIT_IMR); |
74 | 74 | ||
75 | pmr = *(&tp->pmr); | 75 | pmr = *(&tp->pmr); |
76 | pcntr = *(&tp->pcntr); | 76 | pcntr = *(&tp->pcntr); |
@@ -80,7 +80,7 @@ unsigned long coldfire_pit_offset(void) | |||
80 | * timer interupt is pending, then add on a ticks worth of time. | 80 | * timer interupt is pending, then add on a ticks worth of time. |
81 | */ | 81 | */ |
82 | offset = ((pmr - pcntr) * (1000000 / HZ)) / pmr; | 82 | offset = ((pmr - pcntr) * (1000000 / HZ)) / pmr; |
83 | if ((offset < (1000000 / HZ / 2)) && (*ipr & (1 << (MCFINT_PIT1 - 32)))) | 83 | if ((offset < (1000000 / HZ / 2)) && (*ipr & MCFPIT_IMR_IBIT)) |
84 | offset += 1000000 / HZ; | 84 | offset += 1000000 / HZ; |
85 | return offset; | 85 | return offset; |
86 | } | 86 | } |