hardware.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. #ifndef _PARISC_HARDWARE_H
  2. #define _PARISC_HARDWARE_H
  3. #include <linux/mod_devicetable.h>
  4. #include <asm/pdc.h>
  5. struct hp_hardware {
  6. unsigned short hw_type:5; /* HPHW_xxx */
  7. unsigned short hversion;
  8. unsigned long sversion:28;
  9. unsigned short opt;
  10. const char name[80]; /* The hardware description */
  11. };
  12. struct parisc_device;
  13. enum cpu_type {
  14. pcx = 0, /* pa7000 pa 1.0 */
  15. pcxs = 1, /* pa7000 pa 1.1a */
  16. pcxt = 2, /* pa7100 pa 1.1b */
  17. pcxt_ = 3, /* pa7200 (t') pa 1.1c */
  18. pcxl = 4, /* pa7100lc pa 1.1d */
  19. pcxl2 = 5, /* pa7300lc pa 1.1e */
  20. pcxu = 6, /* pa8000 pa 2.0 */
  21. pcxu_ = 7, /* pa8200 (u+) pa 2.0 */
  22. pcxw = 8, /* pa8500 pa 2.0 */
  23. pcxw_ = 9, /* pa8600 (w+) pa 2.0 */
  24. pcxw2 = 10, /* pa8700 pa 2.0 */
  25. mako = 11 /* pa8800 pa 2.0 */
  26. };
  27. extern char *cpu_name_version[][2]; /* mapping from enum cpu_type to strings */
  28. struct parisc_driver;
  29. struct io_module {
  30. volatile uint32_t nothing; /* reg 0 */
  31. volatile uint32_t io_eim;
  32. volatile uint32_t io_dc_adata;
  33. volatile uint32_t io_ii_cdata;
  34. volatile uint32_t io_dma_link; /* reg 4 */
  35. volatile uint32_t io_dma_command;
  36. volatile uint32_t io_dma_address;
  37. volatile uint32_t io_dma_count;
  38. volatile uint32_t io_flex; /* reg 8 */
  39. volatile uint32_t io_spa_address;
  40. volatile uint32_t reserved1[2];
  41. volatile uint32_t io_command; /* reg 12 */
  42. volatile uint32_t io_status;
  43. volatile uint32_t io_control;
  44. volatile uint32_t io_data;
  45. volatile uint32_t reserved2; /* reg 16 */
  46. volatile uint32_t chain_addr;
  47. volatile uint32_t sub_mask_clr;
  48. volatile uint32_t reserved3[13];
  49. volatile uint32_t undefined[480];
  50. volatile uint32_t unpriv[512];
  51. };
  52. struct bc_module {
  53. volatile uint32_t unused1[12];
  54. volatile uint32_t io_command;
  55. volatile uint32_t io_status;
  56. volatile uint32_t io_control;
  57. volatile uint32_t unused2[1];
  58. volatile uint32_t io_err_resp;
  59. volatile uint32_t io_err_info;
  60. volatile uint32_t io_err_req;
  61. volatile uint32_t unused3[11];
  62. volatile uint32_t io_io_low;
  63. volatile uint32_t io_io_high;
  64. };
  65. #define HPHW_NPROC 0
  66. #define HPHW_MEMORY 1
  67. #define HPHW_B_DMA 2
  68. #define HPHW_OBSOLETE 3
  69. #define HPHW_A_DMA 4
  70. #define HPHW_A_DIRECT 5
  71. #define HPHW_OTHER 6
  72. #define HPHW_BCPORT 7
  73. #define HPHW_CIO 8
  74. #define HPHW_CONSOLE 9
  75. #define HPHW_FIO 10
  76. #define HPHW_BA 11
  77. #define HPHW_IOA 12
  78. #define HPHW_BRIDGE 13
  79. #define HPHW_FABRIC 14
  80. #define HPHW_MC 15
  81. #define HPHW_FAULTY 31
  82. /* hardware.c: */
  83. extern const char *parisc_hardware_description(struct parisc_device_id *id);
  84. extern enum cpu_type parisc_get_cpu_type(unsigned long hversion);
  85. struct pci_dev;
  86. /* drivers.c: */
  87. extern struct parisc_device *alloc_pa_dev(unsigned long hpa,
  88. struct hardware_path *path);
  89. extern int register_parisc_device(struct parisc_device *dev);
  90. extern int register_parisc_driver(struct parisc_driver *driver);
  91. extern int count_parisc_driver(struct parisc_driver *driver);
  92. extern int unregister_parisc_driver(struct parisc_driver *driver);
  93. extern void walk_central_bus(void);
  94. extern const struct parisc_device *find_pa_parent_type(const struct parisc_device *, int);
  95. extern void print_parisc_devices(void);
  96. extern char *print_pa_hwpath(struct parisc_device *dev, char *path);
  97. extern char *print_pci_hwpath(struct pci_dev *dev, char *path);
  98. extern void get_pci_node_path(struct pci_dev *dev, struct hardware_path *path);
  99. extern void init_parisc_bus(void);
  100. extern struct device *hwpath_to_device(struct hardware_path *modpath);
  101. extern void device_to_hwpath(struct device *dev, struct hardware_path *path);
  102. /* inventory.c: */
  103. extern void do_memory_inventory(void);
  104. extern void do_device_inventory(void);
  105. #endif /* _PARISC_HARDWARE_H */