#define __DEVTTY_DOT_H__
#define UART_NAME 0x0F
-#define UART_CAP_FIFO 0x80 /* UART has functioning FIFO */
-#define UART_CAP_AFE 0x40 /* UART support autoflow control */
-#define UART_8250 1
-#define UART_16450 2
-#define UART_16550 3
-#define UART_16550A 4
+#define UART_CAP_FIFO 0x80 /* UART has a functioning FIFO */
+#define UART_CAP_AFE 0x40 /* UART supports auto-flow control */
+#define UART_8250 1 /* original INS8250 or INS8250-B */
+#define UART_16450 2 /* INS8250A, 16450 and clones */
+#define UART_16550 3 /* original 16550 with broken FIFO */
+#define UART_16550A 4 /* 16550A and clones */
#define UART_CLOCK 1843200UL
void tty_putc(uint8_t minor, unsigned char c);
unsigned char uart0_detect();
-/* uart0_init - detect UART type, enable FIFO if present
+/* uart0_init - detect UART type, print it, enable FIFO if present
*/
void uart0_init() {
const char *uart_name;
kprintf(".\n");
}
+/* uart0_init - detect UART type and capabilities
+ */
unsigned char uart0_detect() {
unsigned char type, scratch;