28c28
< * $FreeBSD: head/sys/dev/ata/ata-dma.c 71335 2001-01-21 16:13:03Z sos $
---
> * $FreeBSD: head/sys/dev/ata/ata-dma.c 72106 2001-02-06 16:44:25Z sos $
44a45
> #include <sys/rman.h>
87c88
< if (!scp->bmaddr)
---
> if (!scp->r_bmio)
92,94c93,96
< outb(scp->bmaddr + ATA_BMSTAT_PORT, inb(scp->bmaddr + ATA_BMSTAT_PORT) &
< (ATA_BMSTAT_DMA_MASTER | ATA_BMSTAT_DMA_SLAVE));
< if (inb(scp->bmaddr + ATA_BMSTAT_PORT) & ATA_BMSTAT_DMA_SIMPLEX) {
---
> ATA_OUTB(scp->r_bmio, ATA_BMSTAT_PORT,
> ATA_INB(scp->r_bmio, ATA_BMSTAT_PORT) &
> (ATA_BMSTAT_DMA_MASTER | ATA_BMSTAT_DMA_SLAVE));
> if (ATA_INB(scp->r_bmio, ATA_BMSTAT_PORT) & ATA_BMSTAT_DMA_SIMPLEX) {
826c828
< (inb(scp->bmaddr + ATA_BMSTAT_PORT) &
---
> (ATA_INB(scp->r_bmio, ATA_BMSTAT_PORT) &
834c836
< if ((wdmamode >= 2 && apiomode >= 4) && scp->bmaddr) {
---
> if ((wdmamode >= 2 && apiomode >= 4) && scp->r_bmio) {
906,909c908,911
< outl(scp->bmaddr + ATA_BMDTP_PORT, vtophys(dmatab));
< outb(scp->bmaddr + ATA_BMCMD_PORT, dir ? ATA_BMCMD_WRITE_READ : 0);
< outb(scp->bmaddr + ATA_BMSTAT_PORT,
< (inb(scp->bmaddr + ATA_BMSTAT_PORT) |
---
> ATA_OUTL(scp->r_bmio, ATA_BMDTP_PORT, vtophys(dmatab));
> ATA_OUTB(scp->r_bmio, ATA_BMCMD_PORT, dir ? ATA_BMCMD_WRITE_READ : 0);
> ATA_OUTB(scp->r_bmio, ATA_BMSTAT_PORT,
> (ATA_INB(scp->r_bmio, ATA_BMSTAT_PORT) |
911,912c913,914
< outb(scp->bmaddr + ATA_BMCMD_PORT,
< inb(scp->bmaddr + ATA_BMCMD_PORT) | ATA_BMCMD_START_STOP);
---
> ATA_OUTB(scp->r_bmio, ATA_BMCMD_PORT,
> ATA_INB(scp->r_bmio, ATA_BMCMD_PORT) | ATA_BMCMD_START_STOP);
918,919c920,923
< outb(scp->bmaddr + ATA_BMCMD_PORT,
< inb(scp->bmaddr + ATA_BMCMD_PORT) & ~ATA_BMCMD_START_STOP);
---
> int error;
>
> ATA_OUTB(scp->r_bmio, ATA_BMCMD_PORT,
> ATA_INB(scp->r_bmio, ATA_BMCMD_PORT) & ~ATA_BMCMD_START_STOP);
921c925,928
< return inb(scp->bmaddr + ATA_BMSTAT_PORT) & ATA_BMSTAT_MASK;
---
> error = ATA_INB(scp->r_bmio, ATA_BMSTAT_PORT);
> ATA_OUTB(scp->r_bmio, ATA_BMSTAT_PORT,
> error | ATA_BMSTAT_INTERRUPT | ATA_BMSTAT_ERROR);
> return error & ATA_BMSTAT_MASK;
927c934
< return inb(scp->bmaddr + ATA_BMSTAT_PORT) & ATA_BMSTAT_MASK;
---
> return ATA_INB(scp->r_bmio, ATA_BMSTAT_PORT) & ATA_BMSTAT_MASK;
945,946c952,953
< outl(scp->bmaddr + (devno << 3) + 0x20, reg20);
< outl(scp->bmaddr + (devno << 3) + 0x24, reg24);
---
> ATA_OUTL(scp->r_bmio, (devno << 3) + 0x20, reg20);
> ATA_OUTL(scp->r_bmio, (devno << 3) + 0x24, reg24);
< * $FreeBSD: head/sys/dev/ata/ata-dma.c 71335 2001-01-21 16:13:03Z sos $
---
> * $FreeBSD: head/sys/dev/ata/ata-dma.c 72106 2001-02-06 16:44:25Z sos $
44a45
> #include <sys/rman.h>
87c88
< if (!scp->bmaddr)
---
> if (!scp->r_bmio)
92,94c93,96
< outb(scp->bmaddr + ATA_BMSTAT_PORT, inb(scp->bmaddr + ATA_BMSTAT_PORT) &
< (ATA_BMSTAT_DMA_MASTER | ATA_BMSTAT_DMA_SLAVE));
< if (inb(scp->bmaddr + ATA_BMSTAT_PORT) & ATA_BMSTAT_DMA_SIMPLEX) {
---
> ATA_OUTB(scp->r_bmio, ATA_BMSTAT_PORT,
> ATA_INB(scp->r_bmio, ATA_BMSTAT_PORT) &
> (ATA_BMSTAT_DMA_MASTER | ATA_BMSTAT_DMA_SLAVE));
> if (ATA_INB(scp->r_bmio, ATA_BMSTAT_PORT) & ATA_BMSTAT_DMA_SIMPLEX) {
826c828
< (inb(scp->bmaddr + ATA_BMSTAT_PORT) &
---
> (ATA_INB(scp->r_bmio, ATA_BMSTAT_PORT) &
834c836
< if ((wdmamode >= 2 && apiomode >= 4) && scp->bmaddr) {
---
> if ((wdmamode >= 2 && apiomode >= 4) && scp->r_bmio) {
906,909c908,911
< outl(scp->bmaddr + ATA_BMDTP_PORT, vtophys(dmatab));
< outb(scp->bmaddr + ATA_BMCMD_PORT, dir ? ATA_BMCMD_WRITE_READ : 0);
< outb(scp->bmaddr + ATA_BMSTAT_PORT,
< (inb(scp->bmaddr + ATA_BMSTAT_PORT) |
---
> ATA_OUTL(scp->r_bmio, ATA_BMDTP_PORT, vtophys(dmatab));
> ATA_OUTB(scp->r_bmio, ATA_BMCMD_PORT, dir ? ATA_BMCMD_WRITE_READ : 0);
> ATA_OUTB(scp->r_bmio, ATA_BMSTAT_PORT,
> (ATA_INB(scp->r_bmio, ATA_BMSTAT_PORT) |
911,912c913,914
< outb(scp->bmaddr + ATA_BMCMD_PORT,
< inb(scp->bmaddr + ATA_BMCMD_PORT) | ATA_BMCMD_START_STOP);
---
> ATA_OUTB(scp->r_bmio, ATA_BMCMD_PORT,
> ATA_INB(scp->r_bmio, ATA_BMCMD_PORT) | ATA_BMCMD_START_STOP);
918,919c920,923
< outb(scp->bmaddr + ATA_BMCMD_PORT,
< inb(scp->bmaddr + ATA_BMCMD_PORT) & ~ATA_BMCMD_START_STOP);
---
> int error;
>
> ATA_OUTB(scp->r_bmio, ATA_BMCMD_PORT,
> ATA_INB(scp->r_bmio, ATA_BMCMD_PORT) & ~ATA_BMCMD_START_STOP);
921c925,928
< return inb(scp->bmaddr + ATA_BMSTAT_PORT) & ATA_BMSTAT_MASK;
---
> error = ATA_INB(scp->r_bmio, ATA_BMSTAT_PORT);
> ATA_OUTB(scp->r_bmio, ATA_BMSTAT_PORT,
> error | ATA_BMSTAT_INTERRUPT | ATA_BMSTAT_ERROR);
> return error & ATA_BMSTAT_MASK;
927c934
< return inb(scp->bmaddr + ATA_BMSTAT_PORT) & ATA_BMSTAT_MASK;
---
> return ATA_INB(scp->r_bmio, ATA_BMSTAT_PORT) & ATA_BMSTAT_MASK;
945,946c952,953
< outl(scp->bmaddr + (devno << 3) + 0x20, reg20);
< outl(scp->bmaddr + (devno << 3) + 0x24, reg24);
---
> ATA_OUTL(scp->r_bmio, (devno << 3) + 0x20, reg20);
> ATA_OUTL(scp->r_bmio, (devno << 3) + 0x24, reg24);