blob: a76791d542fcc81ab8265dc51fe431327a22cf8c [file] [log] [blame]
Eric Biederman8ca8d762003-04-22 19:02:15 +00001#include <console/console.h>
2
3#define LOGBUF_SIZE 1024
4
Stefan Reinauer14e22772010-04-27 06:56:47 +00005// KEEP THIS GLOBAL.
Eric Biederman8ca8d762003-04-22 19:02:15 +00006// I need the address so I can watch it with the ARIUM hardware. RGM.
7char logbuf[LOGBUF_SIZE];
8int logbuf_offset = 0;
9
10static void logbuf_tx_byte(unsigned char byte)
11{
12 logbuf[logbuf_offset] = byte;
13 logbuf_offset = (logbuf_offset +1) % LOGBUF_SIZE;
14}
15
Stefan Reinauerbf873e42007-10-24 14:42:12 +000016static const struct console_driver __console = {
Eric Biederman8ca8d762003-04-22 19:02:15 +000017 .init = 0,
18 .tx_byte = logbuf_tx_byte,
Greg Watsone54d55b2004-03-13 03:40:51 +000019 .rx_byte = 0,
20 .tst_byte = 0,
Eric Biederman8ca8d762003-04-22 19:02:15 +000021};}