Lines Matching +full:- +full:- +full:valid +full:- +full:-

1 // SPDX-License-Identifier: GPL-2.0-only
11 #include <asm-generic/ide_iops.h>
44 if (hwif->host_flags & IDE_HFLAG_MMIO) in ide_exec_command()
45 writeb(cmd, (void __iomem *)hwif->io_ports.command_addr); in ide_exec_command()
47 outb(cmd, hwif->io_ports.command_addr); in ide_exec_command()
53 if (hwif->host_flags & IDE_HFLAG_MMIO) in ide_read_status()
54 return readb((void __iomem *)hwif->io_ports.status_addr); in ide_read_status()
56 return inb(hwif->io_ports.status_addr); in ide_read_status()
62 if (hwif->host_flags & IDE_HFLAG_MMIO) in ide_read_altstatus()
63 return readb((void __iomem *)hwif->io_ports.ctl_addr); in ide_read_altstatus()
65 return inb(hwif->io_ports.ctl_addr); in ide_read_altstatus()
71 if (hwif->host_flags & IDE_HFLAG_MMIO) in ide_write_devctl()
72 writeb(ctl, (void __iomem *)hwif->io_ports.ctl_addr); in ide_write_devctl()
74 outb(ctl, hwif->io_ports.ctl_addr); in ide_write_devctl()
80 ide_hwif_t *hwif = drive->hwif; in ide_dev_select()
81 u8 select = drive->select | ATA_DEVICE_OBS; in ide_dev_select()
83 if (hwif->host_flags & IDE_HFLAG_MMIO) in ide_dev_select()
84 writeb(select, (void __iomem *)hwif->io_ports.device_addr); in ide_dev_select()
86 outb(select, hwif->io_ports.device_addr); in ide_dev_select()
90 void ide_tf_load(ide_drive_t *drive, struct ide_taskfile *tf, u8 valid) in ide_tf_load() argument
92 ide_hwif_t *hwif = drive->hwif; in ide_tf_load()
93 struct ide_io_ports *io_ports = &hwif->io_ports; in ide_tf_load()
95 u8 mmio = (hwif->host_flags & IDE_HFLAG_MMIO) ? 1 : 0; in ide_tf_load()
102 if (valid & IDE_VALID_FEATURE) in ide_tf_load()
103 tf_outb(tf->feature, io_ports->feature_addr); in ide_tf_load()
104 if (valid & IDE_VALID_NSECT) in ide_tf_load()
105 tf_outb(tf->nsect, io_ports->nsect_addr); in ide_tf_load()
106 if (valid & IDE_VALID_LBAL) in ide_tf_load()
107 tf_outb(tf->lbal, io_ports->lbal_addr); in ide_tf_load()
108 if (valid & IDE_VALID_LBAM) in ide_tf_load()
109 tf_outb(tf->lbam, io_ports->lbam_addr); in ide_tf_load()
110 if (valid & IDE_VALID_LBAH) in ide_tf_load()
111 tf_outb(tf->lbah, io_ports->lbah_addr); in ide_tf_load()
112 if (valid & IDE_VALID_DEVICE) in ide_tf_load()
113 tf_outb(tf->device, io_ports->device_addr); in ide_tf_load()
117 void ide_tf_read(ide_drive_t *drive, struct ide_taskfile *tf, u8 valid) in ide_tf_read() argument
119 ide_hwif_t *hwif = drive->hwif; in ide_tf_read()
120 struct ide_io_ports *io_ports = &hwif->io_ports; in ide_tf_read()
122 u8 mmio = (hwif->host_flags & IDE_HFLAG_MMIO) ? 1 : 0; in ide_tf_read()
129 if (valid & IDE_VALID_ERROR) in ide_tf_read()
130 tf->error = tf_inb(io_ports->feature_addr); in ide_tf_read()
131 if (valid & IDE_VALID_NSECT) in ide_tf_read()
132 tf->nsect = tf_inb(io_ports->nsect_addr); in ide_tf_read()
133 if (valid & IDE_VALID_LBAL) in ide_tf_read()
134 tf->lbal = tf_inb(io_ports->lbal_addr); in ide_tf_read()
135 if (valid & IDE_VALID_LBAM) in ide_tf_read()
136 tf->lbam = tf_inb(io_ports->lbam_addr); in ide_tf_read()
137 if (valid & IDE_VALID_LBAH) in ide_tf_read()
138 tf->lbah = tf_inb(io_ports->lbah_addr); in ide_tf_read()
139 if (valid & IDE_VALID_DEVICE) in ide_tf_read()
140 tf->device = tf_inb(io_ports->device_addr); in ide_tf_read()
146 * when using 32-bit I/O instructions to transfer data. We call this
168 ide_hwif_t *hwif = drive->hwif; in ide_input_data()
169 struct ide_io_ports *io_ports = &hwif->io_ports; in ide_input_data()
170 unsigned long data_addr = io_ports->data_addr; in ide_input_data()
172 u8 io_32bit = drive->io_32bit; in ide_input_data()
173 u8 mmio = (hwif->host_flags & IDE_HFLAG_MMIO) ? 1 : 0; in ide_input_data()
180 ata_vlb_sync(io_ports->nsect_addr); in ide_input_data()
212 ide_hwif_t *hwif = drive->hwif; in ide_output_data()
213 struct ide_io_ports *io_ports = &hwif->io_ports; in ide_output_data()
214 unsigned long data_addr = io_ports->data_addr; in ide_output_data()
216 u8 io_32bit = drive->io_32bit; in ide_output_data()
217 u8 mmio = (hwif->host_flags & IDE_HFLAG_MMIO) ? 1 : 0; in ide_output_data()
224 ata_vlb_sync(io_ports->nsect_addr); in ide_output_data()