ide: add ide_read_[alt]status() inline helpers
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
This commit is contained in:
parent
29dd59755a
commit
c47137a99c
11 changed files with 100 additions and 69 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue