ide: move ide_rate_filter() calls to the upper layer (take 2)
* Move ide_rate_filter() calls from host drivers to IDE core. * Make ide_rate_filter() static. * Make 'speed' argument of ->speedproc const. v2: * Fix it8213_tune_chipset() comment. There should be no functionality changes caused by this patch. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
This commit is contained in:
@@ -163,23 +163,21 @@ static void atiixp_tuneproc(ide_drive_t *drive, u8 pio)
|
||||
/**
|
||||
* atiixp_tune_chipset - tune a ATIIXP interface
|
||||
* @drive: IDE drive to tune
|
||||
* @xferspeed: speed to configure
|
||||
* @speed: speed to configure
|
||||
*
|
||||
* Set a ATIIXP interface channel to the desired speeds. This involves
|
||||
* requires the right timing data into the ATIIXP configuration space
|
||||
* then setting the drive parameters appropriately
|
||||
*/
|
||||
|
||||
static int atiixp_speedproc(ide_drive_t *drive, u8 xferspeed)
|
||||
static int atiixp_speedproc(ide_drive_t *drive, const u8 speed)
|
||||
{
|
||||
struct pci_dev *dev = drive->hwif->pci_dev;
|
||||
unsigned long flags;
|
||||
int timing_shift = (drive->dn & 2) ? 16 : 0 + (drive->dn & 1) ? 0 : 8;
|
||||
u32 tmp32;
|
||||
u16 tmp16;
|
||||
u8 speed, pio;
|
||||
|
||||
speed = ide_rate_filter(drive, xferspeed);
|
||||
u8 pio;
|
||||
|
||||
if (speed >= XFER_PIO_0 && speed <= XFER_PIO_4) {
|
||||
atiixp_tune_pio(drive, speed - XFER_PIO_0);
|
||||
|
Reference in New Issue
Block a user