diff options
Diffstat (limited to 'arch/mips/alchemy/common/time.c')
-rw-r--r-- | arch/mips/alchemy/common/time.c | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/arch/mips/alchemy/common/time.c b/arch/mips/alchemy/common/time.c index a7193ae13a5d..b67930d19325 100644 --- a/arch/mips/alchemy/common/time.c +++ b/arch/mips/alchemy/common/time.c | |||
@@ -53,7 +53,7 @@ static struct clocksource au1x_counter1_clocksource = { | |||
53 | .read = au1x_counter1_read, | 53 | .read = au1x_counter1_read, |
54 | .mask = CLOCKSOURCE_MASK(32), | 54 | .mask = CLOCKSOURCE_MASK(32), |
55 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | 55 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, |
56 | .rating = 100, | 56 | .rating = 1500, |
57 | }; | 57 | }; |
58 | 58 | ||
59 | static int au1x_rtcmatch2_set_next_event(unsigned long delta, | 59 | static int au1x_rtcmatch2_set_next_event(unsigned long delta, |
@@ -84,7 +84,7 @@ static irqreturn_t au1x_rtcmatch2_irq(int irq, void *dev_id) | |||
84 | static struct clock_event_device au1x_rtcmatch2_clockdev = { | 84 | static struct clock_event_device au1x_rtcmatch2_clockdev = { |
85 | .name = "rtcmatch2", | 85 | .name = "rtcmatch2", |
86 | .features = CLOCK_EVT_FEAT_ONESHOT, | 86 | .features = CLOCK_EVT_FEAT_ONESHOT, |
87 | .rating = 100, | 87 | .rating = 1500, |
88 | .set_next_event = au1x_rtcmatch2_set_next_event, | 88 | .set_next_event = au1x_rtcmatch2_set_next_event, |
89 | .set_mode = au1x_rtcmatch2_set_mode, | 89 | .set_mode = au1x_rtcmatch2_set_mode, |
90 | .cpumask = cpu_all_mask, | 90 | .cpumask = cpu_all_mask, |
@@ -158,20 +158,6 @@ cntr_err: | |||
158 | return -1; | 158 | return -1; |
159 | } | 159 | } |
160 | 160 | ||
161 | static void __init alchemy_setup_c0timer(void) | ||
162 | { | ||
163 | /* | ||
164 | * MIPS kernel assigns 'au1k_wait' to 'cpu_wait' before this | ||
165 | * function is called. Because the Alchemy counters are unusable | ||
166 | * the C0 timekeeping code is installed and use of the 'wait' | ||
167 | * instruction must be prohibited, which is done most easily by | ||
168 | * assigning NULL to cpu_wait. | ||
169 | */ | ||
170 | cpu_wait = NULL; | ||
171 | r4k_clockevent_init(); | ||
172 | init_r4k_clocksource(); | ||
173 | } | ||
174 | |||
175 | static int alchemy_m2inttab[] __initdata = { | 161 | static int alchemy_m2inttab[] __initdata = { |
176 | AU1000_RTC_MATCH2_INT, | 162 | AU1000_RTC_MATCH2_INT, |
177 | AU1500_RTC_MATCH2_INT, | 163 | AU1500_RTC_MATCH2_INT, |
@@ -186,8 +172,7 @@ void __init plat_time_init(void) | |||
186 | int t; | 172 | int t; |
187 | 173 | ||
188 | t = alchemy_get_cputype(); | 174 | t = alchemy_get_cputype(); |
189 | if (t == ALCHEMY_CPU_UNKNOWN) | 175 | if (t == ALCHEMY_CPU_UNKNOWN || |
190 | alchemy_setup_c0timer(); | 176 | alchemy_time_init(alchemy_m2inttab[t])) |
191 | else if (alchemy_time_init(alchemy_m2inttab[t])) | 177 | cpu_wait = NULL; /* wait doesn't work with r4k timer */ |
192 | alchemy_setup_c0timer(); | ||
193 | } | 178 | } |