From f94569dd216e885eff0ff5a3872d500207a0ab05 Mon Sep 17 00:00:00 2001 From: Greg Ungerer Date: Sat, 24 Dec 2011 00:43:13 +1000 Subject: [PATCH] --- yaml --- r: 292421 b: refs/heads/master c: 69d23b610a04e269d6a094e6f3e37d85d6b2784a h: refs/heads/master i: 292419: 045bb528e7bd0b251aaa7db1ae53b4897251ccf1 v: v3 --- [refs] | 2 +- trunk/arch/m68k/include/asm/m5407sim.h | 6 ++++-- trunk/arch/m68k/platform/5407/config.c | 12 ++++++------ 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/[refs] b/[refs] index ba623b91e4a1..bdac10af73d4 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 35b7cf22c6b2481f7c425f30898214f73376834d +refs/heads/master: 69d23b610a04e269d6a094e6f3e37d85d6b2784a diff --git a/trunk/arch/m68k/include/asm/m5407sim.h b/trunk/arch/m68k/include/asm/m5407sim.h index 51e00b00b8a6..79f58dd6a83d 100644 --- a/trunk/arch/m68k/include/asm/m5407sim.h +++ b/trunk/arch/m68k/include/asm/m5407sim.h @@ -85,8 +85,8 @@ #define MCFTIMER_BASE1 (MCF_MBAR + 0x140) /* Base of TIMER1 */ #define MCFTIMER_BASE2 (MCF_MBAR + 0x180) /* Base of TIMER2 */ -#define MCFUART_BASE1 0x1c0 /* Base address of UART1 */ -#define MCFUART_BASE2 0x200 /* Base address of UART2 */ +#define MCFUART_BASE0 (MCF_MBAR + 0x1c0) /* Base address UART0 */ +#define MCFUART_BASE1 (MCF_MBAR + 0x200) /* Base address UART1 */ #define MCFSIM_PADDR (MCF_MBAR + 0x244) #define MCFSIM_PADAT (MCF_MBAR + 0x248) @@ -139,6 +139,8 @@ */ #define MCF_IRQ_TIMER 30 /* Timer0, Level 6 */ #define MCF_IRQ_PROFILER 31 /* Timer1, Level 7 */ +#define MCF_IRQ_UART0 73 /* UART0 */ +#define MCF_IRQ_UART1 74 /* UART1 */ /****************************************************************************/ #endif /* m5407sim_h */ diff --git a/trunk/arch/m68k/platform/5407/config.c b/trunk/arch/m68k/platform/5407/config.c index 4861be602dcd..f8ed5856d7cb 100644 --- a/trunk/arch/m68k/platform/5407/config.c +++ b/trunk/arch/m68k/platform/5407/config.c @@ -22,12 +22,12 @@ static struct mcf_platform_uart m5407_uart_platform[] = { { - .mapbase = MCF_MBAR + MCFUART_BASE1, - .irq = 73, + .mapbase = MCFUART_BASE0, + .irq = MCF_IRQ_UART0, }, { - .mapbase = MCF_MBAR + MCFUART_BASE2, - .irq = 74, + .mapbase = MCFUART_BASE1, + .irq = MCF_IRQ_UART1, }, { }, }; @@ -48,11 +48,11 @@ static void __init m5407_uart_init_line(int line, int irq) { if (line == 0) { writeb(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI1, MCF_MBAR + MCFSIM_UART1ICR); - writeb(irq, MCF_MBAR + MCFUART_BASE1 + MCFUART_UIVR); + writeb(irq, MCFUART_BASE0 + MCFUART_UIVR); mcf_mapirq2imr(irq, MCFINTC_UART0); } else if (line == 1) { writeb(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI2, MCF_MBAR + MCFSIM_UART2ICR); - writeb(irq, MCF_MBAR + MCFUART_BASE2 + MCFUART_UIVR); + writeb(irq, MCFUART_BASE1 + MCFUART_UIVR); mcf_mapirq2imr(irq, MCFINTC_UART1); } }