more changes on original files
[linux-2.4.git] / include / linux / hcdp_serial.h
1 /*
2  *  linux/include/linux/hcdp_serial.h
3  *
4  *  Copyright (C) 2002  Hewlett-Packard Co.
5  *  Copyright (C) 2002  Khalid Aziz <khalid_aziz@hp.com>
6  *
7  *  Definitions for HCDP defined serial ports (Serial console and 
8  *  debug ports)
9  *
10  */
11 #ifndef _LINUX_HCDP_SERIAL_H
12 #define _LINUX_HCDP_SERIAL_H
13
14 /* ACPI table signatures */
15 #define HCDP_SIG_LEN            4
16 #define HCDP_SIGNATURE          "HCDP"
17
18 /* Space ID as defined in ACPI generic address structure */
19 #define ACPI_MEM_SPACE          0
20 #define ACPI_IO_SPACE           1
21 #define ACPI_PCICONF_SPACE      2
22
23 /* 
24  * Maximum number of HCDP devices we want to read in
25  */
26 #define MAX_HCDP_DEVICES        6
27
28 /*
29  * Default base baud rate if clock rate is 0 in HCDP table.
30  */
31 #define DEFAULT_BAUD_BASE       115200
32
33 /* 
34  * ACPI Generic Address Structure 
35  */
36 typedef struct {
37         u8  space_id;
38         u8  bit_width;
39         u8  bit_offset;
40         u8  resv;
41         u32 addrlo;
42         u32 addrhi;
43 } acpi_gen_addr;
44
45 /* HCDP Device descriptor entry types */
46 #define HCDP_DEV_CONSOLE        0
47 #define HCDP_DEV_DEBUG          1
48
49 /* HCDP Device descriptor type */
50 typedef struct {
51         u8      type;
52         u8      bits;
53         u8      parity;
54         u8      stop_bits;
55         u8      pci_seg;
56         u8      pci_bus;
57         u8      pci_dev;
58         u8      pci_func;
59         u64     baud;
60         acpi_gen_addr   base_addr;
61         u16     pci_dev_id;
62         u16     pci_vendor_id;
63         u32     global_int;
64         u32     clock_rate;
65         u8      pci_prog_intfc;
66         u8      resv;
67 } hcdp_dev_t;
68
69 /* HCDP Table format */
70 typedef struct {
71         u8      signature[4];
72         u32     len;
73         u8      rev;
74         u8      chksum;
75         u8      oemid[6];
76         u8      oem_tabid[8];
77         u32     oem_rev;
78         u8      creator_id[4];
79         u32     creator_rev;
80         u32     num_entries;
81         hcdp_dev_t      hcdp_dev[MAX_HCDP_DEVICES];
82 } hcdp_t;
83
84 #endif  /* _LINUX_HCDP_SERIAL_H */