Lines Matching +full:drive +full:- +full:mode
1 // SPDX-License-Identifier: GPL-2.0-only
20 * it8213_set_pio_mode - set host controller for PIO mode
22 * @drive: drive
24 * Set the interface PIO mode.
27 static void it8213_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive) in it8213_set_pio_mode() argument
29 struct pci_dev *dev = to_pci_dev(hwif->dev); in it8213_set_pio_mode()
30 int is_slave = drive->dn & 1; in it8213_set_pio_mode()
38 const u8 pio = drive->pio_mode - XFER_PIO_0; in it8213_set_pio_mode()
52 if (drive->media != ide_disk) in it8213_set_pio_mode()
54 if (ide_pio_need_iordy(drive, pio)) in it8213_set_pio_mode()
77 * it8213_set_dma_mode - set host controller for DMA mode
79 * @drive: drive
81 * Tune the ITE chipset for the DMA mode.
84 static void it8213_set_dma_mode(ide_hwif_t *hwif, ide_drive_t *drive) in it8213_set_dma_mode() argument
86 struct pci_dev *dev = to_pci_dev(hwif->dev); in it8213_set_dma_mode()
88 int a_speed = 3 << (drive->dn * 4); in it8213_set_dma_mode()
89 int u_flag = 1 << drive->dn; in it8213_set_dma_mode()
90 int v_flag = 0x01 << drive->dn; in it8213_set_dma_mode()
91 int w_flag = 0x10 << drive->dn; in it8213_set_dma_mode()
95 const u8 speed = drive->dma_mode; in it8213_set_dma_mode()
104 u8 udma = speed - XFER_UDMA_0; in it8213_set_dma_mode()
106 u_speed = min_t(u8, 2 - (udma & 1), udma) << (drive->dn * 4); in it8213_set_dma_mode()
135 drive->pio_mode = in it8213_set_dma_mode()
136 mwdma_to_pio[speed - XFER_MW_DMA_0] + XFER_PIO_0; in it8213_set_dma_mode()
138 drive->pio_mode = XFER_PIO_2; /* for SWDMA2 */ in it8213_set_dma_mode()
140 it8213_set_pio_mode(hwif, drive); in it8213_set_dma_mode()
146 struct pci_dev *dev = to_pci_dev(hwif->dev); in it8213_cable_detect()
172 * it8213_init_one - pci layer discovery entry