Eric Biederman | 8ca8d76 | 2003-04-22 19:02:15 +0000 | [diff] [blame] | 1 | #include <console/console.h> |
| 2 | |
| 3 | #define LOGBUF_SIZE 1024 |
| 4 | |
Stefan Reinauer | 14e2277 | 2010-04-27 06:56:47 +0000 | [diff] [blame] | 5 | // KEEP THIS GLOBAL. |
Eric Biederman | 8ca8d76 | 2003-04-22 19:02:15 +0000 | [diff] [blame] | 6 | // I need the address so I can watch it with the ARIUM hardware. RGM. |
| 7 | char logbuf[LOGBUF_SIZE]; |
| 8 | int logbuf_offset = 0; |
| 9 | |
| 10 | static void logbuf_tx_byte(unsigned char byte) |
| 11 | { |
| 12 | logbuf[logbuf_offset] = byte; |
| 13 | logbuf_offset = (logbuf_offset +1) % LOGBUF_SIZE; |
| 14 | } |
| 15 | |
Stefan Reinauer | bf873e4 | 2007-10-24 14:42:12 +0000 | [diff] [blame] | 16 | static const struct console_driver __console = { |
Eric Biederman | 8ca8d76 | 2003-04-22 19:02:15 +0000 | [diff] [blame] | 17 | .init = 0, |
| 18 | .tx_byte = logbuf_tx_byte, |
Greg Watson | e54d55b | 2004-03-13 03:40:51 +0000 | [diff] [blame] | 19 | .rx_byte = 0, |
| 20 | .tst_byte = 0, |
Eric Biederman | 8ca8d76 | 2003-04-22 19:02:15 +0000 | [diff] [blame] | 21 | };} |