From 52407a2e0c53f980d0c3028ed5d2ec043c80a195 Mon Sep 17 00:00:00 2001 From: pavalos Date: Thu, 5 Jul 2007 05:08:32 +0000 Subject: [PATCH] Use PCIR_BAR(x) instead of PCIR_MAPS. Obtained-from: FreeBSD --- sys/dev/disk/aic7xxx/ahc_pci.c | 8 ++++---- sys/dev/disk/aic7xxx/ahd_pci.c | 10 +++++----- sys/dev/disk/aic7xxx/aic79xx.h | 10 +++++----- sys/dev/disk/aic7xxx/aic7xxx_pci.c | 8 ++++---- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/sys/dev/disk/aic7xxx/ahc_pci.c b/sys/dev/disk/aic7xxx/ahc_pci.c index feee138087..5d19169563 100644 --- a/sys/dev/disk/aic7xxx/ahc_pci.c +++ b/sys/dev/disk/aic7xxx/ahc_pci.c @@ -30,16 +30,16 @@ * * $Id: //depot/aic7xxx/freebsd/dev/aic7xxx/ahc_pci.c#13 $ * - * $FreeBSD: src/sys/dev/aic7xxx/ahc_pci.c,v 1.29.2.14 2003/06/10 03:26:07 gibbs Exp $ - * $DragonFly: src/sys/dev/disk/aic7xxx/ahc_pci.c,v 1.8 2006/12/22 23:26:15 swildner Exp $ + * $FreeBSD: src/sys/dev/aic7xxx/ahc_pci.c,v 1.56 2003/09/02 17:30:34 jhb Exp $ + * $DragonFly: src/sys/dev/disk/aic7xxx/ahc_pci.c,v 1.9 2007/07/05 05:08:32 pavalos Exp $ */ #include "aic7xxx_osm.h" #ifdef AHC_PCI_CONFIG -#define AHC_PCI_IOADDR PCIR_MAPS /* I/O Address */ -#define AHC_PCI_MEMADDR (PCIR_MAPS + 4) /* Mem I/O Address */ +#define AHC_PCI_IOADDR PCIR_BAR(0) /* I/O Address */ +#define AHC_PCI_MEMADDR PCIR_BAR(1) /* Mem I/O Address */ static int ahc_pci_probe(device_t dev); static int ahc_pci_attach(device_t dev); diff --git a/sys/dev/disk/aic7xxx/ahd_pci.c b/sys/dev/disk/aic7xxx/ahd_pci.c index 8a38d2c55b..f2cabd1b6e 100644 --- a/sys/dev/disk/aic7xxx/ahd_pci.c +++ b/sys/dev/disk/aic7xxx/ahd_pci.c @@ -30,15 +30,15 @@ * * $Id: //depot/aic7xxx/freebsd/dev/aic7xxx/ahd_pci.c#13 $ * - * $FreeBSD: src/sys/dev/aic7xxx/ahd_pci.c,v 1.2.2.5 2003/06/10 03:26:07 gibbs Exp $ - * $DragonFly: src/sys/dev/disk/aic7xxx/ahd_pci.c,v 1.7 2006/12/22 23:26:15 swildner Exp $ + * $FreeBSD: src/sys/dev/aic7xxx/ahd_pci.c,v 1.11 2003/09/02 17:30:34 jhb Exp $ + * $DragonFly: src/sys/dev/disk/aic7xxx/ahd_pci.c,v 1.8 2007/07/05 05:08:32 pavalos Exp $ */ #include "aic79xx_osm.h" -#define AHD_PCI_IOADDR0 PCIR_MAPS /* Primary I/O BAR */ -#define AHD_PCI_MEMADDR (PCIR_MAPS + 4) /* Mem I/O Address */ -#define AHD_PCI_IOADDR1 (PCIR_MAPS + 12)/* Secondary I/O BAR */ +#define AHD_PCI_IOADDR0 PCIR_BAR(0) /* Primary I/O BAR */ +#define AHD_PCI_MEMADDR PCIR_BAR(1) /* Mem I/O Address */ +#define AHD_PCI_IOADDR1 PCIR_BAR(3) /* Secondary I/O BAR */ static int ahd_pci_probe(device_t dev); static int ahd_pci_attach(device_t dev); diff --git a/sys/dev/disk/aic7xxx/aic79xx.h b/sys/dev/disk/aic7xxx/aic79xx.h index f72659e229..ecb6aa012f 100644 --- a/sys/dev/disk/aic7xxx/aic79xx.h +++ b/sys/dev/disk/aic7xxx/aic79xx.h @@ -39,8 +39,8 @@ * * $Id: //depot/aic7xxx/aic7xxx/aic79xx.h#94 $ * - * $FreeBSD: src/sys/dev/aic7xxx/aic79xx.h,v 1.15 2003/06/28 04:45:25 gibbs Exp $ - * $DragonFly: src/sys/dev/disk/aic7xxx/aic79xx.h,v 1.4 2007/07/05 02:47:43 pavalos Exp $ + * $FreeBSD: src/sys/dev/aic7xxx/aic79xx.h,v 1.16 2003/09/02 17:30:34 jhb Exp $ + * $DragonFly: src/sys/dev/disk/aic7xxx/aic79xx.h,v 1.5 2007/07/05 05:08:32 pavalos Exp $ */ #ifndef _AIC79XX_H_ @@ -1299,9 +1299,9 @@ struct ahd_devinfo { }; /****************************** PCI Structures ********************************/ -#define AHD_PCI_IOADDR0 PCIR_MAPS /* I/O BAR*/ -#define AHD_PCI_MEMADDR (PCIR_MAPS + 4) /* Memory BAR */ -#define AHD_PCI_IOADDR1 (PCIR_MAPS + 12)/* Second I/O BAR */ +#define AHD_PCI_IOADDR0 PCIR_BAR(0) /* I/O BAR*/ +#define AHD_PCI_MEMADDR PCIR_BAR(1) /* Memory BAR */ +#define AHD_PCI_IOADDR1 PCIR_BAR(3) /* Second I/O BAR */ typedef int (ahd_device_setup_t)(struct ahd_softc *); diff --git a/sys/dev/disk/aic7xxx/aic7xxx_pci.c b/sys/dev/disk/aic7xxx/aic7xxx_pci.c index 8a796afc45..fdfaa3240c 100644 --- a/sys/dev/disk/aic7xxx/aic7xxx_pci.c +++ b/sys/dev/disk/aic7xxx/aic7xxx_pci.c @@ -41,8 +41,8 @@ * * $Id: //depot/aic7xxx/aic7xxx/aic7xxx_pci.c#69 $ * - * $FreeBSD: src/sys/dev/aic7xxx/aic7xxx_pci.c,v 1.2.2.17 2003/06/10 03:26:09 gibbs Exp $ - * $DragonFly: src/sys/dev/disk/aic7xxx/aic7xxx_pci.c,v 1.7 2007/01/27 15:03:25 swildner Exp $ + * $FreeBSD: src/sys/dev/aic7xxx/aic7xxx_pci.c,v 1.30 2003/09/02 17:30:34 jhb Exp $ + * $DragonFly: src/sys/dev/disk/aic7xxx/aic7xxx_pci.c,v 1.8 2007/07/05 05:08:32 pavalos Exp $ */ #ifdef __linux__ @@ -57,8 +57,8 @@ #ifdef AHC_PCI_CONFIG -#define AHC_PCI_IOADDR PCIR_MAPS /* I/O Address */ -#define AHC_PCI_MEMADDR (PCIR_MAPS + 4) /* Mem I/O Address */ +#define AHC_PCI_IOADDR PCIR_BAR(0) /* I/O Address */ +#define AHC_PCI_MEMADDR PCIR_BAR(1) /* Mem I/O Address */ static __inline uint64_t ahc_compose_id(u_int device, u_int vendor, u_int subdevice, u_int subvendor) -- 2.11.4.GIT