static inline void _debug_uart_putc(int ch) { struct NS16550 *com_port = (struct NS16550 *)CONFIG_DEBUG_UART_BASE; while (!(serial_in_shift(&com_port->lsr, 0) & UART_LSR_THRE)) ; serial_out_shift(&com_port->thr, 0, ch); }
static int ns16550_readb(NS16550_t port, int offset) { struct ns16550_platdata *plat = port->plat; unsigned char *addr; offset *= 1 << plat->reg_shift; addr = map_sysmem(plat->base, 0) + offset; return serial_in_shift(addr, plat->reg_shift); }
static int ns16550_readb(NS16550_t port, int offset) { struct ns16550_platdata *plat = port->plat; unsigned char *addr; offset *= 1 << plat->reg_shift; addr = (unsigned char *)plat->base + offset; return serial_in_shift(addr + plat->reg_offset, plat->reg_shift); }