aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/basler
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2007-10-26 08:52:41 -0400
committerRalf Baechle <ralf@linux-mips.org>2007-10-29 15:35:34 -0400
commite0511f75246df404e72fc1376967253d2f460c34 (patch)
tree4de9db3e7433ff26e0deab98addce314e32f291f /arch/mips/basler
parentba5eac515f73910744c5d9f8fc1c5d6548cf6ff4 (diff)
[MIPS] time: Merge eXcite plat_timer_setup into plat_time_init.
Fixme: At the time of this writing cevt-r4k.c doesn't yet know about how to handle the alternate timer interrupt of the RM9000. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/basler')
-rw-r--r--arch/mips/basler/excite/excite_setup.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/arch/mips/basler/excite/excite_setup.c b/arch/mips/basler/excite/excite_setup.c
index 404ca9284b30..24378b9223f9 100644
--- a/arch/mips/basler/excite/excite_setup.c
+++ b/arch/mips/basler/excite/excite_setup.c
@@ -68,24 +68,23 @@ DEFINE_SPINLOCK(titan_lock);
68int titan_irqflags; 68int titan_irqflags;
69 69
70 70
71/*
72 * The eXcite platform uses the alternate timer interrupt
73 *
74 * Fixme: At the time of this writing cevt-r4k.c doesn't yet know about how
75 * to handle the alternate timer interrupt of the RM9000.
76 */
71void __init plat_time_init(void) 77void __init plat_time_init(void)
72{ 78{
73 const u32 modebit5 = ocd_readl(0x00e4); 79 const u32 modebit5 = ocd_readl(0x00e4);
74 unsigned int 80 unsigned int mult = ((modebit5 >> 11) & 0x1f) + 2,
75 mult = ((modebit5 >> 11) & 0x1f) + 2, 81 unsigned int div = ((modebit5 >> 16) & 0x1f) + 2;
76 div = ((modebit5 >> 16) & 0x1f) + 2;
77 82
78 if (div == 33) div = 1; 83 if (div == 33)
84 div = 1;
79 mips_hpt_frequency = EXCITE_CPU_EXT_CLOCK * mult / div / 2; 85 mips_hpt_frequency = EXCITE_CPU_EXT_CLOCK * mult / div / 2;
80} 86}
81 87
82void __init plat_timer_setup(struct irqaction *irq)
83{
84 /* The eXcite platform uses the alternate timer interrupt */
85 set_c0_intcontrol(0x80);
86 setup_irq(TIMER_IRQ, irq);
87}
88
89static int __init excite_init_console(void) 88static int __init excite_init_console(void)
90{ 89{
91#if defined(CONFIG_SERIAL_8250) 90#if defined(CONFIG_SERIAL_8250)