2 * linux/arch/arm/drivers/block/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>
17 #include <asm/ecard.h>
19 static const card_ids rapide_cids
[] = {
20 { MANU_YELLOWSTONE
, PROD_YELLOWSTONE_RAPIDE32
},
24 static struct expansion_card
*ec
[MAX_ECARDS
];
25 static int result
[MAX_ECARDS
];
27 static inline int rapide_register(struct expansion_card
*ec
)
29 unsigned long port
= ecard_address (ec
, ECARD_MEMC
, 0);
34 memset(&hw
, 0, sizeof(hw
));
36 for (i
= IDE_DATA_OFFSET
; i
<= IDE_STATUS_OFFSET
; i
++) {
37 hw
.io_ports
[i
] = (ide_ioreg_t
)port
;
40 hw
.io_ports
[IDE_CONTROL_OFFSET
] = port
+ 0x206;
43 return ide_register_hw(&hw
, NULL
);
50 for (i
= 0; i
< MAX_ECARDS
; i
++)
56 if ((ec
[i
] = ecard_find(0, rapide_cids
)) == NULL
)
60 result
[i
] = rapide_register(ec
[i
]);
62 for (i
= 0; i
< MAX_ECARDS
; i
++)
63 if (ec
[i
] && result
[i
] < 0) {
72 int init_module (void)
77 void cleanup_module (void)
81 for (i
= 0; i
< MAX_ECARDS
; i
++)
84 port
= ecard_address(ec
[i
], ECARD_MEMC
, 0);
86 ide_unregister_port(port
, ec
[i
]->irq
, 16);