Subversion Repositories shark

Rev

Rev 422 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
422 giacomo 1
/*
2
 *  linux/include/linux/acpi_serial.h
3
 *
4
 *  Copyright (C) 2000  Hewlett-Packard Co.
5
 *  Copyright (C) 2000  Khalid Aziz <khalid_aziz@hp.com>
6
 *
7
 *  Definitions for ACPI defined serial ports (headless console and
8
 *  debug ports)
9
 *
10
 */
11
 
12
#include <linux/serial.h>
13
 
14
extern void setup_serial_acpi(void *);
15
 
16
#define ACPI_SIG_LEN            4
17
 
18
/* ACPI table signatures */
19
#define ACPI_SPCRT_SIGNATURE    "SPCR"
20
#define ACPI_DBGPT_SIGNATURE    "DBGP"
21
 
22
/* Interface type as defined in ACPI serial port tables */
23
#define ACPI_SERIAL_INTFC_16550 0
24
#define ACPI_SERIAL_INTFC_16450 1
25
 
26
/* Interrupt types for ACPI serial port tables */
27
#define ACPI_SERIAL_INT_PCAT    0x01
28
#define ACPI_SERIAL_INT_APIC    0x02
29
#define ACPI_SERIAL_INT_SAPIC   0x04
30
 
31
/* Baud rates as defined in ACPI serial port tables */
32
#define ACPI_SERIAL_BAUD_9600           3
33
#define ACPI_SERIAL_BAUD_19200          4
34
#define ACPI_SERIAL_BAUD_57600          6
35
#define ACPI_SERIAL_BAUD_115200         7
36
 
37
/* Parity as defined in ACPI serial port tables */
38
#define ACPI_SERIAL_PARITY_NONE         0
39
 
40
/* Flow control methods as defined in ACPI serial port tables */
41
#define ACPI_SERIAL_FLOW_DCD    0x01
42
#define ACPI_SERIAL_FLOW_RTS    0x02
43
#define ACPI_SERIAL_FLOW_XON    0x04
44
 
45
/* Terminal types as defined in ACPI serial port tables */
46
#define ACPI_SERIAL_TERM_VT100          0
47
#define ACPI_SERIAL_TERM_VT100X 1
48
 
49
/* PCI Flags as defined by SPCR table */
50
#define ACPI_SERIAL_PCIFLAG_PNP 0x00000001
51
 
52
/* Space ID as defined in base address structure in ACPI serial port tables */
53
#define ACPI_SERIAL_MEM_SPACE           0
54
#define ACPI_SERIAL_IO_SPACE            1
55
#define ACPI_SERIAL_PCICONF_SPACE       2
56
 
57
/*
58
 * Generic Register Address Structure - as defined by Microsoft
59
 * in http://www.microsoft.com/hwdev/onnow/download/LFreeACPI.doc
60
 *
61
*/
62
typedef struct {
63
        u8  space_id;
64
        u8  bit_width;
65
        u8  bit_offset;
66
        u8  resv;
67
        u32 addrl;
68
        u32 addrh;
69
} gen_regaddr;
70
 
71
/* Space ID for generic register address structure */
72
#define REGADDR_SPACE_SYSMEM    0
73
#define REGADDR_SPACE_SYSIO     1
74
#define REGADDR_SPACE_PCICONFIG 2
75
 
76
/* Serial Port Console Redirection and Debug Port Table formats */
77
typedef struct {
78
        u8 signature[4];
79
        u32 length;
80
        u8  rev;
81
        u8  chksum;
82
        u8  oemid[6];
83
        u8  oem_tabid[8];
84
        u32 oem_rev;
85
        u8  creator_id[4];
86
        u32 creator_rev;
87
        u8  intfc_type;
88
        u8  resv1[3];
89
        gen_regaddr base_addr;
90
        u8  int_type;
91
        u8  irq;
92
        u8  global_int[4];
93
        u8  baud;
94
        u8  parity;
95
        u8  stop_bits;
96
        u8  flow_ctrl;
97
        u8  termtype;
98
        u8  language;
99
        u16 pci_dev_id;
100
        u16 pci_vendor_id;
101
        u8  pci_bus;
102
        u8  pci_dev;
103
        u8  pci_func;
104
        u8  pci_flags[4];
105
        u8  pci_seg;
106
        u32 resv2;
107
} acpi_ser_t;