1 /* serial.h - serial device interface */
3 * GRUB -- GRand Unified Bootloader
4 * Copyright (C) 2000,2001,2002,2005,2007 Free Software Foundation, Inc.
6 * GRUB is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
11 * GRUB is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
20 #ifndef GRUB_NS8250_HEADER
21 #define GRUB_NS8250_HEADER 1
25 /* The offsets of UART registers. */
40 #define UART_DATA_READY 0x01
41 #define UART_EMPTY_TRANSMITTER 0x20
43 /* The type of parity. */
44 #define UART_NO_PARITY 0x00
45 #define UART_ODD_PARITY 0x08
46 #define UART_EVEN_PARITY 0x18
48 /* The type of word length. */
49 #define UART_5BITS_WORD 0x00
50 #define UART_6BITS_WORD 0x01
51 #define UART_7BITS_WORD 0x02
52 #define UART_8BITS_WORD 0x03
54 /* The type of the length of stop bit. */
55 #define UART_1_STOP_BIT 0x00
56 #define UART_2_STOP_BITS 0x04
58 /* the switch of DLAB. */
59 #define UART_DLAB 0x80
61 /* Enable the FIFO. */
62 #define UART_ENABLE_FIFO_TRIGGER14 0xC7
64 /* Enable the FIFO. */
65 #define UART_ENABLE_FIFO_TRIGGER1 0x07
67 /* Turn on DTR, RTS, and OUT2. */
68 #define UART_ENABLE_DTRRTS 0x03
70 /* Turn on DTR, RTS, and OUT2. */
71 #define UART_ENABLE_OUT2 0x08
74 #include <grub/cpu/io.h>
77 grub_ns8250_hw_get_port (const unsigned int unit
);
80 #endif /* ! GRUB_SERIAL_MACHINE_HEADER */