hcdp_serial.h
上传用户:jlfgdled
上传日期:2013-04-10
资源大小:33168k
文件大小:2k
源码类别:

Linux/Unix编程

开发平台:

Unix_Linux

  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. /* ACPI table signatures */
  14. #define HCDP_SIG_LEN 4
  15. #define HCDP_SIGNATURE "HCDP"
  16. /* Space ID as defined in ACPI generic address structure */
  17. #define ACPI_MEM_SPACE 0
  18. #define ACPI_IO_SPACE 1
  19. #define ACPI_PCICONF_SPACE 2
  20. /* 
  21.  * Maximum number of HCDP devices we want to read in
  22.  */
  23. #define MAX_HCDP_DEVICES 6
  24. /*
  25.  * Default base baud rate if clock rate is 0 in HCDP table.
  26.  */
  27. #define DEFAULT_BAUD_BASE 115200
  28. /* 
  29.  * ACPI Generic Address Structure 
  30.  */
  31. typedef struct {
  32. u8  space_id;
  33. u8  bit_width;
  34. u8  bit_offset;
  35. u8  resv;
  36. u32 addrlo;
  37. u32 addrhi;
  38. } acpi_gen_addr;
  39. /* HCDP Device descriptor entry types */
  40. #define HCDP_DEV_CONSOLE 0
  41. #define HCDP_DEV_DEBUG 1
  42. /* HCDP Device descriptor type */
  43. typedef struct {
  44. u8 type;
  45. u8 bits;
  46. u8 parity;
  47. u8 stop_bits;
  48. u8 pci_seg;
  49. u8 pci_bus;
  50. u8 pci_dev;
  51. u8 pci_func;
  52. u64 baud;
  53. acpi_gen_addr base_addr;
  54. u16 pci_dev_id;
  55. u16 pci_vendor_id;
  56. u32 global_int;
  57. u32 clock_rate;
  58. u8 pci_prog_intfc;
  59. u8 resv;
  60. } hcdp_dev_t;
  61. /* HCDP Table format */
  62. typedef struct {
  63. u8 signature[4];
  64. u32 len;
  65. u8 rev;
  66. u8 chksum;
  67. u8 oemid[6];
  68. u8 oem_tabid[8];
  69. u32 oem_rev;
  70. u8 creator_id[4];
  71. u32 creator_rev;
  72. u32 num_entries;
  73. hcdp_dev_t hcdp_dev[MAX_HCDP_DEVICES];
  74. } hcdp_t;
  75. #endif /* _LINUX_HCDP_SERIAL_H */