1
2
3
4
5
6
7
8
9#ifndef _LINUX_IOC3_H
10#define _LINUX_IOC3_H
11
12#include <asm/sn/ioc3.h>
13
14#define IOC3_MAX_SUBMODULES 32
15
16#define IOC3_CLASS_NONE 0
17#define IOC3_CLASS_BASE_IP27 1
18#define IOC3_CLASS_BASE_IP30 2
19#define IOC3_CLASS_MENET_123 3
20#define IOC3_CLASS_MENET_4 4
21#define IOC3_CLASS_CADDUO 5
22#define IOC3_CLASS_SERIAL 6
23
24
25struct ioc3_driver_data {
26 struct list_head list;
27 int id;
28
29 unsigned long pma;
30 struct ioc3 __iomem *vma;
31 struct pci_dev *pdev;
32
33 int dual_irq;
34 int irq_io, irq_eth;
35
36 spinlock_t gpio_lock;
37 unsigned int gpdr_shadow;
38
39 char nic_part[32];
40 char nic_serial[16];
41 char nic_mac[6];
42
43 int class;
44 void *data[IOC3_MAX_SUBMODULES];
45 int active[IOC3_MAX_SUBMODULES];
46
47
48
49
50
51
52 spinlock_t ir_lock;
53};
54
55
56struct ioc3_submodule {
57 char *name;
58 struct module *owner;
59 int ethernet;
60 int (*probe) (struct ioc3_submodule *, struct ioc3_driver_data *);
61 int (*remove) (struct ioc3_submodule *, struct ioc3_driver_data *);
62 int id;
63
64 unsigned int irq_mask;
65 int reset_mask;
66 int (*intr) (struct ioc3_submodule *, struct ioc3_driver_data *, unsigned int);
67
68 void *data;
69};
70
71
72
73
74
75#define IOC3_W_IES 0
76#define IOC3_W_IEC 1
77
78
79extern int ioc3_register_submodule(struct ioc3_submodule *);
80
81extern void ioc3_unregister_submodule(struct ioc3_submodule *);
82
83extern void ioc3_enable(struct ioc3_submodule *, struct ioc3_driver_data *, unsigned int);
84
85extern void ioc3_ack(struct ioc3_submodule *, struct ioc3_driver_data *, unsigned int);
86
87extern void ioc3_disable(struct ioc3_submodule *, struct ioc3_driver_data *, unsigned int);
88
89extern void ioc3_gpcr_set(struct ioc3_driver_data *, unsigned int);
90
91extern void ioc3_write_ireg(struct ioc3_driver_data *idd, uint32_t value, int reg);
92
93#endif
94