mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-13 00:29:50 +00:00
[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>
This commit is contained in:
parent
ba5eac515f
commit
e0511f7524
@ -68,24 +68,23 @@ DEFINE_SPINLOCK(titan_lock);
|
|||||||
int titan_irqflags;
|
int titan_irqflags;
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The eXcite platform uses the alternate timer interrupt
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
void __init plat_time_init(void)
|
void __init plat_time_init(void)
|
||||||
{
|
{
|
||||||
const u32 modebit5 = ocd_readl(0x00e4);
|
const u32 modebit5 = ocd_readl(0x00e4);
|
||||||
unsigned int
|
unsigned int mult = ((modebit5 >> 11) & 0x1f) + 2,
|
||||||
mult = ((modebit5 >> 11) & 0x1f) + 2,
|
unsigned int div = ((modebit5 >> 16) & 0x1f) + 2;
|
||||||
div = ((modebit5 >> 16) & 0x1f) + 2;
|
|
||||||
|
|
||||||
if (div == 33) div = 1;
|
if (div == 33)
|
||||||
|
div = 1;
|
||||||
mips_hpt_frequency = EXCITE_CPU_EXT_CLOCK * mult / div / 2;
|
mips_hpt_frequency = EXCITE_CPU_EXT_CLOCK * mult / div / 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
void __init plat_timer_setup(struct irqaction *irq)
|
|
||||||
{
|
|
||||||
/* The eXcite platform uses the alternate timer interrupt */
|
|
||||||
set_c0_intcontrol(0x80);
|
|
||||||
setup_irq(TIMER_IRQ, irq);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int __init excite_init_console(void)
|
static int __init excite_init_console(void)
|
||||||
{
|
{
|
||||||
#if defined(CONFIG_SERIAL_8250)
|
#if defined(CONFIG_SERIAL_8250)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user