Пример #1
0
static void
console_write(struct console *co, const char *buf, unsigned int len)
{
	if (!port)
		return;

#ifdef CONFIG_SVINTO_SIM
	/* no use to simulate the serial debug output */
	SIMCOUT(buf, len);
	return;
#endif

	start_port();

#ifdef CONFIG_ETRAX_KGDB
	/* kgdb needs to output debug info using the gdb protocol */
	putDebugString(buf, len);
	return;
#endif

	if (debug_write_function)
		debug_write_function(co->index, buf, len);
	else
		console_write_direct(co, buf, len);
}
Пример #2
0
static void
console_write(struct console *co, const char *buf, unsigned int len)
{
    unsigned long flags;
#ifdef CONFIG_ETRAX_DEBUG_PORT_NULL
    /* no debug printout at all */
    return;
#endif

#ifdef CONFIG_SVINTO_SIM
    /* no use to simulate the serial debug output */
    SIMCOUT(buf,len);
    return;
#endif

#ifdef CONFIG_ETRAX_KGDB
    /* kgdb needs to output debug info using the gdb protocol */
    putDebugString(buf, len);
    return;
#endif

    local_irq_save(flags);
    if (debug_write_function)
        if (debug_write_function(co->index, buf, len))
            return;
    console_write_direct(co, buf, len);
    local_irq_restore(flags);
}
Пример #3
0
static void
console_write(struct console *co, const char *buf, unsigned int len)
{
	if (!port)
		return;
        console_write_direct(co, buf, len);
}
Пример #4
0
static void
console_write(struct console *co, const char *buf, unsigned int len)
{
	if (!port)
		return;

#ifdef CONFIG_SVINTO_SIM
	/* no use to simulate the serial debug output */
	SIMCOUT(buf, len);
	return;
#endif

        console_write_direct(co, buf, len);
}
Пример #5
0
static void
console_write(struct console *co, const char *buf, unsigned int len)
{
	if (!port)
		return;

#ifdef CONFIG_SVINTO_SIM
	/*                                            */
	SIMCOUT(buf, len);
	return;
#endif

        console_write_direct(co, buf, len);
}
Пример #6
0
int raw_printk(const char *fmt, ...)
{
	static char buf[1024];
	int printed_len;
	static int first = 1;
	if (first) {
		/* Force reinitialization of the port to get manual mode. */
		port->started = 0;
		start_port(port);
		first = 0;
	}
	va_list args;
	va_start(args, fmt);
	printed_len = vsnprintf(buf, sizeof(buf), fmt, args);
	va_end(args);
	console_write_direct(NULL, buf, strlen(buf));
	return printed_len;
}