static void ram_console_dump(struct kmsg_dumper *dumper, enum kmsg_dump_reason reason,
		const char *s1, unsigned long l1,
		const char *s2, unsigned long l2)
{
	ram_console_write(NULL, s1, l1);
	ram_console_write(NULL, s2, l2);
}
Example #2
0
static int ram_console_tty_write(struct tty_struct *tty,
		const unsigned char *buf, int count)
{
	struct ram_console_port *rcp = tty->driver_data;
//	printk("%s\n",__func__);

	/* exclusive use of tpk_printk within this tty */
	mutex_lock(&rcp->port_write_mutex);
	ram_console_write(0,buf, count);
	mutex_unlock(&rcp->port_write_mutex);

	return count;
}
void aee_sram_printk(const char *fmt, ...)
{
#ifdef CONFIG_MTK_RAM_CONSOLE
	unsigned long long t;
	unsigned long nanosec_rem;
	va_list args;
	int r, tlen;

	va_start(args, fmt);

	preempt_disable();
	t = cpu_clock(smp_processor_id());
	nanosec_rem = do_div(t, 1000000000);
	tlen = sprintf(sram_printk_buf, ">%5lu.%06lu< ", (unsigned long)t, nanosec_rem / 1000);

	r = vsnprintf(sram_printk_buf + tlen, sizeof(sram_printk_buf) - tlen, fmt, args);

	ram_console_write(NULL, sram_printk_buf, r + tlen);
	preempt_enable();
	va_end(args);
#endif
}
Example #4
0
void ram_console_scribble(const char* s, unsigned int count)
{
	ram_console_write(NULL, s, count);
}