patch-2.2.18 linux/drivers/acorn/block/ide-rapide.c
Next file: linux/drivers/acorn/block/mfm.S
Previous file: linux/drivers/acorn/block/ide-ics.c
Back to the patch index
Back to the overall index
- Lines: 35
- Date:
Fri Sep 15 23:31:12 2000
- Orig file:
v2.2.17/drivers/acorn/block/ide-rapide.c
- Orig date:
Fri Apr 21 12:45:50 2000
diff -u --new-file --recursive --exclude-from /usr/src/exclude v2.2.17/drivers/acorn/block/ide-rapide.c linux/drivers/acorn/block/ide-rapide.c
@@ -13,7 +13,6 @@
#include <linux/blkdev.h>
#include <linux/errno.h>
#include <asm/ecard.h>
-#include <asm/ide.h>
#include "../../block/ide.h"
@@ -28,14 +27,20 @@
static inline int rapide_register(struct expansion_card *ec)
{
unsigned long port = ecard_address (ec, ECARD_MEMC, 0);
- ide_ioregspec_t spec;
+ hw_regs_t hw;
- spec.base = port;
- spec.ctrl = port + 0x206;
- spec.offset = 1 << 4;
- spec.irq = ec->irq;
+ int i;
- return ide_register_port(&spec);
+ memset(&hw, 0, sizeof(hw));
+
+ for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) {
+ hw.io_ports[i] = (ide_ioreg_t)port;
+ port += 1 << 4;
+ }
+ hw.io_ports[IDE_CONTROL_OFFSET] = port + 0x206;
+ hw.irq = ec->irq;
+
+ return ide_register_hw(&hw, NULL);
}
int rapide_init(void)
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)