File: acpi_serial.h

package info (click to toggle)
linux-kernel-headers 2.5.999-test7-bk-17
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 28,268 kB
  • ctags: 214,024
  • sloc: ansic: 324,929; cpp: 783; makefile: 79; asm: 61; sh: 61
file content (107 lines) | stat: -rw-r--r-- 2,515 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
/*
 *  linux/include/linux/acpi_serial.h
 *
 *  Copyright (C) 2000  Hewlett-Packard Co.
 *  Copyright (C) 2000  Khalid Aziz <khalid_aziz@hp.com>
 *
 *  Definitions for ACPI defined serial ports (headless console and 
 *  debug ports)
 *
 */

#include <linux/serial.h>

extern void setup_serial_acpi(void *);

#define ACPI_SIG_LEN		4

/* ACPI table signatures */
#define ACPI_SPCRT_SIGNATURE	"SPCR"
#define ACPI_DBGPT_SIGNATURE	"DBGP"

/* Interface type as defined in ACPI serial port tables */
#define ACPI_SERIAL_INTFC_16550	0
#define ACPI_SERIAL_INTFC_16450	1

/* Interrupt types for ACPI serial port tables */
#define ACPI_SERIAL_INT_PCAT	0x01
#define ACPI_SERIAL_INT_APIC	0x02
#define ACPI_SERIAL_INT_SAPIC	0x04

/* Baud rates as defined in ACPI serial port tables */
#define ACPI_SERIAL_BAUD_9600		3
#define ACPI_SERIAL_BAUD_19200		4
#define ACPI_SERIAL_BAUD_57600		6
#define ACPI_SERIAL_BAUD_115200		7

/* Parity as defined in ACPI serial port tables */
#define ACPI_SERIAL_PARITY_NONE		0

/* Flow control methods as defined in ACPI serial port tables */
#define ACPI_SERIAL_FLOW_DCD	0x01
#define ACPI_SERIAL_FLOW_RTS	0x02
#define ACPI_SERIAL_FLOW_XON	0x04

/* Terminal types as defined in ACPI serial port tables */
#define ACPI_SERIAL_TERM_VT100		0
#define ACPI_SERIAL_TERM_VT100X	1

/* PCI Flags as defined by SPCR table */
#define ACPI_SERIAL_PCIFLAG_PNP	0x00000001

/* Space ID as defined in base address structure in ACPI serial port tables */
#define ACPI_SERIAL_MEM_SPACE		0
#define ACPI_SERIAL_IO_SPACE		1
#define ACPI_SERIAL_PCICONF_SPACE	2

/* 
 * Generic Register Address Structure - as defined by Microsoft 
 * in http://www.microsoft.com/hwdev/onnow/download/LFreeACPI.doc
 *
*/
typedef struct {
	u8  space_id;
	u8  bit_width;
	u8  bit_offset;
	u8  resv;
	u32 addrl;
	u32 addrh;
} gen_regaddr;

/* Space ID for generic register address structure */
#define REGADDR_SPACE_SYSMEM	0
#define REGADDR_SPACE_SYSIO	1
#define REGADDR_SPACE_PCICONFIG	2

/* Serial Port Console Redirection and Debug Port Table formats */
typedef struct {
	u8 signature[4];
	u32 length;
	u8  rev;
	u8  chksum;
	u8  oemid[6];
	u8  oem_tabid[8];
	u32 oem_rev;
	u8  creator_id[4];
	u32 creator_rev;
	u8  intfc_type;
	u8  resv1[3];
	gen_regaddr base_addr;
	u8  int_type;
	u8  irq;
	u8  global_int[4];
	u8  baud;
	u8  parity;
	u8  stop_bits;
	u8  flow_ctrl;
	u8  termtype;
	u8  language;
	u16 pci_dev_id;
	u16 pci_vendor_id;
	u8  pci_bus;
	u8  pci_dev;
	u8  pci_func;
	u8  pci_flags[4];
	u8  pci_seg;
	u32 resv2;
} acpi_ser_t;