Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 292432
b: refs/heads/master
c: b9a0c3f
h: refs/heads/master
v: v3
  • Loading branch information
Greg Ungerer committed Mar 4, 2012
1 parent 41db8a9 commit 27dc675
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 25 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b77fb7faa9c80021e885749f8e4cf84a4981c8ba
refs/heads/master: b9a0c3f88ef6163f56662d0121d4932b457568bb
33 changes: 9 additions & 24 deletions trunk/arch/m68k/platform/54xx/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,32 +59,17 @@ static struct platform_device *m54xx_devices[] __initdata = {

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

static void __init m54xx_uart_init_line(int line, int irq)
{
int rts_cts;

/* enable io pins */
switch (line) {
case 0:
rts_cts = 0; break;
case 1:
rts_cts = MCF_PAR_PSC_RTS_RTS; break;
case 2:
rts_cts = MCF_PAR_PSC_RTS_RTS | MCF_PAR_PSC_CTS_CTS; break;
case 3:
rts_cts = 0; break;
}
__raw_writeb(MCF_PAR_PSC_TXD | rts_cts | MCF_PAR_PSC_RXD,
MCF_MBAR + MCF_PAR_PSC(line));
}

static void __init m54xx_uarts_init(void)
{
const int nrlines = ARRAY_SIZE(m54xx_uart_platform);
int line;

for (line = 0; (line < nrlines); line++)
m54xx_uart_init_line(line, m54xx_uart_platform[line].irq);
/* enable io pins */
__raw_writeb(MCF_PAR_PSC_TXD | MCF_PAR_PSC_RXD,
MCF_MBAR + MCF_PAR_PSC(0));
__raw_writeb(MCF_PAR_PSC_TXD | MCF_PAR_PSC_RXD | MCF_PAR_PSC_RTS_RTS,
MCF_MBAR + MCF_PAR_PSC(1));
__raw_writeb(MCF_PAR_PSC_TXD | MCF_PAR_PSC_RXD | MCF_PAR_PSC_RTS_RTS |
MCF_PAR_PSC_CTS_CTS, MCF_MBAR + MCF_PAR_PSC(2));
__raw_writeb(MCF_PAR_PSC_TXD | MCF_PAR_PSC_RXD,
MCF_MBAR + MCF_PAR_PSC(3));
}

/***************************************************************************/
Expand Down

0 comments on commit 27dc675

Please sign in to comment.