2005-04-17 06:20:36 +08:00
|
|
|
/*
|
|
|
|
* generic/default IDE host driver
|
|
|
|
*
|
|
|
|
* Copyright (C) 2004 Bartlomiej Zolnierkiewicz
|
|
|
|
* This code was split off from ide.c. See it for original copyrights.
|
|
|
|
*
|
|
|
|
* May be copied or modified under the terms of the GNU General Public License.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <linux/kernel.h>
|
|
|
|
#include <linux/init.h>
|
|
|
|
#include <linux/module.h>
|
|
|
|
#include <linux/ide.h>
|
|
|
|
|
|
|
|
static int __init ide_generic_init(void)
|
|
|
|
{
|
2008-01-27 03:13:05 +08:00
|
|
|
u8 idx[MAX_HWIFS];
|
|
|
|
int i;
|
|
|
|
|
2005-04-17 06:20:36 +08:00
|
|
|
if (ide_hwifs[0].io_ports[IDE_DATA_OFFSET])
|
|
|
|
ide_get_lock(NULL, NULL); /* for atari only */
|
|
|
|
|
2008-01-27 03:13:05 +08:00
|
|
|
for (i = 0; i < MAX_HWIFS; i++)
|
|
|
|
idx[i] = ide_hwifs[i].present ? 0xff : i;
|
|
|
|
|
2008-02-03 02:56:31 +08:00
|
|
|
ide_device_add_all(idx, NULL);
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
if (ide_hwifs[0].io_ports[IDE_DATA_OFFSET])
|
|
|
|
ide_release_lock(); /* for atari only */
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
module_init(ide_generic_init);
|
|
|
|
|
|
|
|
MODULE_LICENSE("GPL");
|