aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/slc90e66.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/pci/slc90e66.c')
-rw-r--r--drivers/ide/pci/slc90e66.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/ide/pci/slc90e66.c b/drivers/ide/pci/slc90e66.c
index 5112c726633b..0968f6bc669a 100644
--- a/drivers/ide/pci/slc90e66.c
+++ b/drivers/ide/pci/slc90e66.c
@@ -72,7 +72,8 @@ static void slc90e66_tune_drive (ide_drive_t *drive, u8 pio)
72 u16 master_data; 72 u16 master_data;
73 u8 slave_data; 73 u8 slave_data;
74 /* ISP RTC */ 74 /* ISP RTC */
75 u8 timings[][2] = { { 0, 0 }, 75 static const u8 timings[][2]= {
76 { 0, 0 },
76 { 0, 0 }, 77 { 0, 0 },
77 { 1, 0 }, 78 { 1, 0 },
78 { 2, 1 }, 79 { 2, 1 },
@@ -119,7 +120,6 @@ static int slc90e66_tune_chipset (ide_drive_t *drive, u8 xferspeed)
119 pci_read_config_word(dev, 0x4a, &reg4a); 120 pci_read_config_word(dev, 0x4a, &reg4a);
120 121
121 switch(speed) { 122 switch(speed) {
122#ifdef CONFIG_BLK_DEV_IDEDMA
123 case XFER_UDMA_4: u_speed = 4 << (drive->dn * 4); break; 123 case XFER_UDMA_4: u_speed = 4 << (drive->dn * 4); break;
124 case XFER_UDMA_3: u_speed = 3 << (drive->dn * 4); break; 124 case XFER_UDMA_3: u_speed = 3 << (drive->dn * 4); break;
125 case XFER_UDMA_2: u_speed = 2 << (drive->dn * 4); break; 125 case XFER_UDMA_2: u_speed = 2 << (drive->dn * 4); break;
@@ -128,7 +128,6 @@ static int slc90e66_tune_chipset (ide_drive_t *drive, u8 xferspeed)
128 case XFER_MW_DMA_2: 128 case XFER_MW_DMA_2:
129 case XFER_MW_DMA_1: 129 case XFER_MW_DMA_1:
130 case XFER_SW_DMA_2: break; 130 case XFER_SW_DMA_2: break;
131#endif /* CONFIG_BLK_DEV_IDEDMA */
132 case XFER_PIO_4: 131 case XFER_PIO_4:
133 case XFER_PIO_3: 132 case XFER_PIO_3:
134 case XFER_PIO_2: 133 case XFER_PIO_2:
@@ -156,7 +155,6 @@ static int slc90e66_tune_chipset (ide_drive_t *drive, u8 xferspeed)
156 return (ide_config_drive_speed(drive, speed)); 155 return (ide_config_drive_speed(drive, speed));
157} 156}
158 157
159#ifdef CONFIG_BLK_DEV_IDEDMA
160static int slc90e66_config_drive_for_dma (ide_drive_t *drive) 158static int slc90e66_config_drive_for_dma (ide_drive_t *drive)
161{ 159{
162 u8 speed = ide_dma_speed(drive, slc90e66_ratemask(drive)); 160 u8 speed = ide_dma_speed(drive, slc90e66_ratemask(drive));
@@ -194,7 +192,6 @@ fast_ata_pio:
194 /* IORDY not supported */ 192 /* IORDY not supported */
195 return 0; 193 return 0;
196} 194}
197#endif /* CONFIG_BLK_DEV_IDEDMA */
198 195
199static void __devinit init_hwif_slc90e66 (ide_hwif_t *hwif) 196static void __devinit init_hwif_slc90e66 (ide_hwif_t *hwif)
200{ 197{
@@ -222,7 +219,6 @@ static void __devinit init_hwif_slc90e66 (ide_hwif_t *hwif)
222 hwif->mwdma_mask = 0x07; 219 hwif->mwdma_mask = 0x07;
223 hwif->swdma_mask = 0x07; 220 hwif->swdma_mask = 0x07;
224 221
225#ifdef CONFIG_BLK_DEV_IDEDMA
226 if (!(hwif->udma_four)) 222 if (!(hwif->udma_four))
227 /* bit[0(1)]: 0:80, 1:40 */ 223 /* bit[0(1)]: 0:80, 1:40 */
228 hwif->udma_four = (reg47 & mask) ? 0 : 1; 224 hwif->udma_four = (reg47 & mask) ? 0 : 1;
@@ -232,7 +228,6 @@ static void __devinit init_hwif_slc90e66 (ide_hwif_t *hwif)
232 hwif->autodma = 1; 228 hwif->autodma = 1;
233 hwif->drives[0].autodma = hwif->autodma; 229 hwif->drives[0].autodma = hwif->autodma;
234 hwif->drives[1].autodma = hwif->autodma; 230 hwif->drives[1].autodma = hwif->autodma;
235#endif /* !CONFIG_BLK_DEV_IDEDMA */
236} 231}
237 232
238static ide_pci_device_t slc90e66_chipset __devinitdata = { 233static ide_pci_device_t slc90e66_chipset __devinitdata = {
@@ -250,7 +245,7 @@ static int __devinit slc90e66_init_one(struct pci_dev *dev, const struct pci_dev
250} 245}
251 246
252static struct pci_device_id slc90e66_pci_tbl[] = { 247static struct pci_device_id slc90e66_pci_tbl[] = {
253 { PCI_VENDOR_ID_EFAR, PCI_DEVICE_ID_EFAR_SLC90E66_1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, 248 { PCI_DEVICE(PCI_VENDOR_ID_EFAR, PCI_DEVICE_ID_EFAR_SLC90E66_1), 0},
254 { 0, }, 249 { 0, },
255}; 250};
256MODULE_DEVICE_TABLE(pci, slc90e66_pci_tbl); 251MODULE_DEVICE_TABLE(pci, slc90e66_pci_tbl);