1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Definitions for PCDP-defined console devices
5 * For DIG64_HCDPv10a_01.pdf and DIG64_PCDPv20.pdf (v1.0a and v2.0 resp.),
6 * please see <http://www.dig64.org/specifications/>
8 * (c) Copyright 2002, 2004 Hewlett-Packard Development Company, L.P.
9 * Khalid Aziz <khalid.aziz@hp.com>
10 * Bjorn Helgaas <bjorn.helgaas@hp.com>
13 #define PCDP_CONSOLE 0
15 #define PCDP_CONSOLE_OUTPUT 2
16 #define PCDP_CONSOLE_INPUT 3
18 #define PCDP_UART (0 << 3)
19 #define PCDP_VGA (1 << 3)
20 #define PCDP_USB (2 << 3)
22 /* pcdp_uart.type and pcdp_device.type */
23 #define PCDP_CONSOLE_UART (PCDP_UART | PCDP_CONSOLE)
24 #define PCDP_DEBUG_UART (PCDP_UART | PCDP_DEBUG)
25 #define PCDP_CONSOLE_VGA (PCDP_VGA | PCDP_CONSOLE_OUTPUT)
26 #define PCDP_CONSOLE_USB (PCDP_USB | PCDP_CONSOLE_INPUT)
29 #define PCDP_UART_EDGE_SENSITIVE (1 << 0)
30 #define PCDP_UART_ACTIVE_LOW (1 << 1)
31 #define PCDP_UART_PRIMARY_CONSOLE (1 << 2)
32 #define PCDP_UART_IRQ (1 << 6) /* in pci_func for rev < 3 */
33 #define PCDP_UART_PCI (1 << 7) /* in pci_func for rev < 3 */
45 struct acpi_generic_address addr
;
54 } __attribute__((packed
));
58 /* pcdp_if_pci.trans */
59 #define PCDP_PCI_TRANS_IOPORT 0x02
60 #define PCDP_PCI_TRANS_MMIO 0x01
77 } __attribute__((packed
));
80 u8 count
; /* address space descriptors */
81 } __attribute__((packed
));
83 /* pcdp_device.flags */
84 #define PCDP_PRIMARY_CONSOLE 1
91 /* next data is pcdp_if_pci or pcdp_if_acpi (not yet supported) */
92 /* next data is device specific type (currently only pcdp_vga) */
93 } __attribute__((packed
));
98 u8 rev
; /* PCDP v2.0 is rev 3 */
106 struct pcdp_uart uart
[0]; /* actual size is num_uarts */
107 /* remainder of table is pcdp_device structures */
108 } __attribute__((packed
));