summaryrefslogtreecommitdiffstats
path: root/drivers/serial/mcf.c
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2009-02-01 17:53:26 +0000
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-02-01 17:53:26 +0000
commitde8696203e64f19ea26f8e096ac8a796e78216b3 (patch)
treed932f2f04d6c81c75c5104ae86b1e5d47e6591e3 /drivers/serial/mcf.c
parent807a96cd0e5f5311e7f7a1030b43aab624cd7d9f (diff)
parent0dc23d704874e892c3fb5f2c0e4dfbef3c9c6edf (diff)
downloadop-kernel-dev-de8696203e64f19ea26f8e096ac8a796e78216b3.zip
op-kernel-dev-de8696203e64f19ea26f8e096ac8a796e78216b3.tar.gz
Merge branch 'omap-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6
Diffstat (limited to 'drivers/serial/mcf.c')
-rw-r--r--drivers/serial/mcf.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/serial/mcf.c b/drivers/serial/mcf.c
index b2001c5..56841fe 100644
--- a/drivers/serial/mcf.c
+++ b/drivers/serial/mcf.c
@@ -212,10 +212,18 @@ static void mcf_set_termios(struct uart_port *port, struct ktermios *termios,
{
unsigned long flags;
unsigned int baud, baudclk;
+#if defined(CONFIG_M5272)
+ unsigned int baudfr;
+#endif
unsigned char mr1, mr2;
baud = uart_get_baud_rate(port, termios, old, 0, 230400);
+#if defined(CONFIG_M5272)
+ baudclk = (MCF_BUSCLK / baud) / 32;
+ baudfr = (((MCF_BUSCLK / baud) + 1) / 2) % 16;
+#else
baudclk = ((MCF_BUSCLK / baud) + 16) / 32;
+#endif
mr1 = MCFUART_MR1_RXIRQRDY | MCFUART_MR1_RXERRCHAR;
mr2 = 0;
@@ -262,6 +270,9 @@ static void mcf_set_termios(struct uart_port *port, struct ktermios *termios,
writeb(mr2, port->membase + MCFUART_UMR);
writeb((baudclk & 0xff00) >> 8, port->membase + MCFUART_UBG1);
writeb((baudclk & 0xff), port->membase + MCFUART_UBG2);
+#if defined(CONFIG_M5272)
+ writeb((baudfr & 0x0f), port->membase + MCFUART_UFPD);
+#endif
writeb(MCFUART_UCSR_RXCLKTIMER | MCFUART_UCSR_TXCLKTIMER,
port->membase + MCFUART_UCSR);
writeb(MCFUART_UCR_RXENABLE | MCFUART_UCR_TXENABLE,
OpenPOWER on IntegriCloud