aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/cy82c693.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/pci/cy82c693.c')
-rw-r--r--drivers/ide/pci/cy82c693.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/drivers/ide/pci/cy82c693.c b/drivers/ide/pci/cy82c693.c
index daa36fcbc8ef..dc278025d318 100644
--- a/drivers/ide/pci/cy82c693.c
+++ b/drivers/ide/pci/cy82c693.c
@@ -97,9 +97,6 @@
97#define CY82_INDEX_CHANNEL1 0x31 97#define CY82_INDEX_CHANNEL1 0x31
98#define CY82_INDEX_TIMEOUT 0x32 98#define CY82_INDEX_TIMEOUT 0x32
99 99
100/* the max PIO mode - from datasheet */
101#define CY82C693_MAX_PIO 4
102
103/* the min and max PCI bus speed in MHz - from datasheet */ 100/* the min and max PCI bus speed in MHz - from datasheet */
104#define CY82C963_MIN_BUS_SPEED 25 101#define CY82C963_MIN_BUS_SPEED 25
105#define CY82C963_MAX_BUS_SPEED 33 102#define CY82C963_MAX_BUS_SPEED 33
@@ -148,9 +145,6 @@ static void compute_clocks (u8 pio, pio_clocks_t *p_pclk)
148 * so you can play with the idebus=xx parameter 145 * so you can play with the idebus=xx parameter
149 */ 146 */
150 147
151 if (pio > CY82C693_MAX_PIO)
152 pio = CY82C693_MAX_PIO;
153
154 /* let's calc the address setup time clocks */ 148 /* let's calc the address setup time clocks */
155 p_pclk->address_time = (u8)calc_clk(ide_pio_timings[pio].setup_time, bus_speed); 149 p_pclk->address_time = (u8)calc_clk(ide_pio_timings[pio].setup_time, bus_speed);
156 150
@@ -269,10 +263,7 @@ static int cy82c693_ide_dma_on (ide_drive_t *drive)
269 return __ide_dma_on(drive); 263 return __ide_dma_on(drive);
270} 264}
271 265
272/* 266static void cy82c693_set_pio_mode(ide_drive_t *drive, const u8 pio)
273 * tune ide drive - set PIO mode
274 */
275static void cy82c693_tune_drive (ide_drive_t *drive, u8 pio)
276{ 267{
277 ide_hwif_t *hwif = HWIF(drive); 268 ide_hwif_t *hwif = HWIF(drive);
278 struct pci_dev *dev = hwif->pci_dev; 269 struct pci_dev *dev = hwif->pci_dev;
@@ -329,13 +320,6 @@ static void cy82c693_tune_drive (ide_drive_t *drive, u8 pio)
329 addrCtrl, pclk.time_16r, pclk.time_16w, pclk.time_8); 320 addrCtrl, pclk.time_16r, pclk.time_16w, pclk.time_8);
330#endif /* CY82C693_DEBUG_LOGS */ 321#endif /* CY82C693_DEBUG_LOGS */
331 322
332 /* first let's calc the pio modes */
333 pio = ide_get_best_pio_mode(drive, pio, CY82C693_MAX_PIO);
334
335#if CY82C693_DEBUG_INFO
336 printk (KERN_INFO "%s: Selected PIO mode %d\n", drive->name, pio);
337#endif /* CY82C693_DEBUG_INFO */
338
339 /* let's calc the values for this PIO mode */ 323 /* let's calc the values for this PIO mode */
340 compute_clocks(pio, &pclk); 324 compute_clocks(pio, &pclk);
341 325
@@ -447,7 +431,7 @@ static void __devinit init_hwif_cy82c693(ide_hwif_t *hwif)
447 hwif->autodma = 0; 431 hwif->autodma = 0;
448 432
449 hwif->chipset = ide_cy82c693; 433 hwif->chipset = ide_cy82c693;
450 hwif->tuneproc = &cy82c693_tune_drive; 434 hwif->set_pio_mode = &cy82c693_set_pio_mode;
451 435
452 if (!hwif->dma_base) { 436 if (!hwif->dma_base) {
453 hwif->drives[0].autotune = 1; 437 hwif->drives[0].autotune = 1;