aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-io-std.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/ide-io-std.c')
-rw-r--r--drivers/ide/ide-io-std.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/ide/ide-io-std.c b/drivers/ide/ide-io-std.c
index 7f77bb7db488..9cac281d82c4 100644
--- a/drivers/ide/ide-io-std.c
+++ b/drivers/ide/ide-io-std.c
@@ -73,6 +73,18 @@ void ide_write_devctl(ide_hwif_t *hwif, u8 ctl)
73} 73}
74EXPORT_SYMBOL_GPL(ide_write_devctl); 74EXPORT_SYMBOL_GPL(ide_write_devctl);
75 75
76void ide_dev_select(ide_drive_t *drive)
77{
78 ide_hwif_t *hwif = drive->hwif;
79 u8 select = drive->select | ATA_DEVICE_OBS;
80
81 if (hwif->host_flags & IDE_HFLAG_MMIO)
82 writeb(select, (void __iomem *)hwif->io_ports.device_addr);
83 else
84 outb(select, hwif->io_ports.device_addr);
85}
86EXPORT_SYMBOL_GPL(ide_dev_select);
87
76void ide_tf_load(ide_drive_t *drive, struct ide_cmd *cmd) 88void ide_tf_load(ide_drive_t *drive, struct ide_cmd *cmd)
77{ 89{
78 ide_hwif_t *hwif = drive->hwif; 90 ide_hwif_t *hwif = drive->hwif;
@@ -280,6 +292,7 @@ const struct ide_tp_ops default_tp_ops = {
280 .read_altstatus = ide_read_altstatus, 292 .read_altstatus = ide_read_altstatus,
281 .write_devctl = ide_write_devctl, 293 .write_devctl = ide_write_devctl,
282 294
295 .dev_select = ide_dev_select,
283 .tf_load = ide_tf_load, 296 .tf_load = ide_tf_load,
284 .tf_read = ide_tf_read, 297 .tf_read = ide_tf_read,
285 298