Exemple #1
0
/*
 * Wait until the interface can accept a char, then write it.
 */
static void
kgdb_put_debug_char(int chr)
{
	static char ch[2];
	ch[0]=(char)chr;
	cpm_uart_early_write(KGDB_PINFO_INDEX, ch, 1);
}
static void cpm_put_poll_char(struct uart_port *port,
			 unsigned char c)
{
	struct uart_cpm_port *pinfo = (struct uart_cpm_port *)port;
	static char ch[2];

	ch[0] = (char)c;
	cpm_uart_early_write(pinfo->port.line, ch, 1);
}
Exemple #3
0
/*
 *	Print a string to the serial port trying not to disturb
 *	any possible real use of the port...
 *
 *	Note that this is called with interrupts already disabled
 */
static void cpm_uart_console_write(struct console *co, const char *s,
				   u_int count)
{
	struct uart_cpm_port *pinfo = &cpm_uart_ports[co->index];
	unsigned long flags;
	int nolock = oops_in_progress;

	if (unlikely(nolock)) {
		local_irq_save(flags);
	} else {
		spin_lock_irqsave(&pinfo->port.lock, flags);
	}

	cpm_uart_early_write(pinfo, s, count);

	if (unlikely(nolock)) {
		local_irq_restore(flags);
	} else {
		spin_unlock_irqrestore(&pinfo->port.lock, flags);
	}
}
Exemple #4
0
static void cpm_uart_console_write(struct console *co, const char *s,
				   u_int count)
{
	cpm_uart_early_write(cpm_uart_port_map[co->index],s,count);
}