aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/trm290.c
diff options
context:
space:
mode:
authorSergei Shtylyov <sshtylyov@ru.mvista.com>2009-03-31 14:15:32 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-31 14:15:32 -0400
commitabb596b25edac1ec1acc4ef53df190771661c3d2 (patch)
treed20ea24960358ce03e0f27eefd2e6911afd1309c /drivers/ide/trm290.c
parent0f861e8c47ede537a8ad280c61d5d00d541f04db (diff)
ide: turn selectproc() method into dev_select() method (take 5)
Turn selectproc() method into dev_select() method by teaching it to write to the device register and moving it from 'struct ide_port_ops' to 'struct ide_tp_ops'. Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Cc: benh@kernel.crashing.org Cc: petkovbb@gmail.com [bart: add ->dev_select to at91_ide.c and tx4939.c (__BIG_ENDIAN case)] Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/trm290.c')
-rw-r--r--drivers/ide/trm290.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/drivers/ide/trm290.c b/drivers/ide/trm290.c
index c0528f27fcae..4b42ca091534 100644
--- a/drivers/ide/trm290.c
+++ b/drivers/ide/trm290.c
@@ -171,9 +171,11 @@ static void trm290_prepare_drive (ide_drive_t *drive, unsigned int use_dma)
171 local_irq_restore(flags); 171 local_irq_restore(flags);
172} 172}
173 173
174static void trm290_selectproc (ide_drive_t *drive) 174static void trm290_dev_select(ide_drive_t *drive)
175{ 175{
176 trm290_prepare_drive(drive, !!(drive->dev_flags & IDE_DFLAG_USING_DMA)); 176 trm290_prepare_drive(drive, !!(drive->dev_flags & IDE_DFLAG_USING_DMA));
177
178 outb(drive->select | ATA_DEVICE_OBS, drive->hwif->io_ports.device_addr);
177} 179}
178 180
179static int trm290_dma_check(ide_drive_t *drive, struct ide_cmd *cmd) 181static int trm290_dma_check(ide_drive_t *drive, struct ide_cmd *cmd)
@@ -298,8 +300,18 @@ static void __devinit init_hwif_trm290(ide_hwif_t *hwif)
298#endif 300#endif
299} 301}
300 302
301static const struct ide_port_ops trm290_port_ops = { 303static const struct ide_tp_ops trm290_tp_ops = {
302 .selectproc = trm290_selectproc, 304 .exec_command = ide_exec_command,
305 .read_status = ide_read_status,
306 .read_altstatus = ide_read_altstatus,
307 .write_devctl = ide_write_devctl,
308
309 .dev_select = trm290_dev_select,
310 .tf_load = ide_tf_load,
311 .tf_read = ide_tf_read,
312
313 .input_data = ide_input_data,
314 .output_data = ide_output_data,
303}; 315};
304 316
305static struct ide_dma_ops trm290_dma_ops = { 317static struct ide_dma_ops trm290_dma_ops = {
@@ -315,7 +327,7 @@ static struct ide_dma_ops trm290_dma_ops = {
315static const struct ide_port_info trm290_chipset __devinitdata = { 327static const struct ide_port_info trm290_chipset __devinitdata = {
316 .name = DRV_NAME, 328 .name = DRV_NAME,
317 .init_hwif = init_hwif_trm290, 329 .init_hwif = init_hwif_trm290,
318 .port_ops = &trm290_port_ops, 330 .tp_ops = &trm290_tp_ops,
319 .dma_ops = &trm290_dma_ops, 331 .dma_ops = &trm290_dma_ops,
320 .host_flags = IDE_HFLAG_TRM290 | 332 .host_flags = IDE_HFLAG_TRM290 |
321 IDE_HFLAG_NO_ATAPI_DMA | 333 IDE_HFLAG_NO_ATAPI_DMA |