Commit caaaf123 authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds

[PATCH] ARM ide driver updates

parent 8ac3a026
...@@ -99,12 +99,12 @@ if [ "$CONFIG_BLK_DEV_IDE" != "n" ]; then ...@@ -99,12 +99,12 @@ if [ "$CONFIG_BLK_DEV_IDE" != "n" ]; then
if [ "$CONFIG_SIBYTE_SWARM" = "y" ]; then if [ "$CONFIG_SIBYTE_SWARM" = "y" ]; then
bool ' SWARM onboard IDE support' CONFIG_BLK_DEV_IDE_SWARM bool ' SWARM onboard IDE support' CONFIG_BLK_DEV_IDE_SWARM
fi fi
if [ "$CONFIG_ARCH_ACORN" = "y" ]; then if [ "$CONFIG_ARM" = "y" ]; then
dep_bool ' ICS IDE interface support' CONFIG_BLK_DEV_IDE_ICSIDE $CONFIG_ARCH_ACORN dep_tristate ' ICS IDE interface support' CONFIG_BLK_DEV_IDE_ICSIDE $CONFIG_ARCH_ACORN
dep_bool ' ICS DMA support' CONFIG_BLK_DEV_IDEDMA_ICS $CONFIG_BLK_DEV_IDE_ICSIDE dep_mbool ' ICS DMA support' CONFIG_BLK_DEV_IDEDMA_ICS $CONFIG_BLK_DEV_IDE_ICSIDE
dep_bool ' Use ICS DMA by default' CONFIG_IDEDMA_ICS_AUTO $CONFIG_BLK_DEV_IDEDMA_ICS dep_mbool ' Use ICS DMA by default' CONFIG_IDEDMA_ICS_AUTO $CONFIG_BLK_DEV_IDEDMA_ICS
define_bool CONFIG_BLK_DEV_IDEDMA $CONFIG_BLK_DEV_IDEDMA_ICS define_bool CONFIG_BLK_DEV_IDEDMA $CONFIG_BLK_DEV_IDEDMA_ICS
dep_bool ' RapIDE interface support' CONFIG_BLK_DEV_IDE_RAPIDE $CONFIG_ARCH_ACORN dep_tristate ' RapIDE interface support' CONFIG_BLK_DEV_IDE_RAPIDE $CONFIG_ARCH_ACORN
fi fi
if [ "$CONFIG_AMIGA" = "y" ]; then if [ "$CONFIG_AMIGA" = "y" ]; then
dep_bool ' Amiga Gayle IDE interface support' CONFIG_BLK_DEV_GAYLE $CONFIG_AMIGA dep_bool ' Amiga Gayle IDE interface support' CONFIG_BLK_DEV_GAYLE $CONFIG_AMIGA
......
This diff is collapsed.
/* /*
* linux/drivers/ide/rapide.c * linux/drivers/ide/rapide.c
* *
* Copyright (c) 1996-1998 Russell King. * Copyright (c) 1996-2002 Russell King.
*
* Changelog:
* 08-06-1996 RMK Created
* 13-04-1998 RMK Added manufacturer and product IDs
*/ */
#include <linux/module.h> #include <linux/module.h>
...@@ -17,20 +13,14 @@ ...@@ -17,20 +13,14 @@
#include <asm/ecard.h> #include <asm/ecard.h>
static card_ids __init rapide_cids[] = { static int __devinit
{ MANU_YELLOWSTONE, PROD_YELLOWSTONE_RAPIDE32 }, rapide_probe(struct expansion_card *ec, const struct ecard_id *id)
{ 0xffff, 0xffff }
};
static struct expansion_card *ec[MAX_ECARDS];
static int result[MAX_ECARDS];
static inline int rapide_register(struct expansion_card *ec)
{ {
unsigned long port = ecard_address (ec, ECARD_MEMC, 0); unsigned long port = ecard_address (ec, ECARD_MEMC, 0);
hw_regs_t hw; hw_regs_t hw;
int i, ret;
int i; ecard_claim(ec);
memset(&hw, 0, sizeof(hw)); memset(&hw, 0, sizeof(hw));
...@@ -41,54 +31,53 @@ static inline int rapide_register(struct expansion_card *ec) ...@@ -41,54 +31,53 @@ static inline int rapide_register(struct expansion_card *ec)
hw.io_ports[IDE_CONTROL_OFFSET] = port + 0x206; hw.io_ports[IDE_CONTROL_OFFSET] = port + 0x206;
hw.irq = ec->irq; hw.irq = ec->irq;
return ide_register_hw(&hw, NULL); ret = ide_register_hw(&hw, NULL);
}
int __init rapide_init(void)
{
int i;
for (i = 0; i < MAX_ECARDS; i++) if (ret)
ec[i] = NULL; ecard_release(ec);
/*
* this locks the driver in-core - remove this
* comment and the two lines below when we can
* safely remove interfaces.
*/
else
MOD_INC_USE_COUNT;
ecard_startfind(); return ret;
}
for (i = 0; ; i++) {
if ((ec[i] = ecard_find(0, rapide_cids)) == NULL)
break;
ecard_claim(ec[i]); static void __devexit rapide_remove(struct expansion_card *ec)
result[i] = rapide_register(ec[i]); {
} /* need to do more */
for (i = 0; i < MAX_ECARDS; i++) ecard_release(ec);
if (ec[i] && result[i] < 0) {
ecard_release(ec[i]);
ec[i] = NULL;
}
return 0;
} }
#ifdef MODULE static struct ecard_id rapide_ids[] = {
MODULE_LICENSE("GPL"); { MANU_YELLOWSTONE, PROD_YELLOWSTONE_RAPIDE32 },
{ 0xffff, 0xffff }
};
int init_module (void) static struct ecard_driver rapide_driver = {
.probe = rapide_probe,
.remove = __devexit_p(rapide_remove),
.id_table = rapide_ids,
.drv = {
.name = "rapide",
},
};
static int __init rapide_init(void)
{ {
return rapide_init(); return ecard_register_driver(&rapide_driver);
} }
void cleanup_module (void) static void __exit rapide_exit(void)
{ {
int i; ecard_remove_driver(&rapide_driver);
for (i = 0; i < MAX_ECARDS; i++)
if (ec[i]) {
unsigned long port;
port = ecard_address(ec[i], ECARD_MEMC, 0);
ide_unregister_port(port, ec[i]->irq, 16);
ecard_release(ec[i]);
ec[i] = NULL;
}
} }
#endif
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("Yellowstone RAPIDE driver");
module_init(rapide_init);
module_exit(rapide_exit);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment