aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-parisc/hardware.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/asm-parisc/hardware.h
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'include/asm-parisc/hardware.h')
-rw-r--r--include/asm-parisc/hardware.h132
1 files changed, 132 insertions, 0 deletions
diff --git a/include/asm-parisc/hardware.h b/include/asm-parisc/hardware.h
new file mode 100644
index 000000000000..106d3f7cd882
--- /dev/null
+++ b/include/asm-parisc/hardware.h
@@ -0,0 +1,132 @@
1#ifndef _PARISC_HARDWARE_H
2#define _PARISC_HARDWARE_H
3
4#include <asm/pdc.h>
5
6struct parisc_device_id {
7 unsigned char hw_type; /* 5 bits used */
8 unsigned char hversion_rev; /* 4 bits */
9 unsigned short hversion; /* 12 bits */
10 unsigned int sversion; /* 20 bits */
11};
12
13#define HWTYPE_ANY_ID 0xff
14#define HVERSION_REV_ANY_ID 0xff
15#define HVERSION_ANY_ID 0xffff
16#define SVERSION_ANY_ID 0xffffffffU
17
18struct hp_hardware {
19 unsigned short hw_type:5; /* HPHW_xxx */
20 unsigned short hversion;
21 unsigned long sversion:28;
22 unsigned short opt;
23 const char name[80]; /* The hardware description */
24};
25
26struct parisc_device;
27
28enum cpu_type {
29 pcx = 0, /* pa7000 pa 1.0 */
30 pcxs = 1, /* pa7000 pa 1.1a */
31 pcxt = 2, /* pa7100 pa 1.1b */
32 pcxt_ = 3, /* pa7200 (t') pa 1.1c */
33 pcxl = 4, /* pa7100lc pa 1.1d */
34 pcxl2 = 5, /* pa7300lc pa 1.1e */
35 pcxu = 6, /* pa8000 pa 2.0 */
36 pcxu_ = 7, /* pa8200 (u+) pa 2.0 */
37 pcxw = 8, /* pa8500 pa 2.0 */
38 pcxw_ = 9, /* pa8600 (w+) pa 2.0 */
39 pcxw2 = 10, /* pa8700 pa 2.0 */
40 mako = 11 /* pa8800 pa 2.0 */
41};
42
43extern char *cpu_name_version[][2]; /* mapping from enum cpu_type to strings */
44
45struct parisc_driver;
46
47struct io_module {
48 volatile uint32_t nothing; /* reg 0 */
49 volatile uint32_t io_eim;
50 volatile uint32_t io_dc_adata;
51 volatile uint32_t io_ii_cdata;
52 volatile uint32_t io_dma_link; /* reg 4 */
53 volatile uint32_t io_dma_command;
54 volatile uint32_t io_dma_address;
55 volatile uint32_t io_dma_count;
56 volatile uint32_t io_flex; /* reg 8 */
57 volatile uint32_t io_spa_address;
58 volatile uint32_t reserved1[2];
59 volatile uint32_t io_command; /* reg 12 */
60 volatile uint32_t io_status;
61 volatile uint32_t io_control;
62 volatile uint32_t io_data;
63 volatile uint32_t reserved2; /* reg 16 */
64 volatile uint32_t chain_addr;
65 volatile uint32_t sub_mask_clr;
66 volatile uint32_t reserved3[13];
67 volatile uint32_t undefined[480];
68 volatile uint32_t unpriv[512];
69};
70
71struct bc_module {
72 volatile uint32_t unused1[12];
73 volatile uint32_t io_command;
74 volatile uint32_t io_status;
75 volatile uint32_t io_control;
76 volatile uint32_t unused2[1];
77 volatile uint32_t io_err_resp;
78 volatile uint32_t io_err_info;
79 volatile uint32_t io_err_req;
80 volatile uint32_t unused3[11];
81 volatile uint32_t io_io_low;
82 volatile uint32_t io_io_high;
83};
84
85#define HPHW_NPROC 0
86#define HPHW_MEMORY 1
87#define HPHW_B_DMA 2
88#define HPHW_OBSOLETE 3
89#define HPHW_A_DMA 4
90#define HPHW_A_DIRECT 5
91#define HPHW_OTHER 6
92#define HPHW_BCPORT 7
93#define HPHW_CIO 8
94#define HPHW_CONSOLE 9
95#define HPHW_FIO 10
96#define HPHW_BA 11
97#define HPHW_IOA 12
98#define HPHW_BRIDGE 13
99#define HPHW_FABRIC 14
100#define HPHW_MC 15
101#define HPHW_FAULTY 31
102
103
104/* hardware.c: */
105extern const char *parisc_hardware_description(struct parisc_device_id *id);
106extern enum cpu_type parisc_get_cpu_type(unsigned long hversion);
107
108struct pci_dev;
109
110/* drivers.c: */
111extern struct parisc_device *alloc_pa_dev(unsigned long hpa,
112 struct hardware_path *path);
113extern int register_parisc_device(struct parisc_device *dev);
114extern int register_parisc_driver(struct parisc_driver *driver);
115extern int count_parisc_driver(struct parisc_driver *driver);
116extern int unregister_parisc_driver(struct parisc_driver *driver);
117extern void walk_central_bus(void);
118extern const struct parisc_device *find_pa_parent_type(const struct parisc_device *, int);
119extern void print_parisc_devices(void);
120extern char *print_pa_hwpath(struct parisc_device *dev, char *path);
121extern char *print_pci_hwpath(struct pci_dev *dev, char *path);
122extern void get_pci_node_path(struct pci_dev *dev, struct hardware_path *path);
123extern void init_parisc_bus(void);
124extern struct device *hwpath_to_device(struct hardware_path *modpath);
125extern void device_to_hwpath(struct device *dev, struct hardware_path *path);
126
127
128/* inventory.c: */
129extern void do_memory_inventory(void);
130extern void do_device_inventory(void);
131
132#endif /* _PARISC_HARDWARE_H */