Lines Matching refs:UART_BASE
40 #undef UART_BASE
41 #define UART_BASE ( COMCONSOLE )
88 * Write character `ch' to port UART_BASE.
94 status = uart_readb(UART_BASE + UART_LSR);
97 uart_writeb(ch, UART_BASE + UART_TBR);
105 * Read a character from port UART_BASE.
112 status = uart_readb(UART_BASE + UART_LSR);
114 ch = uart_readb(UART_BASE + UART_RBR); /* fetch (first) character */
124 * Initialize port UART_BASE to speed COMSPEED, line settings 8N1.
135 lcs = uart_readb(UART_BASE + UART_LCR) & 0x7f;
136 uart_writeb(0x80 | lcs, UART_BASE + UART_LCR);
138 (uart_readb(UART_BASE + UART_DLM) << 8) | uart_readb(UART_BASE +
140 uart_writeb(lcs, UART_BASE + UART_LCR);
146 uart_writeb(0x80 | lcs, UART_BASE + UART_LCR);
147 uart_writeb(0xaa, UART_BASE + UART_DLL);
148 if (uart_readb(UART_BASE + UART_DLL) != 0xaa) {
151 uart_writeb(0x55, UART_BASE + UART_DLL);
152 if (uart_readb(UART_BASE + UART_DLL) != 0x55) {
155 uart_writeb(divisor & 0xff, UART_BASE + UART_DLL);
156 if (uart_readb(UART_BASE + UART_DLL) != (divisor & 0xff)) {
159 uart_writeb(0xaa, UART_BASE + UART_DLM);
160 if (uart_readb(UART_BASE + UART_DLM) != 0xaa) {
163 uart_writeb(0x55, UART_BASE + UART_DLM);
164 if (uart_readb(UART_BASE + UART_DLM) != 0x55) {
167 uart_writeb((divisor >> 8) & 0xff, UART_BASE + UART_DLM);
168 if (uart_readb(UART_BASE + UART_DLM) != ((divisor >> 8) & 0xff)) {
171 uart_writeb(lcs, UART_BASE + UART_LCR);
174 uart_writeb(0x0, UART_BASE + UART_IER);
177 uart_writeb(0x00, UART_BASE + UART_FCR);
180 uart_writeb((1 << 1), UART_BASE + UART_MCR);
187 (void)uart_readb(UART_BASE + UART_RBR);
189 status = uart_readb(UART_BASE + UART_LSR);