static int hvc_udbg_put(uint32_t vtermno, const char *buf, int count) { int i; for (i = 0; i < count; i++) udbg_putc(buf[i]); return i; }
static void udbg_putc_cpm(char c) { u8 __iomem *txbuf = (u8 __iomem __force *)in_be32(&cpm_udbg_txdesc[1]); if (c == '\n') udbg_putc('\r'); while (in_be32(&cpm_udbg_txdesc[0]) & 0x80000000) ; out_8(txbuf, c); out_be32(&cpm_udbg_txdesc[0], 0xa0000001); }
/* udbg library, used by xmon et al */ void udbg_puts(const char *s) { if (udbg_putc) { char c; if (s && *s != '\0') { while ((c = *s++) != '\0') udbg_putc(c); } if (udbg_flush) udbg_flush(); } }
int udbg_write(const char *s, int n) { int remain = n; char c; if (!udbg_putc) return 0; if (s && *s != '\0') { while (((c = *s++) != '\0') && (remain-- > 0)) { udbg_putc(c); } } return n - remain; }
/* udbg library, used by xmon et al */ void udbg_puts(const char *s) { if (udbg_putc) { char c; if (s && *s != '\0') { while ((c = *s++) != '\0') udbg_putc(c); } } #if 0 else { printk("%s", s); } #endif }
void udbg_putc(unsigned char c) { if (udbg_comport) { while ((udbg_comport->lsr & LSR_THRE) == 0) /* wait for idle */; udbg_comport->thr = c; eieio(); if (c == '\n') { /* Also put a CR. This is for convenience. */ while ((udbg_comport->lsr & LSR_THRE) == 0) /* wait for idle */; udbg_comport->thr = '\r'; eieio(); } } #ifdef CONFIG_PPC_PMAC else if (sccc) { while ((*sccc & SCC_TXRDY) == 0) eieio(); *sccd = c; eieio(); if (c == '\n') udbg_putc('\r'); } #endif /* CONFIG_PPC_PMAC */ }