44 lines
1.1 KiB
Diff
44 lines
1.1 KiB
Diff
Index: init.c
|
|
===================================================================
|
|
--- init.c.orig
|
|
+++ init.c
|
|
@@ -29,6 +29,7 @@ static ulong memspeed(ulong src, ulong l
|
|
static void cpu_type(void);
|
|
static void cacheable(void);
|
|
static int cpuspeed(void);
|
|
+extern short serial_cons;
|
|
|
|
static void display_init(void)
|
|
{
|
|
@@ -65,6 +66,9 @@ static void display_init(void)
|
|
}
|
|
|
|
serial_echo_print("\x1B[0m");
|
|
+
|
|
+ if (!serial_cons && SERIAL_CONSOLE_DEFAULT)
|
|
+ cprint (23, 0, "Timout on serial console: disabled");
|
|
}
|
|
|
|
/*
|
|
Index: serial.h
|
|
===================================================================
|
|
--- serial.h.orig
|
|
+++ serial.h
|
|
@@ -140,10 +140,12 @@
|
|
#define serial_echo_inb(a) inb((a)+0x3f8)
|
|
#define BOTH_EMPTY (UART_LSR_TEMT | UART_LSR_THRE)
|
|
/* Wait for transmitter & holding register to empty */
|
|
-#define WAIT_FOR_XMITR \
|
|
- do { \
|
|
- lsr = serial_echo_inb(UART_LSR); \
|
|
- } while ((lsr & BOTH_EMPTY) != BOTH_EMPTY)
|
|
+#define WAIT_FOR_XMITR \
|
|
+ int _i = 1<<15; \
|
|
+ do { \
|
|
+ lsr = serial_echo_inb(UART_LSR); \
|
|
+ } while ((lsr & BOTH_EMPTY) != BOTH_EMPTY && --_i); \
|
|
+ if (!_i) serial_cons = 0
|
|
|
|
#if 0
|
|
static inline void serial_echo(int ch)
|