summaryrefslogtreecommitdiffstats
path: root/drivers/serial
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-01-28 08:41:57 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-28 08:41:57 -0800
commit78a768b6ca40e104442ade090226ed4ee0e6cebf (patch)
treef20e2d78107edd3f4247350b5e6d2e2560bff9d8 /drivers/serial
parentd8204ee2ad1c9babd7e33d4c118ec99a78a8442e (diff)
parentadd8240eedb586b9d885c324db7f98fc1a470f9f (diff)
downloadop-kernel-dev-78a768b6ca40e104442ade090226ed4ee0e6cebf.zip
op-kernel-dev-78a768b6ca40e104442ade090226ed4ee0e6cebf.tar.gz
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: m68knommu: fix 5329 ColdFire periphal addressing uclinux: add process name to allocation error message m68knommu: correct the mii calculations for 532x ColdFire FEC m68knommu: add ColdFire M532x to the FEC configuration options m68knommu: fix syscall restarting m68knommu: remove the obsolete and long unused comempci chip support m68knommu: remove the no longer used PCI support option m68knommu: remove obsolete and unused eLIA board m68knommu: set NO_DMA m68knommu: fix cache flushing for the 527x ColdFire processors m68knommu: fix ColdFire 5272 serial baud rates in mcf.c m68knommu: use one exist from execption
Diffstat (limited to 'drivers/serial')
-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