__raw_writel(value, p->membase + offset);
}
- /* Save the LCR value so it can be re-written when a Busy Detect IRQ occurs. */
- static inline void dwapb_save_out_value(struct uart_port *p, int offset,
- int value)
- {
- struct uart_8250_port *up =
- container_of(p, struct uart_8250_port, port);
-
- if (offset == UART_LCR)
- up->lcr = value;
- }
-
- /* Read the IER to ensure any interrupt is cleared before returning from ISR. */
- static inline void dwapb_check_clear_ier(struct uart_port *p, int offset)
- {
- if (offset == UART_TX || offset == UART_IER)
- p->serial_in(p, UART_IER);
- }
-
- static void dwapb_serial_out(struct uart_port *p, int offset, int value)
-static unsigned int tsi_serial_in(struct uart_port *p, int offset)
--{
- int save_offset = offset;
- offset = map_8250_out_reg(p, offset) << p->regshift;
- dwapb_save_out_value(p, save_offset, value);
- writeb(value, p->membase + offset);
- dwapb_check_clear_ier(p, save_offset);
- unsigned int tmp;
- offset = map_8250_in_reg(p, offset) << p->regshift;
- if (offset == UART_IIR) {
- tmp = readl(p->membase + (UART_IIR & ~3));
- return (tmp >> 16) & 0xff; /* UART_IIR % 4 == 2 */
- } else
- return readb(p->membase + offset);
--}
--
- static void dwapb32_serial_out(struct uart_port *p, int offset, int value)
-static void tsi_serial_out(struct uart_port *p, int offset, int value)
--{
- int save_offset = offset;
-- offset = map_8250_out_reg(p, offset) << p->regshift;
- dwapb_save_out_value(p, save_offset, value);
- writel(value, p->membase + offset);
- dwapb_check_clear_ier(p, save_offset);
- if (!((offset == UART_IER) && (value & UART_IER_UUE)))
- writeb(value, p->membase + offset);
--}
--
static unsigned int io_serial_in(struct uart_port *p, int offset)
{
offset = map_8250_in_reg(p, offset) << p->regshift;
p->serial_out = au_serial_out;
break;
- case UPIO_DWAPB:
- p->serial_in = mem_serial_in;
- p->serial_out = dwapb_serial_out;
- break;
-
- case UPIO_DWAPB32:
- p->serial_in = mem32_serial_in;
- p->serial_out = dwapb32_serial_out;
- case UPIO_TSI:
- p->serial_in = tsi_serial_in;
- p->serial_out = tsi_serial_out;
-- break;
--
default:
p->serial_in = io_serial_in;
p->serial_out = io_serial_out;