|
@@ -165,23 +165,35 @@ static void serial_init ( void ) {
|
165
|
165
|
*/
|
166
|
166
|
uart_writeb(0x80 | lcs, UART_BASE + UART_LCR);
|
167
|
167
|
uart_writeb(0xaa, UART_BASE + UART_DLL);
|
168
|
|
- if (uart_readb(UART_BASE + UART_DLL) != 0xaa)
|
|
168
|
+ if (uart_readb(UART_BASE + UART_DLL) != 0xaa) {
|
|
169
|
+ DBG ( "Serial port %#x UART_DLL failed\n", UART_BASE );
|
169
|
170
|
goto out;
|
|
171
|
+ }
|
170
|
172
|
uart_writeb(0x55, UART_BASE + UART_DLL);
|
171
|
|
- if (uart_readb(UART_BASE + UART_DLL) != 0x55)
|
|
173
|
+ if (uart_readb(UART_BASE + UART_DLL) != 0x55) {
|
|
174
|
+ DBG ( "Serial port %#x UART_DLL failed\n", UART_BASE );
|
172
|
175
|
goto out;
|
|
176
|
+ }
|
173
|
177
|
uart_writeb(divisor & 0xff, UART_BASE + UART_DLL);
|
174
|
|
- if (uart_readb(UART_BASE + UART_DLL) != (divisor & 0xff))
|
|
178
|
+ if (uart_readb(UART_BASE + UART_DLL) != (divisor & 0xff)) {
|
|
179
|
+ DBG ( "Serial port %#x UART_DLL failed\n", UART_BASE );
|
175
|
180
|
goto out;
|
|
181
|
+ }
|
176
|
182
|
uart_writeb(0xaa, UART_BASE + UART_DLM);
|
177
|
|
- if (uart_readb(UART_BASE + UART_DLM) != 0xaa)
|
|
183
|
+ if (uart_readb(UART_BASE + UART_DLM) != 0xaa) {
|
|
184
|
+ DBG ( "Serial port %#x UART_DLM failed\n", UART_BASE );
|
178
|
185
|
goto out;
|
|
186
|
+ }
|
179
|
187
|
uart_writeb(0x55, UART_BASE + UART_DLM);
|
180
|
|
- if (uart_readb(UART_BASE + UART_DLM) != 0x55)
|
|
188
|
+ if (uart_readb(UART_BASE + UART_DLM) != 0x55) {
|
|
189
|
+ DBG ( "Serial port %#x UART_DLM failed\n", UART_BASE );
|
181
|
190
|
goto out;
|
|
191
|
+ }
|
182
|
192
|
uart_writeb((divisor >> 8) & 0xff, UART_BASE + UART_DLM);
|
183
|
|
- if (uart_readb(UART_BASE + UART_DLM) != ((divisor >> 8) & 0xff))
|
|
193
|
+ if (uart_readb(UART_BASE + UART_DLM) != ((divisor >> 8) & 0xff)) {
|
|
194
|
+ DBG ( "Serial port %#x UART_DLM failed\n", UART_BASE );
|
184
|
195
|
goto out;
|
|
196
|
+ }
|
185
|
197
|
uart_writeb(lcs, UART_BASE + UART_LCR);
|
186
|
198
|
|
187
|
199
|
/* disable interrupts */
|