ide: add ide_read_[alt]status() inline helpers
[deliverable/linux.git] / include / linux / ide.h
index 2f66aaa1be2fb92fada8f7130eb5d2d18ec1ce1f..d2124920ff10b5c58d6d6150fa9f35acc32eb2fb 100644 (file)
@@ -1309,4 +1309,18 @@ static inline void ide_set_irq(ide_drive_t *drive, int on)
        drive->hwif->OUTB(drive->ctl | (on ? 0 : 2), IDE_CONTROL_REG);
 }
 
+static inline u8 ide_read_status(ide_drive_t *drive)
+{
+       ide_hwif_t *hwif = drive->hwif;
+
+       return hwif->INB(hwif->io_ports[IDE_STATUS_OFFSET]);
+}
+
+static inline u8 ide_read_altstatus(ide_drive_t *drive)
+{
+       ide_hwif_t *hwif = drive->hwif;
+
+       return hwif->INB(hwif->io_ports[IDE_CONTROL_OFFSET]);
+}
+
 #endif /* _IDE_H */
This page took 0.037512 seconds and 5 git commands to generate.