Re: [PATCH] serial: Add driver for OMAP UARTs

Ville Tervo
2007-04-10T12:28:10Z

Hi Juha,

Some reviewing and testing done. Some comments.

> + /* Reset the UART */
> + serial_out(up, UART_OMAP_MDR1, 0x07);
> + udelay(50);
> + serial_out(up, UART_OMAP_MDR1, 0x00);

I think that this doesn't really reset UART. And the result is some
garbage coming from serial port after opening it.

serial_out(up, UART_OMAP_SYSC, 0x02);
udelay(50);

should be used instead?

> + if (co->index == -1 || co->index >= serial_omap_reg.nr ||
> + serial_omap_console_ports[co->index] == NULL)
> + co->index = 0;

I don't understand what is point in this code but following observation.
Kernel hits null pointer if this code is in and multible ports are
enabled from bootloader.

Without this code multible ports work fine.

--
Ville