ide: add ide_proc_register_port()
[deliverable/linux.git] / drivers / ide / legacy / ht6560b.c
index c48e87e512d38298bdc15f358a2751217e1b1615..c8f353b1296f9ca84c50bb8e1f127f2b2e3f3bd3 100644 (file)
@@ -36,8 +36,6 @@
 
 #define HT6560B_VERSION "v0.07"
 
-#undef REALLY_SLOW_IO          /* most systems can safely undef this */
-
 #include <linux/module.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
@@ -143,16 +141,16 @@ static void ht6560b_selectproc (ide_drive_t *drive)
                current_timing = timing;
                if (drive->media != ide_disk || !drive->present)
                        select |= HT_PREFETCH_MODE;
-               (void) HWIF(drive)->INB(HT_CONFIG_PORT);
-               (void) HWIF(drive)->INB(HT_CONFIG_PORT);
-               (void) HWIF(drive)->INB(HT_CONFIG_PORT);
-               (void) HWIF(drive)->INB(HT_CONFIG_PORT);
-               HWIF(drive)->OUTB(select, HT_CONFIG_PORT);
+               (void)inb(HT_CONFIG_PORT);
+               (void)inb(HT_CONFIG_PORT);
+               (void)inb(HT_CONFIG_PORT);
+               (void)inb(HT_CONFIG_PORT);
+               outb(select, HT_CONFIG_PORT);
                /*
                 * Set timing for this drive:
                 */
-               HWIF(drive)->OUTB(timing, IDE_SELECT_REG);
-               (void) HWIF(drive)->INB(IDE_STATUS_REG);
+               outb(timing, IDE_SELECT_REG);
+               (void)inb(IDE_STATUS_REG);
 #ifdef DEBUG
                printk("ht6560b: %s: select=%#x timing=%#x\n",
                        drive->name, select, timing);
@@ -303,12 +301,20 @@ static void tune_ht6560b (ide_drive_t *drive, u8 pio)
 #endif
 }
 
+int probe_ht6560b = 0;
+
+module_param_named(probe, probe_ht6560b, bool, 0);
+MODULE_PARM_DESC(probe, "probe for HT6560B chipset");
+
 /* Can be called directly from ide.c. */
 int __init ht6560b_init(void)
 {
        ide_hwif_t *hwif, *mate;
        int t;
 
+       if (probe_ht6560b == 0)
+               return -ENODEV;
+
        hwif = &ide_hwifs[0];
        mate = &ide_hwifs[1];
 
@@ -351,7 +357,8 @@ int __init ht6560b_init(void)
        probe_hwif_init(hwif);
        probe_hwif_init(mate);
 
-       create_proc_ide_interfaces();
+       ide_proc_register_port(hwif);
+       ide_proc_register_port(mate);
 
        return 0;
 
This page took 0.041668 seconds and 5 git commands to generate.