]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/ide/pci/cs5535.c
ide: add ide_pio_cycle_time() helper (take 2)
[linux-2.6-omap-h63xx.git] / drivers / ide / pci / cs5535.c
index 41925c47ef05968d484107b34b7c22b1e53373c4..5039793721446b3190ec8230082fe11fd70e9ea3 100644 (file)
@@ -187,7 +187,8 @@ static u8 __devinit cs5535_cable_detect(struct pci_dev *dev)
 
        /* if a 80 wire cable was detected */
        pci_read_config_byte(dev, CS5535_CABLE_DETECT, &bit);
-       return (bit & 1);
+
+       return (bit & 1) ? ATA_CBL_PATA80 : ATA_CBL_PATA40;
 }
 
 /****
@@ -212,8 +213,7 @@ static void __devinit init_hwif_cs5535(ide_hwif_t *hwif)
        hwif->ultra_mask = 0x1F;
        hwif->mwdma_mask = 0x07;
 
-
-       hwif->udma_four = cs5535_cable_detect(hwif->pci_dev);
+       hwif->cbl = cs5535_cable_detect(hwif->pci_dev);
 
        if (!noautodma)
                hwif->autodma = 1;
@@ -228,9 +228,9 @@ static void __devinit init_hwif_cs5535(ide_hwif_t *hwif)
 static ide_pci_device_t cs5535_chipset __devinitdata = {
        .name           = "CS5535",
        .init_hwif      = init_hwif_cs5535,
-       .channels       = 1,
        .autodma        = AUTODMA,
        .bootable       = ON_BOARD,
+       .host_flags     = IDE_HFLAG_SINGLE,
 };
 
 static int __devinit cs5535_init_one(struct pci_dev *dev,