diff options
author | Vitaly Wool <vitalywool@gmail.com> | 2008-01-12 08:03:40 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2008-01-29 05:15:01 -0500 |
commit | 9900485893c004245cbaeef050fe6ba5453a5925 (patch) | |
tree | 1f0cd8b8dd64adc1c3da4773e72064d711557490 /arch/mips/philips | |
parent | 8a39c520b28f1ffa528baaae6ecfaa3feb5377a5 (diff) |
[MIPS] pnx8xxx: clocksource cleanups
Signed-off-by: Vitaly Wool <vitalywool@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/philips')
-rw-r--r-- | arch/mips/philips/pnx8550/common/time.c | 35 |
1 files changed, 11 insertions, 24 deletions
diff --git a/arch/mips/philips/pnx8550/common/time.c b/arch/mips/philips/pnx8550/common/time.c index 6d494e0de3d9..62f495b57f93 100644 --- a/arch/mips/philips/pnx8550/common/time.c +++ b/arch/mips/philips/pnx8550/common/time.c | |||
@@ -47,11 +47,6 @@ static struct clocksource pnx_clocksource = { | |||
47 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | 47 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, |
48 | }; | 48 | }; |
49 | 49 | ||
50 | static void timer_ack(void) | ||
51 | { | ||
52 | write_c0_compare(cpj); | ||
53 | } | ||
54 | |||
55 | static irqreturn_t pnx8xxx_timer_interrupt(int irq, void *dev_id) | 50 | static irqreturn_t pnx8xxx_timer_interrupt(int irq, void *dev_id) |
56 | { | 51 | { |
57 | struct clock_event_device *c = dev_id; | 52 | struct clock_event_device *c = dev_id; |
@@ -94,30 +89,22 @@ static struct clock_event_device pnx8xxx_clockevent = { | |||
94 | .set_next_event = pnx8xxx_set_next_event, | 89 | .set_next_event = pnx8xxx_set_next_event, |
95 | }; | 90 | }; |
96 | 91 | ||
97 | /* | 92 | static inline void timer_ack(void) |
98 | * plat_time_init() - it does the following things: | 93 | { |
99 | * | 94 | write_c0_compare(cpj); |
100 | * 1) plat_time_init() - | 95 | } |
101 | * a) (optional) set up RTC routines, | ||
102 | * b) (optional) calibrate and set the mips_hpt_frequency | ||
103 | * (only needed if you intended to use cpu counter as timer interrupt | ||
104 | * source) | ||
105 | */ | ||
106 | 96 | ||
107 | __init void plat_time_init(void) | 97 | __init void plat_time_init(void) |
108 | { | 98 | { |
109 | unsigned int configPR; | 99 | unsigned int configPR; |
110 | unsigned int n; | 100 | unsigned int n; |
111 | unsigned int m; | 101 | unsigned int m; |
112 | unsigned int p; | 102 | unsigned int p; |
113 | unsigned int pow2p; | 103 | unsigned int pow2p; |
114 | 104 | ||
115 | clockevents_register_device(&pnx8xxx_clockevent); | 105 | clockevents_register_device(&pnx8xxx_clockevent); |
116 | clocksource_register(&pnx_clocksource); | 106 | clocksource_register(&pnx_clocksource); |
117 | 107 | ||
118 | setup_irq(PNX8550_INT_TIMER1, &pnx8xxx_timer_irq); | ||
119 | setup_irq(PNX8550_INT_TIMER2, &monotonic_irqaction); | ||
120 | |||
121 | /* Timer 1 start */ | 108 | /* Timer 1 start */ |
122 | configPR = read_c0_config7(); | 109 | configPR = read_c0_config7(); |
123 | configPR &= ~0x00000008; | 110 | configPR &= ~0x00000008; |
@@ -158,6 +145,6 @@ __init void plat_time_init(void) | |||
158 | write_c0_count2(0); | 145 | write_c0_count2(0); |
159 | write_c0_compare2(0xffffffff); | 146 | write_c0_compare2(0xffffffff); |
160 | 147 | ||
148 | setup_irq(PNX8550_INT_TIMER1, &pnx8xxx_timer_irq); | ||
149 | setup_irq(PNX8550_INT_TIMER2, &monotonic_irqaction); | ||
161 | } | 150 | } |
162 | |||
163 | |||