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
if [ "$CONFIG_SIBYTE_SWARM" = "y" ]; then
bool ' SWARM onboard IDE support' CONFIG_BLK_DEV_IDE_SWARM
fi
if [ "$CONFIG_ARCH_ACORN" = "y" ]; then
dep_bool ' 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_bool ' Use ICS DMA by default' CONFIG_IDEDMA_ICS_AUTO $CONFIG_BLK_DEV_IDEDMA_ICS
if [ "$CONFIG_ARM" = "y" ]; then
dep_tristate ' ICS IDE interface support' CONFIG_BLK_DEV_IDE_ICSIDE $CONFIG_ARCH_ACORN
dep_mbool ' ICS DMA support' CONFIG_BLK_DEV_IDEDMA_ICS $CONFIG_BLK_DEV_IDE_ICSIDE
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
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
if [ "$CONFIG_AMIGA" = "y" ]; then
dep_bool ' Amiga Gayle IDE interface support' CONFIG_BLK_DEV_GAYLE $CONFIG_AMIGA
......
This diff is collapsed.
/*
* linux/drivers/ide/rapide.c
*
* Copyright (c) 1996-1998 Russell King.
*
* Changelog:
* 08-06-1996 RMK Created
* 13-04-1998 RMK Added manufacturer and product IDs
* Copyright (c) 1996-2002 Russell King.
*/
#include <linux/module.h>
......@@ -17,20 +13,14 @@
#include <asm/ecard.h>
static card_ids __init rapide_cids[] = {
{ MANU_YELLOWSTONE, PROD_YELLOWSTONE_RAPIDE32 },
{ 0xffff, 0xffff }
};
static struct expansion_card *ec[MAX_ECARDS];
static int result[MAX_ECARDS];
static inline int rapide_register(struct expansion_card *ec)
static int __devinit
rapide_probe(struct expansion_card *ec, const struct ecard_id *id)
{
unsigned long port = ecard_address (ec, ECARD_MEMC, 0);
hw_regs_t hw;
int i, ret;
int i;
ecard_claim(ec);
memset(&hw, 0, sizeof(hw));
......@@ -41,54 +31,53 @@ static inline int rapide_register(struct expansion_card *ec)
hw.io_ports[IDE_CONTROL_OFFSET] = port + 0x206;
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++)
ec[i] = NULL;
ecard_startfind();
if (ret)
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;
for (i = 0; ; i++) {
if ((ec[i] = ecard_find(0, rapide_cids)) == NULL)
break;
return ret;
}
ecard_claim(ec[i]);
result[i] = rapide_register(ec[i]);
}
for (i = 0; i < MAX_ECARDS; i++)
if (ec[i] && result[i] < 0) {
ecard_release(ec[i]);
ec[i] = NULL;
}
return 0;
static void __devexit rapide_remove(struct expansion_card *ec)
{
/* need to do more */
ecard_release(ec);
}
#ifdef MODULE
MODULE_LICENSE("GPL");
static struct ecard_id rapide_ids[] = {
{ 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;
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;
}
ecard_remove_driver(&rapide_driver);
}
#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