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