diff options
author | Sergei Shtylyov <sshtylyov@ru.mvista.com> | 2007-07-09 17:17:56 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-07-09 17:17:56 -0400 |
commit | 6d78013bfc20b8579827fc8f214c6f85d469c051 (patch) | |
tree | 581644ea90ec539d5c0ea511d72a934efc7cd4ca /drivers/ide/pci/aec62xx.c | |
parent | f9383c4269d264c3cf563bd2de365891f6592ebd (diff) |
aec62xx: kill speedproc() method wrapper (take 2)
There's no reason to have the speedproc() method wrapper for the two quite
different chip families, so just get rid of it.
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/pci/aec62xx.c')
-rw-r--r-- | drivers/ide/pci/aec62xx.c | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/drivers/ide/pci/aec62xx.c b/drivers/ide/pci/aec62xx.c index 99184be6a98c..794ac40ec90f 100644 --- a/drivers/ide/pci/aec62xx.c +++ b/drivers/ide/pci/aec62xx.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/drivers/ide/pci/aec62xx.c Version 0.23 May 23, 2007 | 2 | * linux/drivers/ide/pci/aec62xx.c Version 0.24 May 24, 2007 |
3 | * | 3 | * |
4 | * Copyright (C) 1999-2002 Andre Hedrick <andre@linux-ide.org> | 4 | * Copyright (C) 1999-2002 Andre Hedrick <andre@linux-ide.org> |
5 | * Copyright (C) 2007 MontaVista Software, Inc. <source@mvista.com> | 5 | * Copyright (C) 2007 MontaVista Software, Inc. <source@mvista.com> |
@@ -140,25 +140,10 @@ static int aec6260_tune_chipset (ide_drive_t *drive, u8 xferspeed) | |||
140 | return(ide_config_drive_speed(drive, speed)); | 140 | return(ide_config_drive_speed(drive, speed)); |
141 | } | 141 | } |
142 | 142 | ||
143 | static int aec62xx_tune_chipset (ide_drive_t *drive, u8 speed) | ||
144 | { | ||
145 | switch (HWIF(drive)->pci_dev->device) { | ||
146 | case PCI_DEVICE_ID_ARTOP_ATP865: | ||
147 | case PCI_DEVICE_ID_ARTOP_ATP865R: | ||
148 | case PCI_DEVICE_ID_ARTOP_ATP860: | ||
149 | case PCI_DEVICE_ID_ARTOP_ATP860R: | ||
150 | return ((int) aec6260_tune_chipset(drive, speed)); | ||
151 | case PCI_DEVICE_ID_ARTOP_ATP850UF: | ||
152 | return ((int) aec6210_tune_chipset(drive, speed)); | ||
153 | default: | ||
154 | return -1; | ||
155 | } | ||
156 | } | ||
157 | |||
158 | static void aec62xx_tune_drive (ide_drive_t *drive, u8 pio) | 143 | static void aec62xx_tune_drive (ide_drive_t *drive, u8 pio) |
159 | { | 144 | { |
160 | pio = ide_get_best_pio_mode(drive, pio, 4, NULL); | 145 | pio = ide_get_best_pio_mode(drive, pio, 4, NULL); |
161 | (void) aec62xx_tune_chipset(drive, pio + XFER_PIO_0); | 146 | (void) HWIF(drive)->speedproc(drive, pio + XFER_PIO_0); |
162 | } | 147 | } |
163 | 148 | ||
164 | static int aec62xx_config_drive_xfer_rate (ide_drive_t *drive) | 149 | static int aec62xx_config_drive_xfer_rate (ide_drive_t *drive) |
@@ -225,10 +210,13 @@ static void __devinit init_hwif_aec62xx(ide_hwif_t *hwif) | |||
225 | unsigned long flags; | 210 | unsigned long flags; |
226 | 211 | ||
227 | hwif->tuneproc = &aec62xx_tune_drive; | 212 | hwif->tuneproc = &aec62xx_tune_drive; |
228 | hwif->speedproc = &aec62xx_tune_chipset; | ||
229 | 213 | ||
230 | if (dev->device == PCI_DEVICE_ID_ARTOP_ATP850UF && hwif->mate) | 214 | if (dev->device == PCI_DEVICE_ID_ARTOP_ATP850UF) { |
231 | hwif->mate->serialized = hwif->serialized = 1; | 215 | if(hwif->mate) |
216 | hwif->mate->serialized = hwif->serialized = 1; | ||
217 | hwif->speedproc = &aec6210_tune_chipset; | ||
218 | } else | ||
219 | hwif->speedproc = &aec6260_tune_chipset; | ||
232 | 220 | ||
233 | if (!hwif->dma_base) { | 221 | if (!hwif->dma_base) { |
234 | hwif->drives[0].autotune = hwif->drives[1].autotune = 1; | 222 | hwif->drives[0].autotune = hwif->drives[1].autotune = 1; |