diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2007-04-27 15:50:03 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-04-29 21:02:04 -0400 |
commit | 8b01653ab01eebc781c5a375ff336d0837f30c4e (patch) | |
tree | f86e552eb7e1490dec344c1088b97fa03e7238a7 /arch/ppc/boot/common | |
parent | 8c38fc2b7429b26105fe244890c8d5ab3043f099 (diff) |
[POWERPC] Add uartlite boot console driver for the zImage wrapper
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/ppc/boot/common')
-rw-r--r-- | arch/ppc/boot/common/misc-common.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/arch/ppc/boot/common/misc-common.c b/arch/ppc/boot/common/misc-common.c index 8e1fccd96fc0..9589969cec72 100644 --- a/arch/ppc/boot/common/misc-common.c +++ b/arch/ppc/boot/common/misc-common.c | |||
@@ -57,7 +57,8 @@ unsigned char *ISA_io = NULL; | |||
57 | 57 | ||
58 | #if defined(CONFIG_SERIAL_CPM_CONSOLE) || defined(CONFIG_SERIAL_8250_CONSOLE) \ | 58 | #if defined(CONFIG_SERIAL_CPM_CONSOLE) || defined(CONFIG_SERIAL_8250_CONSOLE) \ |
59 | || defined(CONFIG_SERIAL_MPC52xx_CONSOLE) \ | 59 | || defined(CONFIG_SERIAL_MPC52xx_CONSOLE) \ |
60 | || defined(CONFIG_SERIAL_MPSC_CONSOLE) | 60 | || defined(CONFIG_SERIAL_MPSC_CONSOLE) \ |
61 | || defined(CONFIG_SERIAL_UARTLITE_CONSOLE) | ||
61 | extern unsigned long com_port; | 62 | extern unsigned long com_port; |
62 | 63 | ||
63 | extern int serial_tstc(unsigned long com_port); | 64 | extern int serial_tstc(unsigned long com_port); |
@@ -80,7 +81,8 @@ int tstc(void) | |||
80 | { | 81 | { |
81 | #if defined(CONFIG_SERIAL_CPM_CONSOLE) || defined(CONFIG_SERIAL_8250_CONSOLE) \ | 82 | #if defined(CONFIG_SERIAL_CPM_CONSOLE) || defined(CONFIG_SERIAL_8250_CONSOLE) \ |
82 | || defined(CONFIG_SERIAL_MPC52xx_CONSOLE) \ | 83 | || defined(CONFIG_SERIAL_MPC52xx_CONSOLE) \ |
83 | || defined(CONFIG_SERIAL_MPSC_CONSOLE) | 84 | || defined(CONFIG_SERIAL_MPSC_CONSOLE) \ |
85 | || defined(CONFIG_SERIAL_UARTLITE_CONSOLE) | ||
84 | if(keyb_present) | 86 | if(keyb_present) |
85 | return (CRT_tstc() || serial_tstc(com_port)); | 87 | return (CRT_tstc() || serial_tstc(com_port)); |
86 | else | 88 | else |
@@ -95,7 +97,8 @@ int getc(void) | |||
95 | while (1) { | 97 | while (1) { |
96 | #if defined(CONFIG_SERIAL_CPM_CONSOLE) || defined(CONFIG_SERIAL_8250_CONSOLE) \ | 98 | #if defined(CONFIG_SERIAL_CPM_CONSOLE) || defined(CONFIG_SERIAL_8250_CONSOLE) \ |
97 | || defined(CONFIG_SERIAL_MPC52xx_CONSOLE) \ | 99 | || defined(CONFIG_SERIAL_MPC52xx_CONSOLE) \ |
98 | || defined(CONFIG_SERIAL_MPSC_CONSOLE) | 100 | || defined(CONFIG_SERIAL_MPSC_CONSOLE) \ |
101 | || defined(CONFIG_SERIAL_UARTLITE_CONSOLE) | ||
99 | if (serial_tstc(com_port)) | 102 | if (serial_tstc(com_port)) |
100 | return (serial_getc(com_port)); | 103 | return (serial_getc(com_port)); |
101 | #endif /* serial console */ | 104 | #endif /* serial console */ |
@@ -112,7 +115,8 @@ putc(const char c) | |||
112 | 115 | ||
113 | #if defined(CONFIG_SERIAL_CPM_CONSOLE) || defined(CONFIG_SERIAL_8250_CONSOLE) \ | 116 | #if defined(CONFIG_SERIAL_CPM_CONSOLE) || defined(CONFIG_SERIAL_8250_CONSOLE) \ |
114 | || defined(CONFIG_SERIAL_MPC52xx_CONSOLE) \ | 117 | || defined(CONFIG_SERIAL_MPC52xx_CONSOLE) \ |
115 | || defined(CONFIG_SERIAL_MPSC_CONSOLE) | 118 | || defined(CONFIG_SERIAL_MPSC_CONSOLE) \ |
119 | || defined(CONFIG_SERIAL_UARTLITE_CONSOLE) | ||
116 | serial_putc(com_port, c); | 120 | serial_putc(com_port, c); |
117 | if ( c == '\n' ) | 121 | if ( c == '\n' ) |
118 | serial_putc(com_port, '\r'); | 122 | serial_putc(com_port, '\r'); |
@@ -161,7 +165,8 @@ void puts(const char *s) | |||
161 | while ( ( c = *s++ ) != '\0' ) { | 165 | while ( ( c = *s++ ) != '\0' ) { |
162 | #if defined(CONFIG_SERIAL_CPM_CONSOLE) || defined(CONFIG_SERIAL_8250_CONSOLE) \ | 166 | #if defined(CONFIG_SERIAL_CPM_CONSOLE) || defined(CONFIG_SERIAL_8250_CONSOLE) \ |
163 | || defined(CONFIG_SERIAL_MPC52xx_CONSOLE) \ | 167 | || defined(CONFIG_SERIAL_MPC52xx_CONSOLE) \ |
164 | || defined(CONFIG_SERIAL_MPSC_CONSOLE) | 168 | || defined(CONFIG_SERIAL_MPSC_CONSOLE) \ |
169 | || defined(CONFIG_SERIAL_UARTLITE_CONSOLE) | ||
165 | serial_putc(com_port, c); | 170 | serial_putc(com_port, c); |
166 | if ( c == '\n' ) serial_putc(com_port, '\r'); | 171 | if ( c == '\n' ) serial_putc(com_port, '\r'); |
167 | #endif /* serial console */ | 172 | #endif /* serial console */ |