On Mon, 15 Oct 2007 13:33:07 -0500, Jason Wessel <jason.wessel@windriver.com> wrote:
Thank you for attempting to mainline it. I have some cosmetic comments.
It would be better to avoid volatile.
static inline unsigned int sio_in(struct uart_port *port, int offset)
{
return __raw_readl(port->membase + offset);
}
static inline void sio_out(struct uart_port *port, int offset,
unsigned int value)
{
__raw_writel(value, port->membase + offset);
}
A while ago, this part of serial_txx9.c was changed a bit (no ifdefs,
avoid endless loop). Could you change it to:
unsigned int tmout = 10000;
sio_out(kgdb_port, TXX9_SIFCR, TXX9_SIFCR_SWRST);
/* TX4925 BUG WORKAROUND. Accessing SIOC register
* immediately after soft reset causes bus error. */
mmiowb();
udelay(1);
while ((sio_in(kgdb_port, TXX9_SIFCR) & TXX9_SIFCR_SWRST) && --tmout)
udelay(1);
uart_get_divisor() can be used here:
quot = uart_get_divisor(kgdb_port, kgdb_txx9_baud);
It would be better to do it more similar to serial_txx9.c:
quot >>= 1;
if (quot < 256)
sibgr = quot | TXX9_SIBGR_BCLK_T0;
else if (quot < (256 << 2))
sibgr = (quot >> 2) | TXX9_SIBGR_BCLK_T2;
else if (quot < (256 << 4))
sibgr = (quot >> 4) | TXX9_SIBGR_BCLK_T4;
else if (quot < (256 << 6))
sibgr = (quot >> 6) | TXX9_SIBGR_BCLK_T6;
else
sibgr = 0xff | TXX9_SIBGR_BCLK_T6;
---
Atsushi Nemoto
-