Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8400ca32 authored by Greg Ungerer's avatar Greg Ungerer
Browse files

m68knommu: make 5206 UART platform addressing consistent



If we make all UART addressing consistent across all ColdFire family members
then we will be able to remove the duplicated plaform data and use a single
setup for all.

So modify the ColdFire 5206 UART addressing so that:

. UARTs are numbered from 0 up
. base addresses are absolute (not relative to MBAR peripheral register)
. use a common name for IRQs used

Signed-off-by: default avatarGreg Ungerer <gerg@uclinux.org>
parent fde39441
Loading
Loading
Loading
Loading
+6 −4
Original line number Original line Diff line number Diff line
@@ -100,11 +100,11 @@
#define	MCFDMA_BASE1		(MCF_MBAR + 0x240)	/* Base address DMA 1 */
#define	MCFDMA_BASE1		(MCF_MBAR + 0x240)	/* Base address DMA 1 */


#if defined(CONFIG_NETtel)
#if defined(CONFIG_NETtel)
#define	MCFUART_BASE1		0x180		/* Base address of UART1 */
#define	MCFUART_BASE0		(MCF_MBAR + 0x180)	/* Base address UART0 */
#define	MCFUART_BASE2		0x140		/* Base address of UART2 */
#define	MCFUART_BASE1		(MCF_MBAR + 0x140)	/* Base address UART1 */
#else
#else
#define	MCFUART_BASE1		0x140		/* Base address of UART1 */
#define	MCFUART_BASE0		(MCF_MBAR + 0x140)	/* Base address UART0 */
#define	MCFUART_BASE2		0x180		/* Base address of UART2 */
#define	MCFUART_BASE1		(MCF_MBAR + 0x180)	/* Base address UART1 */
#endif
#endif


/*
/*
@@ -112,6 +112,8 @@
 */
 */
#define	MCF_IRQ_TIMER		30		/* Timer0, Level 6 */
#define	MCF_IRQ_TIMER		30		/* Timer0, Level 6 */
#define	MCF_IRQ_PROFILER	31		/* Timer1, Level 7 */
#define	MCF_IRQ_PROFILER	31		/* Timer1, Level 7 */
#define	MCF_IRQ_UART0		73		/* UART0 */
#define	MCF_IRQ_UART1		74		/* UART1 */


/*
/*
 *	Generic GPIO
 *	Generic GPIO
+6 −6
Original line number Original line Diff line number Diff line
@@ -22,12 +22,12 @@


static struct mcf_platform_uart m5206_uart_platform[] = {
static struct mcf_platform_uart m5206_uart_platform[] = {
	{
	{
		.mapbase	= MCF_MBAR + MCFUART_BASE1,
		.mapbase	= MCFUART_BASE0,
		.irq		= 73,
		.irq		= MCF_IRQ_UART0,
	},
	},
	{
	{
		.mapbase 	= MCF_MBAR + MCFUART_BASE2,
		.mapbase 	= MCFUART_BASE1,
		.irq		= 74,
		.irq		= MCF_IRQ_UART1,
	},
	},
	{ },
	{ },
};
};
@@ -48,11 +48,11 @@ static void __init m5206_uart_init_line(int line, int irq)
{
{
	if (line == 0) {
	if (line == 0) {
		writel(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI1, MCF_MBAR + MCFSIM_UART1ICR);
		writel(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI1, MCF_MBAR + MCFSIM_UART1ICR);
		writeb(irq, MCFUART_BASE1 + MCFUART_UIVR);
		writeb(irq, MCFUART_BASE0 + MCFUART_UIVR);
		mcf_mapirq2imr(irq, MCFINTC_UART0);
		mcf_mapirq2imr(irq, MCFINTC_UART0);
	} else if (line == 1) {
	} else if (line == 1) {
		writel(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI2, MCF_MBAR + MCFSIM_UART2ICR);
		writel(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI2, MCF_MBAR + MCFSIM_UART2ICR);
		writeb(irq, MCFUART_BASE2 + MCFUART_UIVR);
		writeb(irq, MCFUART_BASE1 + MCFUART_UIVR);
		mcf_mapirq2imr(irq, MCFINTC_UART1);
		mcf_mapirq2imr(irq, MCFINTC_UART1);
	}
	}
}
}