diff options
| author | Jeremy Higdon <jeremy@sgi.com> | 2004-03-09 02:16:11 -0500 |
|---|---|---|
| committer | James Bottomley <jejb@raven.il.steeleye.com> | 2004-03-09 02:16:11 -0500 |
| commit | 24c104b9b0453ae4b5bc8b1088421363078b2820 (patch) | |
| tree | 1902f207008a0ff55b3984b8f08c3327559af07f /include/linux | |
| parent | c5d9af3e1dfc190bda3f1179845172d096bc0b39 (diff) | |
[libata] Split up shared IO register locations into individual components
Most ATA host controllers follow a standard layout for the
ATA shadow registers, where command/status, error/feature, and
devctl/altstatus share a single bus I/O address, because one register
of each pair is read-only, and the other is write-only.
On the Vitesse/Intel chip, all registers are given distinction bus I/O
addresses, which necessitates changing the libata data structures
to cope with this. This simply involves storing a few more bus addresses.
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/libata.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h index 37d958f2554e..b3323517d457 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h @@ -183,12 +183,15 @@ struct ata_ioports { unsigned long cmd_addr; unsigned long data_addr; unsigned long error_addr; + unsigned long feature_addr; unsigned long nsect_addr; unsigned long lbal_addr; unsigned long lbam_addr; unsigned long lbah_addr; unsigned long device_addr; - unsigned long cmdstat_addr; + unsigned long status_addr; + unsigned long command_addr; + unsigned long altstatus_addr; unsigned long ctl_addr; unsigned long bmdma_addr; unsigned long scr_addr; @@ -465,8 +468,8 @@ static inline u8 ata_chk_status(struct ata_port *ap) static inline u8 ata_altstatus(struct ata_port *ap) { if (ap->flags & ATA_FLAG_MMIO) - return readb(ap->ioaddr.ctl_addr); - return inb(ap->ioaddr.ctl_addr); + return readb(ap->ioaddr.altstatus_addr); + return inb(ap->ioaddr.altstatus_addr); } static inline void ata_pause(struct ata_port *ap) @@ -494,7 +497,7 @@ static inline u8 ata_wait_idle(struct ata_port *ap) u8 status = ata_busy_wait(ap, ATA_BUSY | ATA_DRQ, 1000); if (status & (ATA_BUSY | ATA_DRQ)) { - unsigned long l = ap->ioaddr.cmdstat_addr; + unsigned long l = ap->ioaddr.status_addr; printk(KERN_WARNING "ATA: abnormal status 0x%X on port 0x%lX\n", status, l); |
