summaryrefslogtreecommitdiffstats
path: root/arch/m68knommu/platform/5249/config.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/m68knommu/platform/5249/config.c')
-rw-r--r--arch/m68knommu/platform/5249/config.c26
1 files changed, 11 insertions, 15 deletions
diff --git a/arch/m68knommu/platform/5249/config.c b/arch/m68knommu/platform/5249/config.c
index 7261a3d..51202b1 100644
--- a/arch/m68knommu/platform/5249/config.c
+++ b/arch/m68knommu/platform/5249/config.c
@@ -65,24 +65,19 @@ static void __init m5249_uarts_init(void)
m5249_uart_init_line(line, m5249_uart_platform[line].irq);
}
-
/***************************************************************************/
-void mcf_settimericr(unsigned int timer, unsigned int level)
+static void __init m5249_timers_init(void)
{
- volatile unsigned char *icrp;
- unsigned int icr, imr;
-
- if (timer <= 2) {
- switch (timer) {
- case 2: icr = MCFSIM_TIMER2ICR; imr = MCFINTC_TIMER2; break;
- default: icr = MCFSIM_TIMER1ICR; imr = MCFINTC_TIMER1; break;
- }
-
- icrp = (volatile unsigned char *) (MCF_MBAR + icr);
- *icrp = MCFSIM_ICR_AUTOVEC | (level << 2) | MCFSIM_ICR_PRI3;
- mcf_clrimr(imr);
- }
+ /* Timer1 is always used as system timer */
+ writeb(MCFSIM_ICR_AUTOVEC | MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI3,
+ MCF_MBAR + MCFSIM_TIMER1ICR);
+
+#ifdef CONFIG_HIGHPROFILE
+ /* Timer2 is to be used as a high speed profile timer */
+ writeb(MCFSIM_ICR_AUTOVEC | MCFSIM_ICR_LEVEL7 | MCFSIM_ICR_PRI3,
+ MCF_MBAR + MCFSIM_TIMER2ICR);
+#endif
}
/***************************************************************************/
@@ -101,6 +96,7 @@ void m5249_cpu_reset(void)
void __init config_BSP(char *commandp, int size)
{
mach_reset = m5249_cpu_reset;
+ m5249_timers_init();
}
/***************************************************************************/
OpenPOWER on IntegriCloud