aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68knommu/platform/5206e
diff options
context:
space:
mode:
authorGreg Ungerer <gerg@uclinux.org>2009-05-21 23:33:35 -0400
committerGreg Ungerer <gerg@uclinux.org>2009-09-15 19:43:52 -0400
commit39f0fb6a3448cfc316e0d5295ed1b121db50037e (patch)
tree657db8073835e8d499708a898a36f1d3a1e39a32 /arch/m68knommu/platform/5206e
parentf6a66276f5fdc018d2a9378c71de3bae13c588d7 (diff)
m68knommu: map ColdFire interrupts to correct masking bits
The older simple ColdFire interrupt controller has no one-to-one mapping of interrupt numbers to bits in the interrupt mask register. Create a mapping array that each ColdFire CPU type can populate with its available interrupts and the bits that each use in the interrupt mask register. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Diffstat (limited to 'arch/m68knommu/platform/5206e')
-rw-r--r--arch/m68knommu/platform/5206e/config.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/arch/m68knommu/platform/5206e/config.c b/arch/m68knommu/platform/5206e/config.c
index 363296af2ee5..0f41ba82a3b5 100644
--- a/arch/m68knommu/platform/5206e/config.c
+++ b/arch/m68knommu/platform/5206e/config.c
@@ -50,11 +50,11 @@ static void __init m5206e_uart_init_line(int line, int irq)
50 if (line == 0) { 50 if (line == 0) {
51 writel(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI1, MCF_MBAR + MCFSIM_UART1ICR); 51 writel(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI1, MCF_MBAR + MCFSIM_UART1ICR);
52 writeb(irq, MCFUART_BASE1 + MCFUART_UIVR); 52 writeb(irq, MCFUART_BASE1 + MCFUART_UIVR);
53 mcf_clrimr(MCFINTC_UART0); 53 mcf_mapirq2imr(irq, MCFINTC_UART0);
54 } else if (line == 1) { 54 } else if (line == 1) {
55 writel(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI2, MCF_MBAR + MCFSIM_UART2ICR); 55 writel(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI2, MCF_MBAR + MCFSIM_UART2ICR);
56 writeb(irq, MCFUART_BASE2 + MCFUART_UIVR); 56 writeb(irq, MCFUART_BASE2 + MCFUART_UIVR);
57 mcf_clrimr(MCFINTC_UART1); 57 mcf_mapirq2imr(irq, MCFINTC_UART1);
58 } 58 }
59} 59}
60 60
@@ -74,11 +74,13 @@ static void __init m5206e_timers_init(void)
74 /* Timer1 is always used as system timer */ 74 /* Timer1 is always used as system timer */
75 writeb(MCFSIM_ICR_AUTOVEC | MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI3, 75 writeb(MCFSIM_ICR_AUTOVEC | MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI3,
76 MCF_MBAR + MCFSIM_TIMER1ICR); 76 MCF_MBAR + MCFSIM_TIMER1ICR);
77 mcf_mapirq2imr(MCF_IRQ_TIMER, MCFINTC_TIMER1);
77 78
78#ifdef CONFIG_HIGHPROFILE 79#ifdef CONFIG_HIGHPROFILE
79 /* Timer2 is to be used as a high speed profile timer */ 80 /* Timer2 is to be used as a high speed profile timer */
80 writeb(MCFSIM_ICR_AUTOVEC | MCFSIM_ICR_LEVEL7 | MCFSIM_ICR_PRI3, 81 writeb(MCFSIM_ICR_AUTOVEC | MCFSIM_ICR_LEVEL7 | MCFSIM_ICR_PRI3,
81 MCF_MBAR + MCFSIM_TIMER2ICR); 82 MCF_MBAR + MCFSIM_TIMER2ICR);
83 mcf_mapirq2imr(MCF_IRQ_PROFILER, MCFINTC_TIMER2);
82#endif 84#endif
83} 85}
84 86
@@ -105,13 +107,18 @@ void __init config_BSP(char *commandp, int size)
105 107
106 mach_reset = m5206e_cpu_reset; 108 mach_reset = m5206e_cpu_reset;
107 m5206e_timers_init(); 109 m5206e_timers_init();
110 m5206e_uarts_init();
111
112 /* Only support the external interrupts on their primary level */
113 mcf_mapirq2imr(25, MCFINTC_EINT1);
114 mcf_mapirq2imr(28, MCFINTC_EINT4);
115 mcf_mapirq2imr(31, MCFINTC_EINT7);
108} 116}
109 117
110/***************************************************************************/ 118/***************************************************************************/
111 119
112static int __init init_BSP(void) 120static int __init init_BSP(void)
113{ 121{
114 m5206e_uarts_init();
115 platform_add_devices(m5206e_devices, ARRAY_SIZE(m5206e_devices)); 122 platform_add_devices(m5206e_devices, ARRAY_SIZE(m5206e_devices));
116 return 0; 123 return 0;
117} 124}