m68knommu: fix ColdFire 5272 serial baud rates in mcf.c

I noticed (the hard way) that the mcf.c driver doesn't support the fractional precision register on the MCF5272. This makes the console dicey at 115200 baud and a system clock of 66.0 MHz. On the other hand, if your hardware is running at 66.666 MHz, it probably isn't a problem.

Patch submitted by John Adamson <jadamson@allen-organ.com>

Signed-off-by: Greg Ungerer <gerg@uclinux.org>

authored by John Adamson and committed by Greg Ungerer 26a4bc66 c7bcd0df

+11
+11
drivers/serial/mcf.c
··· 212 212 { 213 213 unsigned long flags; 214 214 unsigned int baud, baudclk; 215 + #if defined(CONFIG_M5272) 216 + unsigned int baudfr; 217 + #endif 215 218 unsigned char mr1, mr2; 216 219 217 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 225 baudclk = ((MCF_BUSCLK / baud) + 16) / 32; 226 + #endif 219 227 220 228 mr1 = MCFUART_MR1_RXIRQRDY | MCFUART_MR1_RXERRCHAR; 221 229 mr2 = 0; ··· 270 262 writeb(mr2, port->membase + MCFUART_UMR); 271 263 writeb((baudclk & 0xff00) >> 8, port->membase + MCFUART_UBG1); 272 264 writeb((baudclk & 0xff), port->membase + MCFUART_UBG2); 265 + #if defined(CONFIG_M5272) 266 + writeb((baudfr & 0x0f), port->membase + MCFUART_UFPD); 267 + #endif 273 268 writeb(MCFUART_UCSR_RXCLKTIMER | MCFUART_UCSR_TXCLKTIMER, 274 269 port->membase + MCFUART_UCSR); 275 270 writeb(MCFUART_UCR_RXENABLE | MCFUART_UCR_TXENABLE,