19 #include <linux/types.h>
26 #include <linux/module.h>
36 #define BUDDHA_NUM_HWIFS 2
37 #define CATWEASEL_NUM_HWIFS 3
38 #define XSURF_NUM_HWIFS 2
40 #define MAX_NUM_HWIFS 3
46 #define BUDDHA_BASE1 0x800
47 #define BUDDHA_BASE2 0xa00
48 #define BUDDHA_BASE3 0xc00
50 #define XSURF_BASE1 0xb000
51 #define XSURF_BASE2 0xd000
65 #define BUDDHA_CONTROL 0x11a
71 #define BUDDHA_IRQ1 0xf00
72 #define BUDDHA_IRQ2 0xf40
73 #define BUDDHA_IRQ3 0xf80
75 #define XSURF_IRQ1 0x7e
76 #define XSURF_IRQ2 0x7e
86 #define BUDDHA_IRQ_MR 0xfc0
97 static const char *buddha_board_name[] = {
"Buddha",
"Catweasel",
"X-Surf" };
121 static void __init buddha_setup_ports(
struct ide_hw *
hw,
unsigned long base,
122 unsigned long ctl,
unsigned long irq_port)
126 memset(hw, 0,
sizeof(*hw));
130 for (i = 1; i < 8; i++)
140 .test_irq = buddha_test_irq,
144 .clear_irq = xsurf_clear_irq,
145 .test_irq = buddha_test_irq,
149 .port_ops = &buddha_port_ops,
159 static int __init buddha_init(
void)
161 struct zorro_dev *z =
NULL;
164 int buddha_num_hwifs,
i;
184 board = z->resource.start;
209 buddha_board_name[type]);
211 for (i = 0; i < buddha_num_hwifs; i++) {
212 unsigned long base,
ctl, irq_port;
215 base = buddha_board + buddha_bases[
i];
217 irq_port = buddha_board + buddha_irqports[
i];
219 base = buddha_board + xsurf_bases[
i];
222 irq_port = buddha_board + xsurf_irqports[
i];
225 buddha_setup_ports(&hw[i], base, ctl, irq_port);