diff options
| author | Søren Schmidt <sos@FreeBSD.org> | 2001-02-12 10:18:59 +0000 |
|---|---|---|
| committer | Søren Schmidt <sos@FreeBSD.org> | 2001-02-12 10:18:59 +0000 |
| commit | 7dd6c388751401d4a87f9fe0b6aa727f67903512 (patch) | |
| tree | 441b52351757ce4367fa40b9441ceaff18ab12b9 /sys | |
| parent | 6bf131c66529c322012c6aa329b300ce1f5dfc88 (diff) | |
Notes
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/dev/ata/ata-all.c | 6 | ||||
| -rw-r--r-- | sys/dev/ata/ata-all.h | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/sys/dev/ata/ata-all.c b/sys/dev/ata/ata-all.c index 7c1ff7e8ff8d..a268231ea05d 100644 --- a/sys/dev/ata/ata-all.c +++ b/sys/dev/ata/ata-all.c @@ -51,8 +51,10 @@ #include <pci/pcivar.h> #include <pci/pcireg.h> #endif +#if NISA > 0 #include <isa/isavar.h> #include <isa/isareg.h> +#endif #ifdef __alpha__ #include <machine/md_var.h> #endif @@ -551,7 +553,7 @@ ata_pci_alloc_resource(device_t dev, device_t child, int type, int *rid, case ATA_IOADDR_RID: if (ATA_MASTERDEV(dev)) { myrid = 0; - start = (channel == 0 ? IO_WD1 : IO_WD2); + start = (channel ? ATA_SECONDARY : ATA_PRIMARY); end = start + ATA_IOSIZE - 1; count = ATA_IOSIZE; res = BUS_ALLOC_RESOURCE(device_get_parent(dev), child, @@ -569,7 +571,7 @@ ata_pci_alloc_resource(device_t dev, device_t child, int type, int *rid, case ATA_ALTADDR_RID: if (ATA_MASTERDEV(dev)) { myrid = 0; - start = (channel == 0 ? IO_WD1 : IO_WD2) + ATA_ALTOFFSET; + start = (channel ? ATA_SECONDARY : ATA_PRIMARY) + ATA_ALTOFFSET; end = start + ATA_ALTIOSIZE - 1; count = ATA_ALTIOSIZE; res = BUS_ALLOC_RESOURCE(device_get_parent(dev), child, diff --git a/sys/dev/ata/ata-all.h b/sys/dev/ata/ata-all.h index 78ebba0758e3..2b87f5a9f163 100644 --- a/sys/dev/ata/ata-all.h +++ b/sys/dev/ata/ata-all.h @@ -107,6 +107,8 @@ #define ATA_A_4BIT 0x08 /* 4 head bits */ /* misc defines */ +#define ATA_PRIMARY 0x1f0 +#define ATA_SECONDARY 0x170 #define ATA_MASTER 0x00 #define ATA_SLAVE 0x10 #define ATA_IOSIZE 0x08 |
