void samsung_lowlevel_putc(virtual_addr_t base, u8 ch) { /* Wait until there is space in the FIFO */ while (!samsung_lowlevel_can_putc(base)) ; /* Send the character */ vmm_out_8((void *)(base + S3C2410_UTXH), ch); }
static int samsung_defterm_putc(u8 ch) { if (!samsung_lowlevel_can_putc(samsung_defterm_base)) { return VMM_EFAIL; } samsung_lowlevel_putc(samsung_defterm_base, ch); return VMM_OK; }
static u32 samsung_tx(struct serial *p, u8 *src, size_t len) { u32 i; struct samsung_port *port = serial_tx_priv(p); for (i = 0; i < len; i++) { if (!samsung_lowlevel_can_putc(port->base)) { break; } samsung_lowlevel_putc(port->base, src[i]); } return i; }