1#ifndef _PARISC_HARDWARE_H
2#define _PARISC_HARDWARE_H
3
4#include <linux/mod_devicetable.h>
5
6#define HWTYPE_ANY_ID PA_HWTYPE_ANY_ID
7#define HVERSION_ANY_ID PA_HVERSION_ANY_ID
8#define HVERSION_REV_ANY_ID PA_HVERSION_REV_ANY_ID
9#define SVERSION_ANY_ID PA_SVERSION_ANY_ID
10
11struct hp_hardware {
12 unsigned short hw_type:5;
13 unsigned short hversion;
14 unsigned long sversion:28;
15 unsigned short opt;
16 const char name[80];
17};
18
19struct parisc_device;
20
21enum cpu_type {
22 pcx = 0,
23 pcxs = 1,
24 pcxt = 2,
25 pcxt_ = 3,
26 pcxl = 4,
27 pcxl2 = 5,
28 pcxu = 6,
29 pcxu_ = 7,
30 pcxw = 8,
31 pcxw_ = 9,
32 pcxw2 = 10,
33 mako = 11,
34 mako2 = 12
35};
36
37extern const char * const cpu_name_version[][2];
38
39struct parisc_driver;
40
41struct io_module {
42 volatile uint32_t nothing;
43 volatile uint32_t io_eim;
44 volatile uint32_t io_dc_adata;
45 volatile uint32_t io_ii_cdata;
46 volatile uint32_t io_dma_link;
47 volatile uint32_t io_dma_command;
48 volatile uint32_t io_dma_address;
49 volatile uint32_t io_dma_count;
50 volatile uint32_t io_flex;
51 volatile uint32_t io_spa_address;
52 volatile uint32_t reserved1[2];
53 volatile uint32_t io_command;
54 volatile uint32_t io_status;
55 volatile uint32_t io_control;
56 volatile uint32_t io_data;
57 volatile uint32_t reserved2;
58 volatile uint32_t chain_addr;
59 volatile uint32_t sub_mask_clr;
60 volatile uint32_t reserved3[13];
61 volatile uint32_t undefined[480];
62 volatile uint32_t unpriv[512];
63};
64
65struct bc_module {
66 volatile uint32_t unused1[12];
67 volatile uint32_t io_command;
68 volatile uint32_t io_status;
69 volatile uint32_t io_control;
70 volatile uint32_t unused2[1];
71 volatile uint32_t io_err_resp;
72 volatile uint32_t io_err_info;
73 volatile uint32_t io_err_req;
74 volatile uint32_t unused3[11];
75 volatile uint32_t io_io_low;
76 volatile uint32_t io_io_high;
77};
78
79#define HPHW_NPROC 0
80#define HPHW_MEMORY 1
81#define HPHW_B_DMA 2
82#define HPHW_OBSOLETE 3
83#define HPHW_A_DMA 4
84#define HPHW_A_DIRECT 5
85#define HPHW_OTHER 6
86#define HPHW_BCPORT 7
87#define HPHW_CIO 8
88#define HPHW_CONSOLE 9
89#define HPHW_FIO 10
90#define HPHW_BA 11
91#define HPHW_IOA 12
92#define HPHW_BRIDGE 13
93#define HPHW_FABRIC 14
94#define HPHW_MC 15
95#define HPHW_FAULTY 31
96
97struct parisc_device_id;
98
99
100extern const char *parisc_hardware_description(struct parisc_device_id *id);
101extern enum cpu_type parisc_get_cpu_type(unsigned long hversion);
102
103struct pci_dev;
104struct hardware_path;
105
106
107extern struct parisc_device *alloc_pa_dev(unsigned long hpa,
108 struct hardware_path *path);
109extern int register_parisc_device(struct parisc_device *dev);
110extern int register_parisc_driver(struct parisc_driver *driver);
111extern int count_parisc_driver(struct parisc_driver *driver);
112extern int unregister_parisc_driver(struct parisc_driver *driver);
113extern void walk_central_bus(void);
114extern const struct parisc_device *find_pa_parent_type(const struct parisc_device *, int);
115extern void print_parisc_devices(void);
116extern char *print_pa_hwpath(struct parisc_device *dev, char *path);
117extern char *print_pci_hwpath(struct pci_dev *dev, char *path);
118extern void get_pci_node_path(struct pci_dev *dev, struct hardware_path *path);
119extern void init_parisc_bus(void);
120extern struct device *hwpath_to_device(struct hardware_path *modpath);
121extern void device_to_hwpath(struct device *dev, struct hardware_path *path);
122
123
124
125extern void do_memory_inventory(void);
126extern void do_device_inventory(void);
127
128#endif
129