Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e085b3ca authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz Committed by David S. Miller
Browse files

ide: change ->set_pio_mode method parameters



Change ->set_pio_mode method parameters to match ->set_piomode method
used in struct ata_port_operations.

Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3fccaa19
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -134,10 +134,10 @@ static void aec6260_set_mode(ide_drive_t *drive, const u8 speed)
	local_irq_restore(flags);
}

static void aec_set_pio_mode(ide_drive_t *drive, const u8 pio)
static void aec_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive)
{
	drive->dma_mode = pio + XFER_PIO_0;
	drive->hwif->port_ops->set_dma_mode(drive, pio + XFER_PIO_0);
	drive->dma_mode = drive->pio_mode;
	hwif->port_ops->set_dma_mode(drive, drive->dma_mode);
}

static int init_chipset_aec62xx(struct pci_dev *dev)
+2 −1
Original line number Diff line number Diff line
@@ -109,13 +109,14 @@ static DEFINE_SPINLOCK(ali14xx_lock);
 * This function computes timing parameters
 * and sets controller registers accordingly.
 */
static void ali14xx_set_pio_mode(ide_drive_t *drive, const u8 pio)
static void ali14xx_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive)
{
	int driveNum;
	int time1, time2;
	u8 param1, param2, param3, param4;
	unsigned long flags;
	int bus_speed = ide_vlb_clk ? ide_vlb_clk : 50;
	const u8 pio = drive->pio_mode - XFER_PIO_0;
	struct ide_timing *t = ide_timing_find_mode(XFER_PIO_0 + pio);

	/* calculate timing, according to PIO mode */
+3 −4
Original line number Diff line number Diff line
@@ -63,15 +63,14 @@ static void ali_fifo_control(ide_hwif_t *hwif, ide_drive_t *drive, int on)

/**
 *	ali_set_pio_mode	-	set host controller for PIO mode
 *	@hwif: port
 *	@drive: drive
 *	@pio: PIO mode number
 *
 *	Program the controller for the given PIO mode.
 */

static void ali_set_pio_mode(ide_drive_t *drive, const u8 pio)
static void ali_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive)
{
	ide_hwif_t *hwif = drive->hwif;
	struct pci_dev *dev = to_pci_dev(hwif->dev);
	int bus_speed = ide_pci_clk ? ide_pci_clk : 33;
	unsigned long T =  1000000 / bus_speed; /* PCI clock based */
@@ -79,7 +78,7 @@ static void ali_set_pio_mode(ide_drive_t *drive, const u8 pio)
	u8 unit = drive->dn & 1;
	struct ide_timing t;

	ide_timing_compute(drive, XFER_PIO_0 + pio, &t, T, 1);
	ide_timing_compute(drive, drive->pio_mode, &t, T, 1);

	t.setup = clamp_val(t.setup, 1, 8) & 7;
	t.active = clamp_val(t.active, 1, 8) & 7;
+2 −2
Original line number Diff line number Diff line
@@ -108,9 +108,9 @@ static void amd_set_drive(ide_drive_t *drive, const u8 speed)
 * amd_set_pio_mode() is a callback from upper layers for PIO-only tuning.
 */

static void amd_set_pio_mode(ide_drive_t *drive, const u8 pio)
static void amd_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive)
{
	amd_set_drive(drive, XFER_PIO_0 + pio);
	amd_set_drive(drive, drive->pio_mode);
}

static void amd7409_cable_detect(struct pci_dev *dev)
+3 −2
Original line number Diff line number Diff line
@@ -172,11 +172,12 @@ static void at91_ide_output_data(ide_drive_t *drive, struct ide_cmd *cmd,
	leave_16bit(chipselect, mode);
}

static void at91_ide_set_pio_mode(ide_drive_t *drive, const u8 pio)
static void at91_ide_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive)
{
	struct ide_timing *timing;
	u8 chipselect = drive->hwif->select_data;
	u8 chipselect = hwif->select_data;
	int use_iordy = 0;
	const u8 pio = drive->pio_mode - XFER_PIO_0;

	pdbg("chipselect %u pio %u\n", chipselect, pio);

Loading