static int uartmem_tst_byte(void) { if (!uart_bar) return 0; return uart8250_mem_can_rx_byte(uart_bar); }
static unsigned char uart8250_mem_rx_byte(void *base) { unsigned long int i = SINGLE_CHAR_TIMEOUT; while(i-- && !uart8250_mem_can_rx_byte(base)) udelay(1); if (i) return uart8250_read(base, UART8250_RBR); else return 0x0; }
unsigned char uart8250_mem_rx_byte(unsigned base_port) { unsigned long int i = SINGLE_CHAR_TIMEOUT; while(i-- && !uart8250_mem_can_rx_byte(base_port)) udelay(1); if (i) return read8(base_port + UART_RBR); else return 0x0; }