Skip to contentSkip to conversation

Bug detection and correction on Alchemy au1x00_uart.c serial driver

DISCUSSION Applied d.piccolo 2 participants 2 messages Apr 18, 2005 – Apr 21, 2005 MIPS

lore
Share & tools
lore

d.piccolo

author
#0 lore raw

Hi Everybody

I've found a bug in the au1x00_uart.c file in the drivers/serial/ directory of the 2.6.10 linux kernel. There is only possible to change the speed of the communication but not to update other parameters of the serial link, like the number of bits involved, stop bits and parity.
Comparing the code of this source file with the code of the standard
8250 driver (8250.c also present in the same directory) I've found the
problem: au1x00_uart.c never updates the LCR register (Line Control Register) of the serial controller at runtime, it happens only at first setup. The problem is solved by adding the line

	serial_out(up, UART_LCR, cval);

just before the line

	up->lcr = cval;	  /* Save LCR */

(there is only one position in all the source code where is written "Save LCR")

I hope it could be useful.
David Piccolo

Applied
#1 lore raw

Applied, thanks.

Pete

Quoted 29 lines · d.piccolo

Hi Everybody

I've found a bug in the au1x00_uart.c file in the drivers/serial/ directory of the 2.6.10 linux kernel. There is only possible to change the speed of the communication but not to update other parameters of the serial link, like the number of bits involved, stop bits and parity.
Comparing the code of this source file with the code of the standard
8250 driver (8250.c also present in the same directory) I've found the
problem: au1x00_uart.c never updates the LCR register (Line Control Register) of the serial controller at runtime, it happens only at first setup. The problem is solved by adding the line

	serial_out(up, UART_LCR, cval);

just before the line

	up->lcr = cval;	  /* Save LCR */

(there is only one position in all the source code where is written "Save LCR")

I hope it could be useful.
David Piccolo