diff options
Diffstat (limited to 'drivers/ide/atiixp.c')
-rw-r--r-- | drivers/ide/atiixp.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/ide/atiixp.c b/drivers/ide/atiixp.c index 837322b10a4c..15f0ead89f5c 100644 --- a/drivers/ide/atiixp.c +++ b/drivers/ide/atiixp.c | |||
@@ -42,19 +42,20 @@ static DEFINE_SPINLOCK(atiixp_lock); | |||
42 | 42 | ||
43 | /** | 43 | /** |
44 | * atiixp_set_pio_mode - set host controller for PIO mode | 44 | * atiixp_set_pio_mode - set host controller for PIO mode |
45 | * @hwif: port | ||
45 | * @drive: drive | 46 | * @drive: drive |
46 | * @pio: PIO mode number | ||
47 | * | 47 | * |
48 | * Set the interface PIO mode. | 48 | * Set the interface PIO mode. |
49 | */ | 49 | */ |
50 | 50 | ||
51 | static void atiixp_set_pio_mode(ide_drive_t *drive, const u8 pio) | 51 | static void atiixp_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive) |
52 | { | 52 | { |
53 | struct pci_dev *dev = to_pci_dev(drive->hwif->dev); | 53 | struct pci_dev *dev = to_pci_dev(hwif->dev); |
54 | unsigned long flags; | 54 | unsigned long flags; |
55 | int timing_shift = (drive->dn ^ 1) * 8; | 55 | int timing_shift = (drive->dn ^ 1) * 8; |
56 | u32 pio_timing_data; | 56 | u32 pio_timing_data; |
57 | u16 pio_mode_data; | 57 | u16 pio_mode_data; |
58 | const u8 pio = drive->pio_mode - XFER_PIO_0; | ||
58 | 59 | ||
59 | spin_lock_irqsave(&atiixp_lock, flags); | 60 | spin_lock_irqsave(&atiixp_lock, flags); |
60 | 61 | ||
@@ -74,21 +75,22 @@ static void atiixp_set_pio_mode(ide_drive_t *drive, const u8 pio) | |||
74 | 75 | ||
75 | /** | 76 | /** |
76 | * atiixp_set_dma_mode - set host controller for DMA mode | 77 | * atiixp_set_dma_mode - set host controller for DMA mode |
78 | * @hwif: port | ||
77 | * @drive: drive | 79 | * @drive: drive |
78 | * @speed: DMA mode | ||
79 | * | 80 | * |
80 | * Set a ATIIXP host controller to the desired DMA mode. This involves | 81 | * Set a ATIIXP host controller to the desired DMA mode. This involves |
81 | * programming the right timing data into the PCI configuration space. | 82 | * programming the right timing data into the PCI configuration space. |
82 | */ | 83 | */ |
83 | 84 | ||
84 | static void atiixp_set_dma_mode(ide_drive_t *drive, const u8 speed) | 85 | static void atiixp_set_dma_mode(ide_hwif_t *hwif, ide_drive_t *drive) |
85 | { | 86 | { |
86 | struct pci_dev *dev = to_pci_dev(drive->hwif->dev); | 87 | struct pci_dev *dev = to_pci_dev(hwif->dev); |
87 | unsigned long flags; | 88 | unsigned long flags; |
88 | int timing_shift = (drive->dn ^ 1) * 8; | 89 | int timing_shift = (drive->dn ^ 1) * 8; |
89 | u32 tmp32; | 90 | u32 tmp32; |
90 | u16 tmp16; | 91 | u16 tmp16; |
91 | u16 udma_ctl = 0; | 92 | u16 udma_ctl = 0; |
93 | const u8 speed = drive->dma_mode; | ||
92 | 94 | ||
93 | spin_lock_irqsave(&atiixp_lock, flags); | 95 | spin_lock_irqsave(&atiixp_lock, flags); |
94 | 96 | ||