static int udbg_44x_as1_getc(void) { if (udbg_comport) { while ((as1_readb(&udbg_comport->lsr) & LSR_DR) == 0) ; /* wait for char */ return as1_readb(&udbg_comport->rbr); } return -1; }
static void udbg_44x_as1_flush(void) { if (udbg_comport) { while ((as1_readb(&udbg_comport->lsr) & LSR_THRE) == 0) /* wait for idle */; } }
static void udbg_44x_as1_putc(char c) { if (udbg_comport) { while ((as1_readb(&udbg_comport->lsr) & LSR_THRE) == 0) /* wait for idle */; as1_writeb(c, &udbg_comport->thr); eieio(); if (c == '\n') udbg_44x_as1_putc('\r'); } }
static u8 udbg_uart_in_44x_as1(unsigned int reg) { return as1_readb((void __iomem *)PPC44x_EARLY_DEBUG_VIRTADDR + reg); }