diff options
Diffstat (limited to 'drivers/ide/tx4939ide.c')
-rw-r--r-- | drivers/ide/tx4939ide.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/ide/tx4939ide.c b/drivers/ide/tx4939ide.c index 64b58ecc3f0e..3c7367751873 100644 --- a/drivers/ide/tx4939ide.c +++ b/drivers/ide/tx4939ide.c | |||
@@ -104,17 +104,17 @@ static void tx4939ide_writeb(u8 val, void __iomem *base, u32 reg) | |||
104 | 104 | ||
105 | #define TX4939IDE_BASE(hwif) ((void __iomem *)(hwif)->extra_base) | 105 | #define TX4939IDE_BASE(hwif) ((void __iomem *)(hwif)->extra_base) |
106 | 106 | ||
107 | static void tx4939ide_set_pio_mode(ide_drive_t *drive, const u8 pio) | 107 | static void tx4939ide_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive) |
108 | { | 108 | { |
109 | ide_hwif_t *hwif = drive->hwif; | ||
110 | int is_slave = drive->dn; | 109 | int is_slave = drive->dn; |
111 | u32 mask, val; | 110 | u32 mask, val; |
111 | const u8 pio = drive->pio_mode - XFER_PIO_0; | ||
112 | u8 safe = pio; | 112 | u8 safe = pio; |
113 | ide_drive_t *pair; | 113 | ide_drive_t *pair; |
114 | 114 | ||
115 | pair = ide_get_pair_dev(drive); | 115 | pair = ide_get_pair_dev(drive); |
116 | if (pair) | 116 | if (pair) |
117 | safe = min(safe, ide_get_best_pio_mode(pair, 255, 4)); | 117 | safe = min(safe, pair->pio_mode - XFER_PIO_0); |
118 | /* | 118 | /* |
119 | * Update Command Transfer Mode for master/slave and Data | 119 | * Update Command Transfer Mode for master/slave and Data |
120 | * Transfer Mode for this drive. | 120 | * Transfer Mode for this drive. |
@@ -125,10 +125,10 @@ static void tx4939ide_set_pio_mode(ide_drive_t *drive, const u8 pio) | |||
125 | /* tx4939ide_tf_load_fixup() will set the Sys_Ctl register */ | 125 | /* tx4939ide_tf_load_fixup() will set the Sys_Ctl register */ |
126 | } | 126 | } |
127 | 127 | ||
128 | static void tx4939ide_set_dma_mode(ide_drive_t *drive, const u8 mode) | 128 | static void tx4939ide_set_dma_mode(ide_hwif_t *hwif, ide_drive_t *drive) |
129 | { | 129 | { |
130 | ide_hwif_t *hwif = drive->hwif; | ||
131 | u32 mask, val; | 130 | u32 mask, val; |
131 | const u8 mode = drive->dma_mode; | ||
132 | 132 | ||
133 | /* Update Data Transfer Mode for this drive. */ | 133 | /* Update Data Transfer Mode for this drive. */ |
134 | if (mode >= XFER_UDMA_0) | 134 | if (mode >= XFER_UDMA_0) |