diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-28 11:41:57 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-28 11:41:57 -0500 |
commit | 78a768b6ca40e104442ade090226ed4ee0e6cebf (patch) | |
tree | f20e2d78107edd3f4247350b5e6d2e2560bff9d8 /drivers/serial | |
parent | d8204ee2ad1c9babd7e33d4c118ec99a78a8442e (diff) | |
parent | add8240eedb586b9d885c324db7f98fc1a470f9f (diff) |
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.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/serial/mcf.c b/drivers/serial/mcf.c index b2001c5b145c..56841fe5f483 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, | |||
212 | { | 212 | { |
213 | unsigned long flags; | 213 | unsigned long flags; |
214 | unsigned int baud, baudclk; | 214 | unsigned int baud, baudclk; |
215 | #if defined(CONFIG_M5272) | ||
216 | unsigned int baudfr; | ||
217 | #endif | ||
215 | unsigned char mr1, mr2; | 218 | unsigned char mr1, mr2; |
216 | 219 | ||
217 | baud = uart_get_baud_rate(port, termios, old, 0, 230400); | 220 | baud = uart_get_baud_rate(port, termios, old, 0, 230400); |
221 | #if defined(CONFIG_M5272) | ||
222 | baudclk = (MCF_BUSCLK / baud) / 32; | ||
223 | baudfr = (((MCF_BUSCLK / baud) + 1) / 2) % 16; | ||
224 | #else | ||
218 | baudclk = ((MCF_BUSCLK / baud) + 16) / 32; | 225 | baudclk = ((MCF_BUSCLK / baud) + 16) / 32; |
226 | #endif | ||
219 | 227 | ||
220 | mr1 = MCFUART_MR1_RXIRQRDY | MCFUART_MR1_RXERRCHAR; | 228 | mr1 = MCFUART_MR1_RXIRQRDY | MCFUART_MR1_RXERRCHAR; |
221 | mr2 = 0; | 229 | mr2 = 0; |
@@ -262,6 +270,9 @@ static void mcf_set_termios(struct uart_port *port, struct ktermios *termios, | |||
262 | writeb(mr2, port->membase + MCFUART_UMR); | 270 | writeb(mr2, port->membase + MCFUART_UMR); |
263 | writeb((baudclk & 0xff00) >> 8, port->membase + MCFUART_UBG1); | 271 | writeb((baudclk & 0xff00) >> 8, port->membase + MCFUART_UBG1); |
264 | writeb((baudclk & 0xff), port->membase + MCFUART_UBG2); | 272 | writeb((baudclk & 0xff), port->membase + MCFUART_UBG2); |
273 | #if defined(CONFIG_M5272) | ||
274 | writeb((baudfr & 0x0f), port->membase + MCFUART_UFPD); | ||
275 | #endif | ||
265 | writeb(MCFUART_UCSR_RXCLKTIMER | MCFUART_UCSR_TXCLKTIMER, | 276 | writeb(MCFUART_UCSR_RXCLKTIMER | MCFUART_UCSR_TXCLKTIMER, |
266 | port->membase + MCFUART_UCSR); | 277 | port->membase + MCFUART_UCSR); |
267 | writeb(MCFUART_UCR_RXENABLE | MCFUART_UCR_TXENABLE, | 278 | writeb(MCFUART_UCR_RXENABLE | MCFUART_UCR_TXENABLE, |