summaryrefslogtreecommitdiffstats
path: root/sys/dev/hifn
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2003-09-02 17:30:40 +0000
committerjhb <jhb@FreeBSD.org>2003-09-02 17:30:40 +0000
commitdc11e45b68dec5003e226a26f7fa2ee9a1e351c2 (patch)
tree1a7743437055722d93fce73b145dde1eb1915e7f /sys/dev/hifn
parent480ed8b5934d938866a31bd84aa636de31845487 (diff)
downloadFreeBSD-src-dc11e45b68dec5003e226a26f7fa2ee9a1e351c2.zip
FreeBSD-src-dc11e45b68dec5003e226a26f7fa2ee9a1e351c2.tar.gz
Use PCIR_BAR(x) instead of PCIR_MAPS.
Glanced over by: imp, gibbs Tested by: i386 LINT
Diffstat (limited to 'sys/dev/hifn')
-rw-r--r--sys/dev/hifn/hifn7751.c4
-rw-r--r--sys/dev/hifn/hifn7751reg.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/hifn/hifn7751.c b/sys/dev/hifn/hifn7751.c
index 5bff8f7..3c06bbf 100644
--- a/sys/dev/hifn/hifn7751.c
+++ b/sys/dev/hifn/hifn7751.c
@@ -588,7 +588,7 @@ hifn_suspend(device_t dev)
hifn_stop(sc);
for (i = 0; i < 5; i++)
- sc->saved_maps[i] = pci_read_config(dev, PCIR_MAPS + i * 4, 4);
+ sc->saved_maps[i] = pci_read_config(dev, PCIR_BAR(i), 4);
sc->saved_biosaddr = pci_read_config(dev, PCIR_BIOS, 4);
sc->saved_intline = pci_read_config(dev, PCIR_INTLINE, 1);
sc->saved_cachelnsz = pci_read_config(dev, PCIR_CACHELNSZ, 1);
@@ -613,7 +613,7 @@ hifn_resume(device_t dev)
/* better way to do this? */
for (i = 0; i < 5; i++)
- pci_write_config(dev, PCIR_MAPS + i * 4, sc->saved_maps[i], 4);
+ pci_write_config(dev, PCIR_BAR(i), sc->saved_maps[i], 4);
pci_write_config(dev, PCIR_BIOS, sc->saved_biosaddr, 4);
pci_write_config(dev, PCIR_INTLINE, sc->saved_intline, 1);
pci_write_config(dev, PCIR_CACHELNSZ, sc->saved_cachelnsz, 1);
diff --git a/sys/dev/hifn/hifn7751reg.h b/sys/dev/hifn/hifn7751reg.h
index fa79621..a0c3719 100644
--- a/sys/dev/hifn/hifn7751reg.h
+++ b/sys/dev/hifn/hifn7751reg.h
@@ -49,8 +49,8 @@
* Some PCI configuration space offset defines. The names were made
* identical to the names used by the Linux kernel.
*/
-#define HIFN_BAR0 (PCIR_MAPS+0x0) /* PUC register map */
-#define HIFN_BAR1 (PCIR_MAPS+0x4) /* DMA register map */
+#define HIFN_BAR0 PCIR_BAR(0) /* PUC register map */
+#define HIFN_BAR1 PCIR_BAR(1) /* DMA register map */
#define HIFN_TRDY_TIMEOUT 0x40
#define HIFN_RETRY_TIMEOUT 0x41
OpenPOWER on IntegriCloud