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

Commit 6b656e8a authored by Greg Ungerer's avatar Greg Ungerer
Browse files

m68knommu: simplify the 5272 UART setup code



Simplify the UART setup code so that it no longer loops for each UART
present. Just make it do all the work it needs in a single function.
This will make the code easier to share when we move to a single set
of platform data for ColdFire UARTs.

Signed-off-by: default avatarGreg Ungerer <gerg@uclinux.org>
parent 43d94b7f
Loading
Loading
Loading
Loading
+8 −19
Original line number Diff line number Diff line
@@ -85,11 +85,10 @@ static struct platform_device *m5272_devices[] __initdata = {

/***************************************************************************/

static void __init m5272_uart_init_line(int line, int irq)
static void __init m5272_uarts_init(void)
{
	u32 v;

	if ((line >= 0) && (line < 2)) {
	/* Enable the output lines for the serial ports */
	v = readl(MCF_MBAR + MCFSIM_PBCNT);
	v = (v & ~0x000000ff) | 0x00000055;
@@ -99,16 +98,6 @@ static void __init m5272_uart_init_line(int line, int irq)
	v = (v & ~0x000003fc) | 0x000002a8;
	writel(v, MCF_MBAR + MCFSIM_PDCNT);
}
}

static void __init m5272_uarts_init(void)
{
	const int nrlines = ARRAY_SIZE(m5272_uart_platform);
	int line;

	for (line = 0; (line < nrlines); line++)
		m5272_uart_init_line(line, m5272_uart_platform[line].irq);
}

/***************************************************************************/