diff options
Diffstat (limited to 'drivers/ide/pci/cs5535.c')
-rw-r--r-- | drivers/ide/pci/cs5535.c | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/drivers/ide/pci/cs5535.c b/drivers/ide/pci/cs5535.c index 5d1be657adca..da606ba6d28c 100644 --- a/drivers/ide/pci/cs5535.c +++ b/drivers/ide/pci/cs5535.c | |||
@@ -131,26 +131,21 @@ static void cs5535_set_speed(ide_drive_t *drive, const u8 speed) | |||
131 | } | 131 | } |
132 | } | 132 | } |
133 | 133 | ||
134 | /**** | 134 | /** |
135 | * cs5535_set_drive - Configure the drive to the new speed | 135 | * cs5535_set_dma_mode - set host controller for DMA mode |
136 | * @drive: Drive to set up | 136 | * @drive: drive |
137 | * @speed: desired speed | 137 | * @speed: DMA mode |
138 | * | 138 | * |
139 | * cs5535_set_drive() configures the drive and the chipset to a | 139 | * Programs the chipset for DMA mode. |
140 | * new speed. It also can be called by upper layers. | ||
141 | */ | 140 | */ |
142 | static int cs5535_set_drive(ide_drive_t *drive, u8 speed) | ||
143 | { | ||
144 | if (ide_config_drive_speed(drive, speed)) | ||
145 | return 1; | ||
146 | 141 | ||
142 | static void cs5535_set_dma_mode(ide_drive_t *drive, const u8 speed) | ||
143 | { | ||
147 | cs5535_set_speed(drive, speed); | 144 | cs5535_set_speed(drive, speed); |
148 | |||
149 | return 0; | ||
150 | } | 145 | } |
151 | 146 | ||
152 | /** | 147 | /** |
153 | * cs5535_set_pio_mode - PIO setup | 148 | * cs5535_set_pio_mode - set host controller for PIO mode |
154 | * @drive: drive | 149 | * @drive: drive |
155 | * @pio: PIO mode number | 150 | * @pio: PIO mode number |
156 | * | 151 | * |
@@ -159,9 +154,6 @@ static int cs5535_set_drive(ide_drive_t *drive, u8 speed) | |||
159 | 154 | ||
160 | static void cs5535_set_pio_mode(ide_drive_t *drive, const u8 pio) | 155 | static void cs5535_set_pio_mode(ide_drive_t *drive, const u8 pio) |
161 | { | 156 | { |
162 | if (ide_config_drive_speed(drive, XFER_PIO_0 + pio)) | ||
163 | return; | ||
164 | |||
165 | cs5535_set_speed(drive, XFER_PIO_0 + pio); | 157 | cs5535_set_speed(drive, XFER_PIO_0 + pio); |
166 | } | 158 | } |
167 | 159 | ||
@@ -203,7 +195,7 @@ static void __devinit init_hwif_cs5535(ide_hwif_t *hwif) | |||
203 | hwif->autodma = 0; | 195 | hwif->autodma = 0; |
204 | 196 | ||
205 | hwif->set_pio_mode = &cs5535_set_pio_mode; | 197 | hwif->set_pio_mode = &cs5535_set_pio_mode; |
206 | hwif->speedproc = &cs5535_set_drive; | 198 | hwif->set_dma_mode = &cs5535_set_dma_mode; |
207 | hwif->ide_dma_check = &cs5535_dma_check; | 199 | hwif->ide_dma_check = &cs5535_dma_check; |
208 | 200 | ||
209 | hwif->atapi_dma = 1; | 201 | hwif->atapi_dma = 1; |
@@ -227,7 +219,7 @@ static ide_pci_device_t cs5535_chipset __devinitdata = { | |||
227 | .init_hwif = init_hwif_cs5535, | 219 | .init_hwif = init_hwif_cs5535, |
228 | .autodma = AUTODMA, | 220 | .autodma = AUTODMA, |
229 | .bootable = ON_BOARD, | 221 | .bootable = ON_BOARD, |
230 | .host_flags = IDE_HFLAG_SINGLE, | 222 | .host_flags = IDE_HFLAG_SINGLE | IDE_HFLAG_POST_SET_MODE, |
231 | .pio_mask = ATA_PIO4, | 223 | .pio_mask = ATA_PIO4, |
232 | }; | 224 | }; |
233 | 225 | ||