Re: [Nios2-dev] [PATCH 2/2] serial: Add driver for the Altera UART

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Tobias Klauser
Date: Thursday, May 6, 2010 - 5:03 am

Hi Ian,

Thanks a lot for your review. Please see my notes below.

On 05/06/2010 12:44 PM, Ian Abbott wrote:

Agreed, I removed the lock grabbing from altera_uart_stop_rx,
altera_uart_stop_tx, altera_uart_start_tx, altera_uart_set_mctrl and
altera_uart_get_mctrl (as suggested in the original message and the two
followups).

I also noticed, that altera_uart_break_ctl takes the lock which might be
not necessary as the caller in serial_core.c already takes port->mutex
which should be enough. Or am I wrong?


I added the lock to the interrupt routine (similar to altera_jtaguart.c).


Those seem to come from mcf.c on which this driver was based. I added
the udelay to the first loop and dropped the second loop which indeed
isn't needed here. I also replace the first loop with the equivalent
construct from altera_uart_tx_chars.


As I understood from Alan's comment on altera_jtaguart.c the lock is
needed to protect port->port.tty so I'll add it in altera_uart.c too.

Cheers,
Tobias
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH v5 0/2] serial: Drivers for Altera UARTs, Tobias Klauser, (Wed May 5, 1:35 am)
[PATCH 1/2] serial: Add driver for the Altera JTAG UART, Tobias Klauser, (Wed May 5, 1:35 am)
[PATCH 2/2] serial: Add driver for the Altera UART, Tobias Klauser, (Wed May 5, 1:35 am)
Re: [Nios2-dev] [PATCH 2/2] serial: Add driver for the Alt ..., Tobias Klauser, (Thu May 6, 5:03 am)