diff options
Diffstat (limited to 'arch/m68k')
-rw-r--r-- | arch/m68k/platform/54xx/config.c | 33 |
1 files changed, 9 insertions, 24 deletions
diff --git a/arch/m68k/platform/54xx/config.c b/arch/m68k/platform/54xx/config.c index fdf6dcf5da52..4083f50682c6 100644 --- a/arch/m68k/platform/54xx/config.c +++ b/arch/m68k/platform/54xx/config.c | |||
@@ -59,32 +59,17 @@ static struct platform_device *m54xx_devices[] __initdata = { | |||
59 | 59 | ||
60 | /***************************************************************************/ | 60 | /***************************************************************************/ |
61 | 61 | ||
62 | static void __init m54xx_uart_init_line(int line, int irq) | ||
63 | { | ||
64 | int rts_cts; | ||
65 | |||
66 | /* enable io pins */ | ||
67 | switch (line) { | ||
68 | case 0: | ||
69 | rts_cts = 0; break; | ||
70 | case 1: | ||
71 | rts_cts = MCF_PAR_PSC_RTS_RTS; break; | ||
72 | case 2: | ||
73 | rts_cts = MCF_PAR_PSC_RTS_RTS | MCF_PAR_PSC_CTS_CTS; break; | ||
74 | case 3: | ||
75 | rts_cts = 0; break; | ||
76 | } | ||
77 | __raw_writeb(MCF_PAR_PSC_TXD | rts_cts | MCF_PAR_PSC_RXD, | ||
78 | MCF_MBAR + MCF_PAR_PSC(line)); | ||
79 | } | ||
80 | |||
81 | static void __init m54xx_uarts_init(void) | 62 | static void __init m54xx_uarts_init(void) |
82 | { | 63 | { |
83 | const int nrlines = ARRAY_SIZE(m54xx_uart_platform); | 64 | /* enable io pins */ |
84 | int line; | 65 | __raw_writeb(MCF_PAR_PSC_TXD | MCF_PAR_PSC_RXD, |
85 | 66 | MCF_MBAR + MCF_PAR_PSC(0)); | |
86 | for (line = 0; (line < nrlines); line++) | 67 | __raw_writeb(MCF_PAR_PSC_TXD | MCF_PAR_PSC_RXD | MCF_PAR_PSC_RTS_RTS, |
87 | m54xx_uart_init_line(line, m54xx_uart_platform[line].irq); | 68 | MCF_MBAR + MCF_PAR_PSC(1)); |
69 | __raw_writeb(MCF_PAR_PSC_TXD | MCF_PAR_PSC_RXD | MCF_PAR_PSC_RTS_RTS | | ||
70 | MCF_PAR_PSC_CTS_CTS, MCF_MBAR + MCF_PAR_PSC(2)); | ||
71 | __raw_writeb(MCF_PAR_PSC_TXD | MCF_PAR_PSC_RXD, | ||
72 | MCF_MBAR + MCF_PAR_PSC(3)); | ||
88 | } | 73 | } |
89 | 74 | ||
90 | /***************************************************************************/ | 75 | /***************************************************************************/ |