aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/tc86c001.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/pci/tc86c001.c')
-rw-r--r--drivers/ide/pci/tc86c001.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/ide/pci/tc86c001.c b/drivers/ide/pci/tc86c001.c
index e23b9cfb6eb..840415d68d3 100644
--- a/drivers/ide/pci/tc86c001.c
+++ b/drivers/ide/pci/tc86c001.c
@@ -13,7 +13,7 @@
13#include <linux/pci.h> 13#include <linux/pci.h>
14#include <linux/ide.h> 14#include <linux/ide.h>
15 15
16static int tc86c001_tune_chipset(ide_drive_t *drive, const u8 speed) 16static void tc86c001_set_mode(ide_drive_t *drive, const u8 speed)
17{ 17{
18 ide_hwif_t *hwif = HWIF(drive); 18 ide_hwif_t *hwif = HWIF(drive);
19 unsigned long scr_port = hwif->config_data + (drive->dn ? 0x02 : 0x00); 19 unsigned long scr_port = hwif->config_data + (drive->dn ? 0x02 : 0x00);
@@ -39,13 +39,11 @@ static int tc86c001_tune_chipset(ide_drive_t *drive, const u8 speed)
39 scr &= (speed < XFER_MW_DMA_0) ? 0xf8ff : 0xff0f; 39 scr &= (speed < XFER_MW_DMA_0) ? 0xf8ff : 0xff0f;
40 scr |= mode; 40 scr |= mode;
41 outw(scr, scr_port); 41 outw(scr, scr_port);
42
43 return ide_config_drive_speed(drive, speed);
44} 42}
45 43
46static void tc86c001_set_pio_mode(ide_drive_t *drive, const u8 pio) 44static void tc86c001_set_pio_mode(ide_drive_t *drive, const u8 pio)
47{ 45{
48 (void) tc86c001_tune_chipset(drive, XFER_PIO_0 + pio); 46 tc86c001_set_mode(drive, XFER_PIO_0 + pio);
49} 47}
50 48
51/* 49/*
@@ -193,7 +191,8 @@ static void __devinit init_hwif_tc86c001(ide_hwif_t *hwif)
193 hwif->config_data = sc_base; 191 hwif->config_data = sc_base;
194 192
195 hwif->set_pio_mode = &tc86c001_set_pio_mode; 193 hwif->set_pio_mode = &tc86c001_set_pio_mode;
196 hwif->speedproc = &tc86c001_tune_chipset; 194 hwif->set_dma_mode = &tc86c001_set_mode;
195
197 hwif->busproc = &tc86c001_busproc; 196 hwif->busproc = &tc86c001_busproc;
198 197
199 hwif->drives[0].autotune = hwif->drives[1].autotune = 1; 198 hwif->drives[0].autotune = hwif->drives[1].autotune = 1;