diff options
author | Greg Ungerer <gerg@uclinux.org> | 2011-12-23 15:59:03 +0100 |
---|---|---|
committer | Greg Ungerer <gerg@uclinux.org> | 2012-03-05 00:43:07 +0100 |
commit | 1eb1391638633cdeb7dcaacd295bfcbec216ea8f (patch) | |
tree | 5584f34f922ed7bc97b1aa2b2db2e26464f626a1 /arch/m68k | |
parent | m68knommu: simplify the 5272 UART setup code (diff) | |
download | linux-1eb1391638633cdeb7dcaacd295bfcbec216ea8f.tar.xz linux-1eb1391638633cdeb7dcaacd295bfcbec216ea8f.zip |
m68knommu: simplify the 527x 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: Greg Ungerer <gerg@uclinux.org>
Diffstat (limited to 'arch/m68k')
-rw-r--r-- | arch/m68k/platform/527x/config.c | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/arch/m68k/platform/527x/config.c b/arch/m68k/platform/527x/config.c index 56f1ddd3cfdc..74dab0248b62 100644 --- a/arch/m68k/platform/527x/config.c +++ b/arch/m68k/platform/527x/config.c @@ -295,35 +295,18 @@ static struct platform_device *m527x_devices[] __initdata = { /***************************************************************************/ -static void __init m527x_uart_init_line(int line, int irq) +static void __init m527x_uarts_init(void) { u16 sepmask; - if ((line < 0) || (line > 2)) - return; - /* * External Pin Mask Setting & Enable External Pin for Interface */ sepmask = readw(MCF_IPSBAR + MCF_GPIO_PAR_UART); - if (line == 0) - sepmask |= UART0_ENABLE_MASK; - else if (line == 1) - sepmask |= UART1_ENABLE_MASK; - else if (line == 2) - sepmask |= UART2_ENABLE_MASK; + sepmask |= UART0_ENABLE_MASK | UART1_ENABLE_MASK | UART2_ENABLE_MASK; writew(sepmask, MCF_IPSBAR + MCF_GPIO_PAR_UART); } -static void __init m527x_uarts_init(void) -{ - const int nrlines = ARRAY_SIZE(m527x_uart_platform); - int line; - - for (line = 0; (line < nrlines); line++) - m527x_uart_init_line(line, m527x_uart_platform[line].irq); -} - /***************************************************************************/ static void __init m527x_fec_init(void) |