1 #include <part/fallback_boot.h>
6 #define TTYS0_BASE 0x3f8
11 #define TTYS0_BAUD 115200
14 #if ((115200%TTYS0_BAUD) != 0)
15 #error Bad ttys0 baud rate
18 /* Baud Rate Divisor */
19 #define TTYS0_DIV (115200/TTYS0_BAUD)
20 #define TTYS0_DIV_LO (TTYS0_DIV&0xFF)
21 #define TTYS0_DIV_HI ((TTYS0_DIV >> 8)&0xFF)
23 /* Line Control Settings */
25 /* Set 8bit, 1 stop bit, no parity */
30 #define TTYS0_RBR (TTYS0_BASE+0x00)
33 #define TTYS0_TBR TTYS0_RBR
34 #define TTYS0_IER (TTYS0_BASE+0x01)
35 #define TTYS0_IIR (TTYS0_BASE+0x02)
36 #define TTYS0_FCR TTYS0_IIR
37 #define TTYS0_LCR (TTYS0_BASE+0x03)
38 #define TTYS0_MCR (TTYS0_BASE+0x04)
39 #define TTYS0_DLL TTYS0_RBR
40 #define TTYS0_DLM TTYS0_IER
43 #define TTYS0_LSR (TTYS0_BASE+0x05)
44 #define TTYS0_MSR (TTYS0_BASE+0x06)
45 #define TTYS0_SCR (TTYS0_BASE+0x07)
47 #if USE_OPTION_TABLE == 1
52 .byte 1,2,3,6,12,24,48,96
62 9: mov $TTYS0_LSR, %dx ; \
66 mov $TTYS0_TBR, %dx ; \
71 /* Set 115.2Kbps,8n1 */
72 /* Set 8bit, 1 stop bit, no parity, DLAB */
74 mov $(TTYS0_LCS | 0x80), %al
77 /* set Baud Rate Divisor to 1 ==> 115200 Buad */
78 #if USE_OPTION_TABLE == 1
80 movb $(RTC_BOOT_BYTE+1), %al
94 mov $TTYS0_DIV_LO, %al
97 mov $TTYS0_DIV_HI, %al
102 mov $(TTYS0_LCS & 0x7f), %al