2 * linux/drivers/ide/rapide.c
4 * Copyright (c) 1996-1998 Russell King.
7 * 08-06-1996 RMK Created
8 * 13-04-1998 RMK Added manufacturer and product IDs
11 #include <linux/module.h>
12 #include <linux/malloc.h>
13 #include <linux/blkdev.h>
14 #include <linux/errno.h>
15 #include <linux/ide.h>
16 #include <linux/init.h>
18 #include <asm/ecard.h>
20 static const card_ids __init rapide_cids
[] = {
21 { MANU_YELLOWSTONE
, PROD_YELLOWSTONE_RAPIDE32
},
25 static struct expansion_card
*ec
[MAX_ECARDS
];
26 static int result
[MAX_ECARDS
];
28 static inline int rapide_register(struct expansion_card
*ec
)
30 unsigned long port
= ecard_address (ec
, ECARD_MEMC
, 0);
35 memset(&hw
, 0, sizeof(hw
));
37 for (i
= IDE_DATA_OFFSET
; i
<= IDE_STATUS_OFFSET
; i
++) {
38 hw
.io_ports
[i
] = (ide_ioreg_t
)port
;
41 hw
.io_ports
[IDE_CONTROL_OFFSET
] = port
+ 0x206;
44 return ide_register_hw(&hw
, NULL
);
47 int __init
rapide_init(void)
51 for (i
= 0; i
< MAX_ECARDS
; i
++)
57 if ((ec
[i
] = ecard_find(0, rapide_cids
)) == NULL
)
61 result
[i
] = rapide_register(ec
[i
]);
63 for (i
= 0; i
< MAX_ECARDS
; i
++)
64 if (ec
[i
] && result
[i
] < 0) {
73 int init_module (void)
78 void cleanup_module (void)
82 for (i
= 0; i
< MAX_ECARDS
; i
++)
85 port
= ecard_address(ec
[i
], ECARD_MEMC
, 0);
87 ide_unregister_port(port
, ec
[i
]->irq
, 16);