summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ic/aacreg.h4
-rw-r--r--sys/dev/pci/aac_pci.c4
-rw-r--r--sys/dev/pci/adw_pci.c4
-rw-r--r--sys/dev/pci/ahc_pci.c6
-rw-r--r--sys/dev/pci/ami_pci.c4
-rw-r--r--sys/dev/pci/auich.c6
-rw-r--r--sys/dev/pci/auvia.c4
-rw-r--r--sys/dev/pci/bktr/bktr_os.c4
-rw-r--r--sys/dev/pci/cac_pci.c6
-rw-r--r--sys/dev/pci/cmpci.c4
-rw-r--r--sys/dev/pci/cs4280.c6
-rw-r--r--sys/dev/pci/cs4281.c6
-rw-r--r--sys/dev/pci/dpt_pci.c4
-rw-r--r--sys/dev/pci/eap.c4
-rw-r--r--sys/dev/pci/eso.c12
-rw-r--r--sys/dev/pci/fms.c4
-rw-r--r--sys/dev/pci/gdt_pci.c10
-rw-r--r--sys/dev/pci/hifn7751.c6
-rw-r--r--sys/dev/pci/i82365_pci.c4
-rw-r--r--sys/dev/pci/if_an_pci.c4
-rw-r--r--sys/dev/pci/if_de.c6
-rw-r--r--sys/dev/pci/if_lmc_obsd.c10
-rw-r--r--sys/dev/pci/if_ne_pci.c4
-rw-r--r--sys/dev/pci/if_tx.c6
-rw-r--r--sys/dev/pci/if_txp.c4
-rw-r--r--sys/dev/pci/if_wi_pci.c6
-rw-r--r--sys/dev/pci/if_wx.c4
-rw-r--r--sys/dev/pci/iha_pci.c4
-rw-r--r--sys/dev/pci/ises.c4
-rw-r--r--sys/dev/pci/maestro.c4
-rw-r--r--sys/dev/pci/ncr.c13
-rw-r--r--sys/dev/pci/neo.c6
-rw-r--r--sys/dev/pci/ohci_pci.c4
-rw-r--r--sys/dev/pci/pccbb.c15
-rw-r--r--sys/dev/pci/pci_map.c22
-rw-r--r--sys/dev/pci/pciide.c8
-rw-r--r--sys/dev/pci/pcivar.h4
-rw-r--r--sys/dev/pci/pcscp.c9
-rw-r--r--sys/dev/pci/puc.c5
-rw-r--r--sys/dev/pci/siop_pci_common.c8
-rw-r--r--sys/dev/pci/twe_pci.c4
-rw-r--r--sys/dev/pci/ubsec.c4
-rw-r--r--sys/dev/pci/uhci_pci.c4
-rw-r--r--sys/dev/pci/yds.c4
44 files changed, 138 insertions, 130 deletions
diff --git a/sys/dev/ic/aacreg.h b/sys/dev/ic/aacreg.h
index 54850b86f23..21973b791dc 100644
--- a/sys/dev/ic/aacreg.h
+++ b/sys/dev/ic/aacreg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: aacreg.h,v 1.2 2000/12/06 21:16:45 mickey Exp $ */
+/* $OpenBSD: aacreg.h,v 1.3 2001/06/12 15:40:29 niklas Exp $ */
/*-
* Copyright (c) 2000 Michael Smith
@@ -484,6 +484,8 @@ struct aac_blockwrite_response {
* on the SA110 'StrongArm'.
*/
+#define AAC_REGSIZE 0x100
+
/* doorbell 0 (adapter->host) */
#define AAC_SA_DOORBELL0_CLEAR 0x98
#define AAC_SA_DOORBELL0_SET 0x9c
diff --git a/sys/dev/pci/aac_pci.c b/sys/dev/pci/aac_pci.c
index def32a49fcf..9cdf83a130f 100644
--- a/sys/dev/pci/aac_pci.c
+++ b/sys/dev/pci/aac_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aac_pci.c,v 1.1 2000/11/10 09:39:36 niklas Exp $ */
+/* $OpenBSD: aac_pci.c,v 1.2 2001/06/12 15:40:29 niklas Exp $ */
/*-
* Copyright (c) 2000 Michael Smith
@@ -142,7 +142,7 @@ aac_pci_attach(parent, self, aux)
*/
if (pci_mapreg_map(pa, PCI_MAPREG_START,
PCI_MAPREG_TYPE_MEM | PCI_MAPREG_MEM_TYPE_32BIT, 0, &sc->sc_memt,
- &sc->sc_memh, &membase, &memsize)) {
+ &sc->sc_memh, &membase, &memsize, AAC_REGSIZE)) {
printf("can't find mem space\n");
goto bail_out;
}
diff --git a/sys/dev/pci/adw_pci.c b/sys/dev/pci/adw_pci.c
index c6f66f1d5ff..5e78c83543e 100644
--- a/sys/dev/pci/adw_pci.c
+++ b/sys/dev/pci/adw_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: adw_pci.c,v 1.7 2001/04/11 04:05:17 krw Exp $ */
+/* $OpenBSD: adw_pci.c,v 1.8 2001/06/12 15:40:29 niklas Exp $ */
/* $NetBSD: adw_pci.c,v 1.7 2000/05/26 15:13:46 dante Exp $ */
/*
@@ -162,7 +162,7 @@ adw_pci_attach(parent, self, aux)
* Map Device Registers for I/O
*/
if (pci_mapreg_map(pa, PCI_BASEADR_IO, PCI_MAPREG_TYPE_IO, 0,
- &iot, &ioh, NULL, NULL)) {
+ &iot, &ioh, NULL, NULL, 0)) {
printf("\n%s: unable to map device registers\n",
sc->sc_dev.dv_xname);
return;
diff --git a/sys/dev/pci/ahc_pci.c b/sys/dev/pci/ahc_pci.c
index 54a59aabde2..a0fce90e82e 100644
--- a/sys/dev/pci/ahc_pci.c
+++ b/sys/dev/pci/ahc_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ahc_pci.c,v 1.21 2001/01/22 22:36:52 deraadt Exp $ */
+/* $OpenBSD: ahc_pci.c,v 1.22 2001/06/12 15:40:29 niklas Exp $ */
/* $NetBSD: ahc_pci.c,v 1.9 1996/10/21 22:56:24 thorpej Exp $ */
/*
@@ -377,7 +377,7 @@ void *aux;
case PCI_MAPREG_TYPE_MEM | PCI_MAPREG_MEM_TYPE_32BIT:
case PCI_MAPREG_TYPE_MEM | PCI_MAPREG_MEM_TYPE_64BIT:
ioh_valid = (pci_mapreg_map(pa, AHC_PCI_MEMADDR,
- memtype, 0, &iot, &ioh, NULL, NULL) == 0);
+ memtype, 0, &iot, &ioh, NULL, NULL, 0) == 0);
break;
default:
ioh_valid = 0;
@@ -388,7 +388,7 @@ void *aux;
#endif
{
ioh_valid = (pci_mapreg_map(pa, AHC_PCI_IOADDR,
- PCI_MAPREG_TYPE_IO, 0, &iot, &ioh, NULL, NULL) == 0);
+ PCI_MAPREG_TYPE_IO, 0, &iot, &ioh, NULL, NULL, 0) == 0);
}
if (!ioh_valid) {
diff --git a/sys/dev/pci/ami_pci.c b/sys/dev/pci/ami_pci.c
index 7c6b2505a7b..5c959122d4c 100644
--- a/sys/dev/pci/ami_pci.c
+++ b/sys/dev/pci/ami_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ami_pci.c,v 1.3 2001/04/16 03:18:18 deraadt Exp $ */
+/* $OpenBSD: ami_pci.c,v 1.4 2001/06/12 15:40:30 niklas Exp $ */
/*
* Copyright (c) 2000 Michael Shalayeff
@@ -154,7 +154,7 @@ ami_pci_attach(parent, self, aux)
#endif
csr = pci_mapreg_type(pa->pa_pc, pa->pa_tag, AMI_BAR);
if (pci_mapreg_map(pa, AMI_BAR, csr, 0,
- &sc->iot, &sc->ioh, NULL, &size)) {
+ &sc->iot, &sc->ioh, NULL, &size, 0)) {
printf(": can't map controller pci space\n");
return;
}
diff --git a/sys/dev/pci/auich.c b/sys/dev/pci/auich.c
index d50a680a8b0..31463996c51 100644
--- a/sys/dev/pci/auich.c
+++ b/sys/dev/pci/auich.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: auich.c,v 1.11 2001/06/06 22:11:29 mickey Exp $ */
+/* $OpenBSD: auich.c,v 1.12 2001/06/12 15:40:30 niklas Exp $ */
/*
* Copyright (c) 2000,2001 Michael Shalayeff
@@ -293,12 +293,12 @@ auich_attach(parent, self, aux)
int i;
if (pci_mapreg_map(pa, AUICH_NAMBAR, PCI_MAPREG_TYPE_IO, 0,
- &sc->iot, &sc->mix_ioh, NULL, &mix_size)) {
+ &sc->iot, &sc->mix_ioh, NULL, &mix_size, 0)) {
printf(": can't map codec i/o space\n");
return;
}
if (pci_mapreg_map(pa, AUICH_NABMBAR, PCI_MAPREG_TYPE_IO, 0,
- &sc->iot, &sc->aud_ioh, NULL, &aud_size)) {
+ &sc->iot, &sc->aud_ioh, NULL, &aud_size, 0)) {
printf(": can't map device i/o space\n");
bus_space_unmap(sc->iot, sc->mix_ioh, mix_size);
return;
diff --git a/sys/dev/pci/auvia.c b/sys/dev/pci/auvia.c
index c534a1a9933..8197f78b78c 100644
--- a/sys/dev/pci/auvia.c
+++ b/sys/dev/pci/auvia.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: auvia.c,v 1.8 2001/05/16 12:51:49 ho Exp $ */
+/* $OpenBSD: auvia.c,v 1.9 2001/06/12 15:40:30 niklas Exp $ */
/* $NetBSD: auvia.c,v 1.7 2000/11/15 21:06:33 jdolecek Exp $ */
/*-
@@ -248,7 +248,7 @@ auvia_attach(struct device *parent, struct device *self, void *aux)
printf(": %s\n", intrstr);
if (pci_mapreg_map(pa, 0x10, PCI_MAPREG_TYPE_IO, 0, &sc->sc_iot,
- &sc->sc_ioh, &sc->sc_ioaddr, &sc->sc_iosize)) {
+ &sc->sc_ioh, &sc->sc_ioaddr, &sc->sc_iosize, 0)) {
printf("%s: can't map i/o space\n", sc->sc_dev.dv_xname);
return;
}
diff --git a/sys/dev/pci/bktr/bktr_os.c b/sys/dev/pci/bktr/bktr_os.c
index ca33efe3dbf..d6f8520783a 100644
--- a/sys/dev/pci/bktr/bktr_os.c
+++ b/sys/dev/pci/bktr/bktr_os.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bktr_os.c,v 1.2 2001/05/16 07:15:41 fgsch Exp $ */
+/* $OpenBSD: bktr_os.c,v 1.3 2001/06/12 15:40:33 niklas Exp $ */
/* $FreeBSD: src/sys/dev/bktr/bktr_os.c,v 1.20 2000/10/20 08:16:53 roger Exp $ */
/*
@@ -1381,7 +1381,7 @@ bktr_attach(struct device *parent, struct device *self, void *aux)
PCI_MAPREG_TYPE_MEM
| PCI_MAPREG_MEM_TYPE_32BIT, 0,
&bktr->memt, &bktr->memh, NULL,
- &bktr->obmemsz);
+ &bktr->obmemsz, 0);
DPR(("pci_mapreg_map: memt %x, memh %x, size %x\n",
bktr->memt, (u_int)bktr->memh, (u_int)bktr->obmemsz));
if (retval) {
diff --git a/sys/dev/pci/cac_pci.c b/sys/dev/pci/cac_pci.c
index 821fbe4c257..39deca30387 100644
--- a/sys/dev/pci/cac_pci.c
+++ b/sys/dev/pci/cac_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cac_pci.c,v 1.3 2001/04/16 03:18:19 deraadt Exp $ */
+/* $OpenBSD: cac_pci.c,v 1.4 2001/06/12 15:40:30 niklas Exp $ */
/* $NetBSD: cac_pci.c,v 1.10 2001/01/10 16:48:04 ad Exp $ */
/*-
@@ -198,14 +198,14 @@ cac_pci_attach(parent, self, aux)
if (memr != -1) {
if (pci_mapreg_map(pa, memr, PCI_MAPREG_TYPE_MEM, 0,
- &sc->sc_iot, &sc->sc_ioh, NULL, NULL))
+ &sc->sc_iot, &sc->sc_ioh, NULL, NULL, 0))
memr = -1;
else
ior = -1;
}
if (ior != -1)
if (pci_mapreg_map(pa, ior, PCI_MAPREG_TYPE_IO, 0,
- &sc->sc_iot, &sc->sc_ioh, NULL, NULL))
+ &sc->sc_iot, &sc->sc_ioh, NULL, NULL, 0))
ior = -1;
if (memr == -1 && ior == -1) {
printf("%s: can't map i/o or memory space\n", self->dv_xname);
diff --git a/sys/dev/pci/cmpci.c b/sys/dev/pci/cmpci.c
index 9ba82a8034e..8b4013af070 100644
--- a/sys/dev/pci/cmpci.c
+++ b/sys/dev/pci/cmpci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmpci.c,v 1.1 2000/04/27 02:19:41 millert Exp $ */
+/* $OpenBSD: cmpci.c,v 1.2 2001/06/12 15:40:30 niklas Exp $ */
/*
* Copyright (c) 2000 Takuya SHIOZAKI
@@ -323,7 +323,7 @@ cmpci_attach(parent, self, aux)
/* map I/O space */
if (pci_mapreg_map(pa, CMPCI_PCI_IOBASEREG, PCI_MAPREG_TYPE_IO, 0,
- &sc->sc_iot, &sc->sc_ioh, NULL, NULL)) {
+ &sc->sc_iot, &sc->sc_ioh, NULL, NULL, 0)) {
printf("\n%s: failed to map I/O space\n", sc->sc_dev.dv_xname);
return;
}
diff --git a/sys/dev/pci/cs4280.c b/sys/dev/pci/cs4280.c
index 6413b8ca64a..42c31754021 100644
--- a/sys/dev/pci/cs4280.c
+++ b/sys/dev/pci/cs4280.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cs4280.c,v 1.8 2001/05/02 21:13:37 marc Exp $ */
+/* $OpenBSD: cs4280.c,v 1.9 2001/06/12 15:40:30 niklas Exp $ */
/* $NetBSD: cs4280.c,v 1.5 2000/06/26 04:56:23 simonb Exp $ */
/*
@@ -575,13 +575,13 @@ cs4280_attach(parent, self, aux)
/* Map I/O register */
if (pci_mapreg_map(pa, CSCC_PCI_BA0,
PCI_MAPREG_TYPE_MEM | PCI_MAPREG_MEM_TYPE_32BIT, 0,
- &sc->ba0t, &sc->ba0h, NULL, NULL)) {
+ &sc->ba0t, &sc->ba0h, NULL, NULL, 0)) {
printf(": can't map BA0 space\n");
return;
}
if (pci_mapreg_map(pa, CSCC_PCI_BA1,
PCI_MAPREG_TYPE_MEM | PCI_MAPREG_MEM_TYPE_32BIT, 0,
- &sc->ba1t, &sc->ba1h, NULL, NULL)) {
+ &sc->ba1t, &sc->ba1h, NULL, NULL, 0)) {
printf(": can't map BA1 space\n");
return;
}
diff --git a/sys/dev/pci/cs4281.c b/sys/dev/pci/cs4281.c
index a7193e147e9..fead8db04e3 100644
--- a/sys/dev/pci/cs4281.c
+++ b/sys/dev/pci/cs4281.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cs4281.c,v 1.2 2001/02/09 21:15:22 aaron Exp $ */
+/* $OpenBSD: cs4281.c,v 1.3 2001/06/12 15:40:30 niklas Exp $ */
/* $Tera: cs4281.c,v 1.18 2000/12/27 14:24:45 tacha Exp $ */
/*
@@ -306,13 +306,13 @@ cs4281_attach(parent, self, aux)
/* Map I/O register */
if (pci_mapreg_map(pa, CSCC_PCI_BA0,
PCI_MAPREG_TYPE_MEM|PCI_MAPREG_MEM_TYPE_32BIT, 0, &sc->ba0t,
- &sc->ba0h, NULL, NULL)) {
+ &sc->ba0h, NULL, NULL, 0)) {
printf("%s: can't map BA0 space\n", sc->sc_dev.dv_xname);
return;
}
if (pci_mapreg_map(pa, CSCC_PCI_BA1,
PCI_MAPREG_TYPE_MEM|PCI_MAPREG_MEM_TYPE_32BIT, 0, &sc->ba1t,
- &sc->ba1h, NULL, NULL)) {
+ &sc->ba1h, NULL, NULL, 0)) {
printf("%s: can't map BA1 space\n", sc->sc_dev.dv_xname);
return;
}
diff --git a/sys/dev/pci/dpt_pci.c b/sys/dev/pci/dpt_pci.c
index 82182436a9d..bc35287800f 100644
--- a/sys/dev/pci/dpt_pci.c
+++ b/sys/dev/pci/dpt_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dpt_pci.c,v 1.1 1999/11/30 07:55:56 cmetz Exp $ */
+/* $OpenBSD: dpt_pci.c,v 1.2 2001/06/12 15:40:30 niklas Exp $ */
/* $NetBSD: dpt_pci.c,v 1.2 1999/09/29 17:33:02 ad Exp $ */
/*
@@ -117,7 +117,7 @@ dpt_pci_attach(parent, self, aux)
printf(": ");
if (pci_mapreg_map(pa, PCI_CBIO, PCI_MAPREG_TYPE_IO, 0, &sc->sc_iot,
- &sc->sc_ioh, NULL, NULL)) {
+ &sc->sc_ioh, NULL, NULL, 0)) {
printf("can't map i/o space\n");
return;
}
diff --git a/sys/dev/pci/eap.c b/sys/dev/pci/eap.c
index e50967c30dc..12c70c7707c 100644
--- a/sys/dev/pci/eap.c
+++ b/sys/dev/pci/eap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: eap.c,v 1.10 2000/08/16 14:13:13 kevlo Exp $ */
+/* $OpenBSD: eap.c,v 1.11 2001/06/12 15:40:30 niklas Exp $ */
/* $NetBSD: eap.c,v 1.25 1999/02/18 07:59:30 mycroft Exp $ */
/*
@@ -779,7 +779,7 @@ eap_attach(parent, self, aux)
/* Map I/O register */
if (pci_mapreg_map(pa, PCI_CBIO, PCI_MAPREG_TYPE_IO, 0,
- &sc->iot, &sc->ioh, NULL, NULL)) {
+ &sc->iot, &sc->ioh, NULL, NULL, 0)) {
printf("\n%s: can't map i/o space\n", sc->sc_dev.dv_xname);
return;
}
diff --git a/sys/dev/pci/eso.c b/sys/dev/pci/eso.c
index 077db30c9a9..ba98aa72fd2 100644
--- a/sys/dev/pci/eso.c
+++ b/sys/dev/pci/eso.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: eso.c,v 1.10 2000/07/19 09:04:38 csapuntz Exp $ */
+/* $OpenBSD: eso.c,v 1.11 2001/06/12 15:40:30 niklas Exp $ */
/* $NetBSD: eso.c,v 1.3 1999/08/02 17:37:43 augustss Exp $ */
/*
@@ -247,28 +247,28 @@ eso_attach(parent, self, aux)
/* Map I/O registers. */
if (pci_mapreg_map(pa, ESO_PCI_BAR_IO, PCI_MAPREG_TYPE_IO, 0,
- &sc->sc_iot, &sc->sc_ioh, NULL, NULL)) {
+ &sc->sc_iot, &sc->sc_ioh, NULL, NULL, 0)) {
printf(", can't map I/O space\n");
return;
}
if (pci_mapreg_map(pa, ESO_PCI_BAR_SB, PCI_MAPREG_TYPE_IO, 0,
- &sc->sc_sb_iot, &sc->sc_sb_ioh, NULL, NULL)) {
+ &sc->sc_sb_iot, &sc->sc_sb_ioh, NULL, NULL, 0)) {
printf(", can't map SB I/O space\n");
return;
}
if (pci_mapreg_map(pa, ESO_PCI_BAR_VC, PCI_MAPREG_TYPE_IO, 0,
- &sc->sc_dmac_iot, &sc->sc_dmac_ioh, &vcbase, &sc->sc_vcsize)) {
+ &sc->sc_dmac_iot, &sc->sc_dmac_ioh, &vcbase, &sc->sc_vcsize, 0)) {
vcbase = 0;
sc->sc_vcsize = 0x10; /* From the data sheet. */
}
if (pci_mapreg_map(pa, ESO_PCI_BAR_MPU, PCI_MAPREG_TYPE_IO, 0,
- &sc->sc_mpu_iot, &sc->sc_mpu_ioh, NULL, NULL)) {
+ &sc->sc_mpu_iot, &sc->sc_mpu_ioh, NULL, NULL, 0)) {
printf(", can't map MPU I/O space\n");
return;
}
if (pci_mapreg_map(pa, ESO_PCI_BAR_GAME, PCI_MAPREG_TYPE_IO, 0,
- &sc->sc_game_iot, &sc->sc_game_ioh, NULL, NULL)) {
+ &sc->sc_game_iot, &sc->sc_game_ioh, NULL, NULL, 0)) {
printf(", can't map Game I/O space\n");
return;
}
diff --git a/sys/dev/pci/fms.c b/sys/dev/pci/fms.c
index e15c3ae03f7..a07a88eb326 100644
--- a/sys/dev/pci/fms.c
+++ b/sys/dev/pci/fms.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fms.c,v 1.2 2000/10/14 18:04:07 aaron Exp $ */
+/* $OpenBSD: fms.c,v 1.3 2001/06/12 15:40:30 niklas Exp $ */
/* $NetBSD: fms.c,v 1.5.4.1 2000/06/30 16:27:50 simonb Exp $ */
/*-
@@ -277,7 +277,7 @@ fms_attach(parent, self, aux)
printf("%s: interrupting at %s\n", sc->sc_dev.dv_xname, intrstr);
if (pci_mapreg_map(pa, 0x10, PCI_MAPREG_TYPE_IO, 0, &sc->sc_iot,
- &sc->sc_ioh, &sc->sc_ioaddr, &sc->sc_iosize)) {
+ &sc->sc_ioh, &sc->sc_ioaddr, &sc->sc_iosize, 0)) {
printf("%s: can't map i/o space\n", sc->sc_dev.dv_xname);
return;
}
diff --git a/sys/dev/pci/gdt_pci.c b/sys/dev/pci/gdt_pci.c
index ea475b0d1f4..195c265def9 100644
--- a/sys/dev/pci/gdt_pci.c
+++ b/sys/dev/pci/gdt_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gdt_pci.c,v 1.10 2001/05/07 19:43:14 deraadt Exp $ */
+/* $OpenBSD: gdt_pci.c,v 1.11 2001/06/12 15:40:30 niklas Exp $ */
/*
* Copyright (c) 1999, 2000 Niklas Hallqvist. All rights reserved.
@@ -247,12 +247,12 @@ gdt_pci_attach(parent, self, aux)
if (pci_mapreg_map(pa,
GDT_CLASS(gdt) == GDT_PCINEW ? GDT_PCINEW_DPMEM : GDT_PCI_DPMEM,
PCI_MAPREG_TYPE_MEM | PCI_MAPREG_MEM_TYPE_32BIT, 0, &dpmemt,
- &dpmemh, &dpmembase, &dpmemsize)) {
+ &dpmemh, &dpmembase, &dpmemsize, 0)) {
if (pci_mapreg_map(pa,
GDT_CLASS(gdt) == GDT_PCINEW ? GDT_PCINEW_DPMEM :
GDT_PCI_DPMEM,
PCI_MAPREG_TYPE_MEM | PCI_MAPREG_MEM_TYPE_32BIT_1M, 0,
- &dpmemt,&dpmemh, &dpmembase, &dpmemsize)) {
+ &dpmemt,&dpmemh, &dpmembase, &dpmemsize, 0)) {
printf("cannot map DPMEM\n");
goto bail_out;
}
@@ -268,14 +268,14 @@ gdt_pci_attach(parent, self, aux)
*/
if (GDT_CLASS(gdt) == GDT_PCINEW) {
if (pci_mapreg_map(pa, GDT_PCINEW_IOMEM, PCI_MAPREG_TYPE_MEM,
- 0, &iomemt, &iomemh, &iomembase, &iomemsize)) {
+ 0, &iomemt, &iomemh, &iomembase, &iomemsize, 0)) {
printf("cannot map memory mapped I/O ports\n");
goto bail_out;
}
status |= IOMEM_MAPPED;
if (pci_mapreg_map(pa, GDT_PCINEW_IO, PCI_MAPREG_TYPE_IO, 0,
- &iot, &ioh, &iobase, &iosize)) {
+ &iot, &ioh, &iobase, &iosize, 0)) {
printf("cannot map I/O ports\n");
goto bail_out;
}
diff --git a/sys/dev/pci/hifn7751.c b/sys/dev/pci/hifn7751.c
index 8589432aaf2..d332860ea7d 100644
--- a/sys/dev/pci/hifn7751.c
+++ b/sys/dev/pci/hifn7751.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hifn7751.c,v 1.65 2001/05/14 22:29:28 jason Exp $ */
+/* $OpenBSD: hifn7751.c,v 1.66 2001/06/12 15:40:31 niklas Exp $ */
/*
* Invertex AEON / Hi/fn 7751 driver
@@ -165,13 +165,13 @@ hifn_attach(parent, self, aux)
}
if (pci_mapreg_map(pa, HIFN_BAR0, PCI_MAPREG_TYPE_MEM, 0,
- &sc->sc_st0, &sc->sc_sh0, NULL, &iosize0)) {
+ &sc->sc_st0, &sc->sc_sh0, NULL, &iosize0, 0)) {
printf(": can't find mem space %d\n", 0);
return;
}
if (pci_mapreg_map(pa, HIFN_BAR1, PCI_MAPREG_TYPE_MEM, 0,
- &sc->sc_st1, &sc->sc_sh1, NULL, &iosize1)) {
+ &sc->sc_st1, &sc->sc_sh1, NULL, &iosize1, 0)) {
printf(": can't find mem space %d\n", 1);
goto fail_io0;
}
diff --git a/sys/dev/pci/i82365_pci.c b/sys/dev/pci/i82365_pci.c
index fe4a8553faf..92faced02ea 100644
--- a/sys/dev/pci/i82365_pci.c
+++ b/sys/dev/pci/i82365_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: i82365_pci.c,v 1.3 2000/09/04 17:07:52 mickey Exp $ */
+/* $OpenBSD: i82365_pci.c,v 1.4 2001/06/12 15:40:31 niklas Exp $ */
/* $NetBSD: i82365_pci.c,v 1.11 2000/02/24 03:42:44 itohy Exp $ */
/*
@@ -124,7 +124,7 @@ pcic_pci_attach(parent, self, aux)
int irq, i;
if (pci_mapreg_map(pa, PCI_CBIO, PCI_MAPREG_TYPE_IO, 0,
- &sc->iot, &sc->ioh, NULL, &size)) {
+ &sc->iot, &sc->ioh, NULL, &size, 0)) {
printf(": can't map i/o space\n");
return;
}
diff --git a/sys/dev/pci/if_an_pci.c b/sys/dev/pci/if_an_pci.c
index 1b8afa8e77b..4f6c7e71dd7 100644
--- a/sys/dev/pci/if_an_pci.c
+++ b/sys/dev/pci/if_an_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_an_pci.c,v 1.2 2000/04/10 18:09:46 millert Exp $ */
+/* $OpenBSD: if_an_pci.c,v 1.3 2001/06/12 15:40:31 niklas Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -119,7 +119,7 @@ an_pci_attach(parent, self, aux)
/* Map the I/O ports. */
if (pci_mapreg_map(pa, AN_PCI_LOIO, PCI_MAPREG_TYPE_IO, 0,
- &iot, &ioh, NULL, NULL) != 0) {
+ &iot, &ioh, NULL, NULL, 0) != 0) {
printf(": can't map I/O space\n");
return;
}
diff --git a/sys/dev/pci/if_de.c b/sys/dev/pci/if_de.c
index 25a84dd719b..272b2d13f3e 100644
--- a/sys/dev/pci/if_de.c
+++ b/sys/dev/pci/if_de.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_de.c,v 1.45 2001/05/05 20:56:58 art Exp $ */
+/* $OpenBSD: if_de.c,v 1.46 2001/06/12 15:40:31 niklas Exp $ */
/* $NetBSD: if_de.c,v 1.45 1997/06/09 00:34:18 thorpej Exp $ */
/*-
@@ -5419,10 +5419,10 @@ tulip_pci_attach(
csr_base = 0;
ioh_valid = (pci_mapreg_map(pa, PCI_CBIO, PCI_MAPREG_TYPE_IO, 0,
- &iot, &ioh, NULL, NULL) == 0);
+ &iot, &ioh, NULL, NULL, 0) == 0);
memh_valid = (pci_mapreg_map(pa, PCI_CBMA,
PCI_MAPREG_TYPE_MEM | PCI_MAPREG_MEM_TYPE_32BIT, 0,
- &memt, &memh, NULL, NULL) == 0);
+ &memt, &memh, NULL, NULL, 0) == 0);
#endif
#if defined(__OpenBSD__) || defined(__NetBSD__)
diff --git a/sys/dev/pci/if_lmc_obsd.c b/sys/dev/pci/if_lmc_obsd.c
index 6ca70c4c002..0f46fda439d 100644
--- a/sys/dev/pci/if_lmc_obsd.c
+++ b/sys/dev/pci/if_lmc_obsd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_lmc_obsd.c,v 1.6 2001/02/22 02:01:53 chris Exp $ */
+/* $OpenBSD: if_lmc_obsd.c,v 1.7 2001/06/12 15:40:31 niklas Exp $ */
/* $NetBSD: if_lmc_nbsd.c,v 1.1 1999/03/25 03:32:43 explorer Exp $ */
/*-
@@ -303,12 +303,10 @@ lmc_pci_attach(struct device * const parent,
#if defined(__NetBSD__) || defined(__OpenBSD__)
ioh_valid = (pci_mapreg_map(pa, PCI_CBIO, PCI_MAPREG_TYPE_IO,
- 0, &iot, &ioh, NULL, NULL) == 0);
+ 0, &iot, &ioh, NULL, NULL, 0) == 0);
memh_valid = (pci_mapreg_map(pa, PCI_CBMA,
- PCI_MAPREG_TYPE_MEM |
- PCI_MAPREG_MEM_TYPE_32BIT,
- 0, &memt, &memh, NULL,
- NULL) == 0);
+ PCI_MAPREG_TYPE_MEM | PCI_MAPREG_MEM_TYPE_32BIT, 0, &memt,
+ &memh, NULL, NULL, 0) == 0);
#endif
diff --git a/sys/dev/pci/if_ne_pci.c b/sys/dev/pci/if_ne_pci.c
index 5bd92585fa9..9ec7a27b4ed 100644
--- a/sys/dev/pci/if_ne_pci.c
+++ b/sys/dev/pci/if_ne_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ne_pci.c,v 1.8 2001/03/12 05:37:00 aaron Exp $ */
+/* $OpenBSD: if_ne_pci.c,v 1.9 2001/06/12 15:40:31 niklas Exp $ */
/* $NetBSD: if_ne_pci.c,v 1.8 1998/07/05 00:51:24 jonathan Exp $ */
/*-
@@ -213,7 +213,7 @@ ne_pci_attach(parent, self, aux)
#ifdef __NetBSD__
if (pci_mapreg_map(pa, PCI_CBIO, PCI_MAPREG_TYPE_IO, 0,
- &nict, &nich, NULL, NULL)) {
+ &nict, &nich, NULL, NULL, 0)) {
printf(": can't map i/o space\n");
return;
}
diff --git a/sys/dev/pci/if_tx.c b/sys/dev/pci/if_tx.c
index ae978d24e1e..770eefda1d4 100644
--- a/sys/dev/pci/if_tx.c
+++ b/sys/dev/pci/if_tx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_tx.c,v 1.14 2001/03/22 01:38:54 angelos Exp $ */
+/* $OpenBSD: if_tx.c,v 1.15 2001/06/12 15:40:31 niklas Exp $ */
/* $FreeBSD: src/sys/pci/if_tx.c,v 1.45 2001/02/07 20:11:02 semenu Exp $ */
/*-
@@ -243,13 +243,13 @@ epic_openbsd_attach(
if (command & PCI_COMMAND_MEM_ENABLE) {
if (pci_mapreg_map(pa, PCI_BASEMEM, PCI_MAPREG_TYPE_MEM, 0,
- &sc->sc_st, &sc->sc_sh, NULL, &iosize)) {
+ &sc->sc_st, &sc->sc_sh, NULL, &iosize, 0)) {
printf(": can't map mem space\n");
return;
}
} else {
if (pci_mapreg_map(pa, PCI_BASEIO, PCI_MAPREG_TYPE_IO, 0,
- &sc->sc_st, &sc->sc_sh, NULL, &iosize)) {
+ &sc->sc_st, &sc->sc_sh, NULL, &iosize, 0)) {
printf(": can't map i/o space\n");
return;
}
diff --git a/sys/dev/pci/if_txp.c b/sys/dev/pci/if_txp.c
index 9e9e39dcf9a..06f25671780 100644
--- a/sys/dev/pci/if_txp.c
+++ b/sys/dev/pci/if_txp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_txp.c,v 1.40 2001/06/05 02:15:19 jason Exp $ */
+/* $OpenBSD: if_txp.c,v 1.41 2001/06/12 15:40:31 niklas Exp $ */
/*
* Copyright (c) 2001
@@ -191,7 +191,7 @@ txp_attach(parent, self, aux)
return;
}
if (pci_mapreg_map(pa, TXP_PCI_LOMEM, PCI_MAPREG_TYPE_MEM, 0,
- &sc->sc_bt, &sc->sc_bh, NULL, &iosize)) {
+ &sc->sc_bt, &sc->sc_bh, NULL, &iosize, 0)) {
printf(": can't map mem space %d\n", 0);
return;
}
diff --git a/sys/dev/pci/if_wi_pci.c b/sys/dev/pci/if_wi_pci.c
index b7f0d8a9bce..92ecbd9623e 100644
--- a/sys/dev/pci/if_wi_pci.c
+++ b/sys/dev/pci/if_wi_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_wi_pci.c,v 1.3 2001/06/11 00:50:38 millert Exp $ */
+/* $OpenBSD: if_wi_pci.c,v 1.4 2001/06/12 15:40:31 niklas Exp $ */
/*
* Copyright (c) 2001 Todd C. Miller <Todd.Miller@courtesan.com>
@@ -165,12 +165,12 @@ wi_pci_attach(parent, self, aux)
/* Map memory and I/O registers. */
if (pci_mapreg_map(pa, WI_PCI_LOMEM, PCI_MAPREG_TYPE_MEM, 0,
- &memt, &memh, NULL, NULL) != 0) {
+ &memt, &memh, NULL, NULL, 0) != 0) {
printf(": can't map mem space\n");
return;
}
if (pci_mapreg_map(pa, WI_PCI_LOIO, PCI_MAPREG_TYPE_IO, 0,
- &iot, &ioh, NULL, NULL) != 0) {
+ &iot, &ioh, NULL, NULL, 0) != 0) {
printf(": can't map I/O space\n");
return;
}
diff --git a/sys/dev/pci/if_wx.c b/sys/dev/pci/if_wx.c
index 104c2a21bc3..f3488d5002a 100644
--- a/sys/dev/pci/if_wx.c
+++ b/sys/dev/pci/if_wx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_wx.c,v 1.11 2001/04/13 00:27:57 mjacob Exp $ */
+/* $OpenBSD: if_wx.c,v 1.12 2001/06/12 15:40:31 niklas Exp $ */
/*
* Principal Author: Matthew Jacob
* Copyright (c) 1999, 2001 by Traakan Software
@@ -226,7 +226,7 @@ wx_attach(struct device *parent, struct device *self, void *aux)
* Map control/status registers.
*/
if (pci_mapreg_map(pa, WX_MMBA, PCI_MAPREG_TYPE_MEM, 0,
- &sc->w.st, &sc->w.sh, NULL, NULL)) {
+ &sc->w.st, &sc->w.sh, NULL, NULL, 0)) {
printf(": can't map registers\n");
return;
}
diff --git a/sys/dev/pci/iha_pci.c b/sys/dev/pci/iha_pci.c
index ae3bbb3c14b..ddbf4fae032 100644
--- a/sys/dev/pci/iha_pci.c
+++ b/sys/dev/pci/iha_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: iha_pci.c,v 1.2 2001/03/29 23:53:38 krw Exp $ */
+/* $OpenBSD: iha_pci.c,v 1.3 2001/06/12 15:40:32 niklas Exp $ */
/*
* Initio INI-9xxxU/UW SCSI Device Driver
*
@@ -103,7 +103,7 @@ iha_pci_attach(parent, self, aux)
* rather that IO mapping, but it didn't work at all..
*/
ioh_valid = pci_mapreg_map(pa, PCI_MAPREG_START, PCI_MAPREG_TYPE_IO, 0,
- &iot, &ioh, NULL, NULL);
+ &iot, &ioh, NULL, NULL, 0);
if (ioh_valid != 0) {
printf("%s: unable to map registers\n", sc->sc_dev.dv_xname);
diff --git a/sys/dev/pci/ises.c b/sys/dev/pci/ises.c
index f4a5a65f505..1d302121f8d 100644
--- a/sys/dev/pci/ises.c
+++ b/sys/dev/pci/ises.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ises.c,v 1.6 2001/06/05 15:32:27 ho Exp $ */
+/* $OpenBSD: ises.c,v 1.7 2001/06/12 15:40:32 niklas Exp $ */
/*
* Copyright (c) 2000, 2001 Håkan Olsson (ho@crt.se)
@@ -186,7 +186,7 @@ ises_attach(struct device *parent, struct device *self, void *aux)
/* Map control/status registers. */
if (pci_mapreg_map(pa, PCI_MAPREG_START,
PCI_MAPREG_TYPE_MEM | PCI_MAPREG_MEM_TYPE_32BIT, 0, &sc->sc_memt,
- &sc->sc_memh, &membase, &memsize)) {
+ &sc->sc_memh, &membase, &memsize, 0)) {
printf(": can't find mem space\n");
return;
}
diff --git a/sys/dev/pci/maestro.c b/sys/dev/pci/maestro.c
index 2f1f5d2f02d..b95df9e57a9 100644
--- a/sys/dev/pci/maestro.c
+++ b/sys/dev/pci/maestro.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: maestro.c,v 1.6 2001/05/16 19:27:38 mickey Exp $ */
+/* $OpenBSD: maestro.c,v 1.7 2001/06/12 15:40:32 niklas Exp $ */
/* $FreeBSD: /c/ncvs/src/sys/dev/sound/pci/maestro.c,v 1.3 2000/11/21 12:22:11 julian Exp $ */
/*
* FreeBSD's ESS Agogo/Maestro driver
@@ -361,7 +361,7 @@ maestro_attach(parent, self, aux)
/* Map i/o */
if ((error = pci_mapreg_map(pa, PCI_MAPS, PCI_MAPREG_TYPE_IO,
- 0, &sc->iot, &sc->ioh, NULL, NULL)) != 0) {
+ 0, &sc->iot, &sc->ioh, NULL, NULL, 0)) != 0) {
printf(", couldn't map i/o space\n");
goto bad;
};
diff --git a/sys/dev/pci/ncr.c b/sys/dev/pci/ncr.c
index d093efa7094..8a0f3d2ed6c 100644
--- a/sys/dev/pci/ncr.c
+++ b/sys/dev/pci/ncr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ncr.c,v 1.56 2001/05/16 19:31:40 mickey Exp $ */
+/* $OpenBSD: ncr.c,v 1.57 2001/06/12 15:40:32 niklas Exp $ */
/* $NetBSD: ncr.c,v 1.63 1997/09/23 02:39:15 perry Exp $ */
/**************************************************************************
@@ -1464,7 +1464,7 @@ static void ncr_attach (pcici_t tag, int unit);
#if 0
static char ident[] =
- "\n$OpenBSD: ncr.c,v 1.56 2001/05/16 19:31:40 mickey Exp $\n";
+ "\n$OpenBSD: ncr.c,v 1.57 2001/06/12 15:40:32 niklas Exp $\n";
#endif
static const u_long ncr_version = NCR_VERSION * 11
@@ -3675,12 +3675,11 @@ ncr_attach(parent, self, aux)
** virtual and physical memory.
*/
- ioh_valid = (pci_mapreg_map(pa, 0x10,
- PCI_MAPREG_TYPE_IO, 0,
- &iot, &ioh, &ioaddr, NULL) == 0);
+ ioh_valid = (pci_mapreg_map(pa, 0x10, PCI_MAPREG_TYPE_IO, 0,
+ &iot, &ioh, &ioaddr, NULL, 0) == 0);
memh_valid = (pci_mapreg_map(pa, 0x14,
PCI_MAPREG_TYPE_MEM | PCI_MAPREG_MEM_TYPE_32BIT, 0,
- &memt, &memh, &memaddr, NULL) == 0);
+ &memt, &memh, &memaddr, NULL, 0) == 0);
#if defined(NCR_IOMAPPED)
if (ioh_valid) {
@@ -3995,7 +3994,7 @@ static void ncr_attach (pcici_t config_id, int unit)
if ((np->features & FE_RAM) && sizeof(struct script) <= 4096) {
if (pci_mapreg_map(pa, 0x18,
PCI_MAPREG_TYPE_MEM | PCI_MAPREG_MEM_TYPE_32BIT, 0,
- &memt, &memh, &memaddr, NULL) == 0) {
+ &memt, &memh, &memaddr, NULL, 0) == 0) {
np->ram_tag = memt;
np->ram_handle = memh;
np->paddr2 = memaddr;
diff --git a/sys/dev/pci/neo.c b/sys/dev/pci/neo.c
index 4dbf2daad59..16fba9ab70b 100644
--- a/sys/dev/pci/neo.c
+++ b/sys/dev/pci/neo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: neo.c,v 1.5 2001/03/03 21:29:23 deraadt Exp $ */
+/* $OpenBSD: neo.c,v 1.6 2001/06/12 15:40:32 niklas Exp $ */
/*
* Copyright (c) 1999 Cameron Grant <gandalf@vilnya.demon.co.uk>
@@ -563,14 +563,14 @@ neo_attach(parent, self, aux)
/* Map I/O register */
if (pci_mapreg_map(pa, PCI_MAPS, PCI_MAPREG_TYPE_MEM, 0,
- &sc->bufiot, &sc->bufioh, NULL, NULL)) {
+ &sc->bufiot, &sc->bufioh, NULL, NULL, 0)) {
printf("\n%s: can't map i/o space\n", sc->dev.dv_xname);
return;
}
if (pci_mapreg_map(pa, PCI_MAPS + 4, PCI_MAPREG_TYPE_MEM, 0,
- &sc->regiot, &sc->regioh, NULL, NULL)) {
+ &sc->regiot, &sc->regioh, NULL, NULL, 0)) {
printf("\n%s: can't map i/o space\n", sc->dev.dv_xname);
return;
}
diff --git a/sys/dev/pci/ohci_pci.c b/sys/dev/pci/ohci_pci.c
index 70a2fd1d655..569ad586e1b 100644
--- a/sys/dev/pci/ohci_pci.c
+++ b/sys/dev/pci/ohci_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ohci_pci.c,v 1.9 2001/01/22 22:43:44 deraadt Exp $ */
+/* $OpenBSD: ohci_pci.c,v 1.10 2001/06/12 15:40:32 niklas Exp $ */
/* $NetBSD: ohci_pci.c,v 1.9 1999/05/20 09:52:35 augustss Exp $ */
/*
@@ -110,7 +110,7 @@ ohci_pci_attach(parent, self, aux)
/* Map I/O registers */
if (pci_mapreg_map(pa, PCI_CBMEM, PCI_MAPREG_TYPE_MEM, 0,
- &sc->sc.iot, &sc->sc.ioh, NULL, &sc->sc.sc_size)) {
+ &sc->sc.iot, &sc->sc.ioh, NULL, &sc->sc.sc_size, 0)) {
printf(": can't map mem space\n");
return;
}
diff --git a/sys/dev/pci/pccbb.c b/sys/dev/pci/pccbb.c
index b661b6094cf..956f07f29ca 100644
--- a/sys/dev/pci/pccbb.c
+++ b/sys/dev/pci/pccbb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pccbb.c,v 1.19 2001/05/16 12:51:49 ho Exp $ */
+/* $OpenBSD: pccbb.c,v 1.20 2001/06/12 15:40:32 niklas Exp $ */
/* $NetBSD: pccbb.c,v 1.42 2000/06/16 23:41:35 cgd Exp $ */
/*
@@ -417,16 +417,17 @@ pccbbattach(parent, self, aux)
PCI_MAPREG_MEM_ADDR(sock_base) != 0xfffffff0) {
/* The address must be valid. */
if (pci_mapreg_map(pa, PCI_SOCKBASE, PCI_MAPREG_TYPE_MEM, 0,
- &sc->sc_base_memt, &sc->sc_base_memh, &sockbase, NULL)) {
+ &sc->sc_base_memt, &sc->sc_base_memh, &sockbase, NULL, 0))
+ {
printf("%s: can't map socket base address 0x%x\n",
sc->sc_dev.dv_xname, sock_base);
/*
* I think it's funny: socket base registers must be
* mapped on memory space, but ...
*/
- if (pci_mapreg_map(pa, PCI_SOCKBASE, PCI_MAPREG_TYPE_IO,
- 0, &sc->sc_base_memt, &sc->sc_base_memh, &sockbase,
- NULL)) {
+ if (pci_mapreg_map(pa, PCI_SOCKBASE,
+ PCI_MAPREG_TYPE_IO, 0, &sc->sc_base_memt,
+ &sc->sc_base_memh, &sockbase, NULL, 0)) {
printf("%s: can't map socket base address"
" 0x%lx: io mode\n", sc->sc_dev.dv_xname,
sockbase);
@@ -1282,7 +1283,7 @@ struct cb_poll_str {
static struct cb_poll_str cb_poll[10];
static int cb_poll_n = 0;
-static void cb_pcmcia_poll __P((void *arg));
+STATIC void cb_pcmcia_poll __P((void *arg));
void
cb_pcmcia_poll(arg)
@@ -2679,7 +2680,7 @@ struct pccbb_poll_str {
static struct pccbb_poll_str pccbb_poll[10];
static int pccbb_poll_n = 0;
-static void pccbb_pcmcia_poll __P((void *arg));
+STATIC void pccbb_pcmcia_poll __P((void *arg));
void
pccbb_pcmcia_poll(arg)
diff --git a/sys/dev/pci/pci_map.c b/sys/dev/pci/pci_map.c
index 67e36544287..242de880c92 100644
--- a/sys/dev/pci/pci_map.c
+++ b/sys/dev/pci/pci_map.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pci_map.c,v 1.4 2000/09/20 17:39:04 niklas Exp $ */
+/* $OpenBSD: pci_map.c,v 1.5 2001/06/12 15:40:32 niklas Exp $ */
/* $NetBSD: pci_map.c,v 1.7 2000/05/10 16:58:42 thorpej Exp $ */
/*-
@@ -277,7 +277,7 @@ pci_mapreg_info(pc, tag, reg, type, basep, sizep, flagsp)
}
int
-pci_mapreg_map(pa, reg, type, busflags, tagp, handlep, basep, sizep)
+pci_mapreg_map(pa, reg, type, busflags, tagp, handlep, basep, sizep, maxsize)
struct pci_attach_args *pa;
int reg, busflags;
pcireg_t type;
@@ -285,6 +285,7 @@ pci_mapreg_map(pa, reg, type, busflags, tagp, handlep, basep, sizep)
bus_space_handle_t *handlep;
bus_addr_t *basep;
bus_size_t *sizep;
+ bus_size_t maxsize;
{
bus_space_tag_t tag;
bus_space_handle_t handle;
@@ -308,16 +309,25 @@ pci_mapreg_map(pa, reg, type, busflags, tagp, handlep, basep, sizep)
tag = pa->pa_memt;
}
+ /* The caller can request limitation of the mapping's size. */
+ if (maxsize != 0 && size > maxsize) {
+#ifdef DEBUG
+ printf("pci_mapreg_map: limited PCI mapping from %lx to %lx\n",
+ (u_long)size, (u_long)maxsize):
+#endif
+ size = maxsize;
+ }
+
if (bus_space_map(tag, base, size, busflags | flags, &handle))
return (1);
- if (tagp != 0)
+ if (tagp != NULL)
*tagp = tag;
- if (handlep != 0)
+ if (handlep != NULL)
*handlep = handle;
- if (basep != 0)
+ if (basep != NULL)
*basep = base;
- if (sizep != 0)
+ if (sizep != NULL)
*sizep = size;
return (0);
diff --git a/sys/dev/pci/pciide.c b/sys/dev/pci/pciide.c
index bf54c0e99c7..82965b3cf87 100644
--- a/sys/dev/pci/pciide.c
+++ b/sys/dev/pci/pciide.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pciide.c,v 1.52 2001/05/22 15:32:38 ho Exp $ */
+/* $OpenBSD: pciide.c,v 1.53 2001/06/12 15:40:32 niklas Exp $ */
/* $NetBSD: pciide.c,v 1.110 2001/03/20 17:56:46 bouyer Exp $ */
/*
@@ -685,7 +685,7 @@ pciide_mapregs_native(pa, cp, cmdsizep, ctlsizep, pci_intr)
cp->ih = sc->sc_pci_ih;
if (pci_mapreg_map(pa, PCIIDE_REG_CMD_BASE(wdc_cp->channel),
PCI_MAPREG_TYPE_IO, 0,
- &wdc_cp->cmd_iot, &wdc_cp->cmd_ioh, NULL, cmdsizep) != 0) {
+ &wdc_cp->cmd_iot, &wdc_cp->cmd_ioh, NULL, cmdsizep, 0) != 0) {
printf("%s: couldn't map %s cmd regs\n",
sc->sc_wdcdev.sc_dev.dv_xname, cp->name);
return 0;
@@ -693,7 +693,7 @@ pciide_mapregs_native(pa, cp, cmdsizep, ctlsizep, pci_intr)
if (pci_mapreg_map(pa, PCIIDE_REG_CTL_BASE(wdc_cp->channel),
PCI_MAPREG_TYPE_IO, 0,
- &wdc_cp->ctl_iot, &cp->ctl_baseioh, NULL, ctlsizep) != 0) {
+ &wdc_cp->ctl_iot, &cp->ctl_baseioh, NULL, ctlsizep, 0) != 0) {
printf("%s: couldn't map %s ctl regs\n",
sc->sc_wdcdev.sc_dev.dv_xname, cp->name);
bus_space_unmap(wdc_cp->cmd_iot, wdc_cp->cmd_ioh, *cmdsizep);
@@ -762,7 +762,7 @@ pciide_mapreg_dma(sc, pa)
case PCI_MAPREG_MEM_TYPE_32BIT:
sc->sc_dma_ok = (pci_mapreg_map(pa,
PCIIDE_REG_BUS_MASTER_DMA, maptype, 0,
- &sc->sc_dma_iot, &sc->sc_dma_ioh, NULL, NULL) == 0);
+ &sc->sc_dma_iot, &sc->sc_dma_ioh, NULL, NULL, 0) == 0);
sc->sc_dmat = pa->pa_dmat;
if (sc->sc_dma_ok == 0) {
printf(", unused (couldn't map registers)");
diff --git a/sys/dev/pci/pcivar.h b/sys/dev/pci/pcivar.h
index 9ea59b9cbfd..bc11ab3917b 100644
--- a/sys/dev/pci/pcivar.h
+++ b/sys/dev/pci/pcivar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pcivar.h,v 1.18 2000/06/09 16:09:09 chris Exp $ */
+/* $OpenBSD: pcivar.h,v 1.19 2001/06/12 15:40:33 niklas Exp $ */
/* $NetBSD: pcivar.h,v 1.23 1997/06/06 23:48:05 thorpej Exp $ */
/*
@@ -167,7 +167,7 @@ int pci_mapreg_info __P((pci_chipset_tag_t, pcitag_t, int, pcireg_t,
bus_addr_t *, bus_size_t *, int *));
int pci_mapreg_map __P((struct pci_attach_args *, int, pcireg_t, int,
bus_space_tag_t *, bus_space_handle_t *, bus_addr_t *,
- bus_size_t *));
+ bus_size_t *, bus_size_t));
int pci_io_find __P((pci_chipset_tag_t, pcitag_t, int, bus_addr_t *,
diff --git a/sys/dev/pci/pcscp.c b/sys/dev/pci/pcscp.c
index 3abd673075f..4f79e4ea736 100644
--- a/sys/dev/pci/pcscp.c
+++ b/sys/dev/pci/pcscp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pcscp.c,v 1.2 2001/02/14 06:37:01 fgsch Exp $ */
+/* $OpenBSD: pcscp.c,v 1.3 2001/06/12 15:40:33 niklas Exp $ */
/* $NetBSD: pcscp.c,v 1.11 2000/11/14 18:42:58 thorpej Exp $ */
/*-
@@ -188,13 +188,12 @@ pcscp_attach(parent, self, aux)
bus_dma_segment_t seg;
int error, rseg;
- ioh_valid = (pci_mapreg_map(pa, IO_MAP_REG,
- PCI_MAPREG_TYPE_IO, 0,
- &iot, &ioh, NULL, NULL) == 0);
+ ioh_valid = (pci_mapreg_map(pa, IO_MAP_REG, PCI_MAPREG_TYPE_IO, 0,
+ &iot, &ioh, NULL, NULL, 0) == 0);
#if 0 /* XXX cannot use memory map? */
memh_valid = (pci_mapreg_map(pa, MEM_MAP_REG,
PCI_MAPREG_TYPE_MEM | PCI_MAPREG_MEM_TYPE_32BIT, 0,
- &memt, &memh, NULL, NULL) == 0);
+ &memt, &memh, NULL, NULL, 0) == 0);
#else
memh_valid = 0;
#endif
diff --git a/sys/dev/pci/puc.c b/sys/dev/pci/puc.c
index 5db8e0450c9..44cc94dbcc9 100644
--- a/sys/dev/pci/puc.c
+++ b/sys/dev/pci/puc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: puc.c,v 1.3 2001/03/15 17:52:19 deraadt Exp $ */
+/* $OpenBSD: puc.c,v 1.4 2001/06/12 15:40:33 niklas Exp $ */
/* $NetBSD: puc.c,v 1.3 1999/02/06 06:29:54 cgd Exp $ */
/*
@@ -202,11 +202,10 @@ puc_attach(parent, self, aux)
type = (PCI_MAPREG_TYPE(bar) == PCI_MAPREG_TYPE_IO ?
PCI_MAPREG_TYPE_IO : PCI_MAPREG_MEM_TYPE(bar));
-
sc->sc_bar_mappings[i].mapped = (pci_mapreg_map(pa,
PCI_MAPREG_START + 4 * i, type, 0,
&sc->sc_bar_mappings[i].t, &sc->sc_bar_mappings[i].h,
- &sc->sc_bar_mappings[i].a, &sc->sc_bar_mappings[i].s)
+ &sc->sc_bar_mappings[i].a, &sc->sc_bar_mappings[i].s, 0)
== 0);
if (sc->sc_bar_mappings[i].mapped)
continue;
diff --git a/sys/dev/pci/siop_pci_common.c b/sys/dev/pci/siop_pci_common.c
index f7c86f36842..b3695fde9b8 100644
--- a/sys/dev/pci/siop_pci_common.c
+++ b/sys/dev/pci/siop_pci_common.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: siop_pci_common.c,v 1.5 2001/04/15 06:01:30 krw Exp $ */
+/* $OpenBSD: siop_pci_common.c,v 1.6 2001/06/12 15:40:33 niklas Exp $ */
/* $NetBSD: siop_pci_common.c,v 1.6 2001/01/10 15:50:20 thorpej Exp $ */
/*
@@ -228,14 +228,14 @@ siop_pci_attach_common(sc, pa)
case PCI_MAPREG_TYPE_MEM | PCI_MAPREG_MEM_TYPE_32BIT:
case PCI_MAPREG_TYPE_MEM | PCI_MAPREG_MEM_TYPE_64BIT:
memh_valid = (pci_mapreg_map(pa, 0x14, memtype, 0,
- &memt, &memh, &memaddr, NULL) == 0);
+ &memt, &memh, &memaddr, NULL, 0) == 0);
break;
default:
memh_valid = 0;
}
ioh_valid = (pci_mapreg_map(pa, 0x10, PCI_MAPREG_TYPE_IO, 0,
- &iot, &ioh, &ioaddr, NULL) == 0);
+ &iot, &ioh, &ioaddr, NULL, 0) == 0);
if (memh_valid) {
sc->siop.sc_rt = memt;
@@ -263,7 +263,7 @@ siop_pci_attach_common(sc, pa)
}
if (pci_mapreg_map(pa, bar, memtype, 0,
&sc->siop.sc_ramt, &sc->siop.sc_ramh,
- &sc->siop.sc_scriptaddr, NULL) != 0)
+ &sc->siop.sc_scriptaddr, NULL, 0) != 0)
sc->siop.features &= ~SF_CHIP_RAM;
}
diff --git a/sys/dev/pci/twe_pci.c b/sys/dev/pci/twe_pci.c
index abeefb8b5a9..dc1c4774553 100644
--- a/sys/dev/pci/twe_pci.c
+++ b/sys/dev/pci/twe_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: twe_pci.c,v 1.3 2000/12/07 20:49:36 mickey Exp $ */
+/* $OpenBSD: twe_pci.c,v 1.4 2001/06/12 15:40:33 niklas Exp $ */
/*
* Copyright (c) 2000 Michael Shalayeff
@@ -87,7 +87,7 @@ twe_pci_attach(parent, self, aux)
pcireg_t csr;
if (pci_mapreg_map(pa, TWE_BAR, PCI_MAPREG_TYPE_IO, 0,
- &sc->iot, &sc->ioh, NULL, &size)) {
+ &sc->iot, &sc->ioh, NULL, &size, 0)) {
printf(": can't map controller i/o space\n");
return;
}
diff --git a/sys/dev/pci/ubsec.c b/sys/dev/pci/ubsec.c
index 560353e9ff5..25179e1ad96 100644
--- a/sys/dev/pci/ubsec.c
+++ b/sys/dev/pci/ubsec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ubsec.c,v 1.55 2001/06/08 01:59:32 jason Exp $ */
+/* $OpenBSD: ubsec.c,v 1.56 2001/06/12 15:40:33 niklas Exp $ */
/*
* Copyright (c) 2000 Jason L. Wright (jason@thought.net)
@@ -161,7 +161,7 @@ ubsec_attach(parent, self, aux)
}
if (pci_mapreg_map(pa, BS_BAR, PCI_MAPREG_TYPE_MEM, 0,
- &sc->sc_st, &sc->sc_sh, NULL, &iosize)) {
+ &sc->sc_st, &sc->sc_sh, NULL, &iosize, 0)) {
printf(": can't find mem space\n");
return;
}
diff --git a/sys/dev/pci/uhci_pci.c b/sys/dev/pci/uhci_pci.c
index 3678bc01b98..b871a7237a3 100644
--- a/sys/dev/pci/uhci_pci.c
+++ b/sys/dev/pci/uhci_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uhci_pci.c,v 1.9 2001/01/21 02:42:49 mickey Exp $ */
+/* $OpenBSD: uhci_pci.c,v 1.10 2001/06/12 15:40:33 niklas Exp $ */
/* $NetBSD: uhci_pci.c,v 1.14 2000/01/25 11:26:06 augustss Exp $ */
/*
@@ -104,7 +104,7 @@ uhci_pci_attach(parent, self, aux)
/* Map I/O registers */
if (pci_mapreg_map(pa, PCI_CBIO, PCI_MAPREG_TYPE_IO, 0,
- &sc->sc.iot, &sc->sc.ioh, NULL, &sc->sc.sc_size)) {
+ &sc->sc.iot, &sc->sc.ioh, NULL, &sc->sc.sc_size, 0)) {
printf(": can't map i/o space\n");
return;
}
diff --git a/sys/dev/pci/yds.c b/sys/dev/pci/yds.c
index 5a4d687fdc6..7aae339ec67 100644
--- a/sys/dev/pci/yds.c
+++ b/sys/dev/pci/yds.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: yds.c,v 1.2 2001/05/24 18:49:50 aaron Exp $ */
+/* $OpenBSD: yds.c,v 1.3 2001/06/12 15:40:33 niklas Exp $ */
/* $NetBSD: yds.c,v 1.5 2001/05/21 23:55:04 minoura Exp $ */
/*
@@ -657,7 +657,7 @@ yds_attach(parent, self, aux)
/* Map register to memory */
if (pci_mapreg_map(pa, YDS_PCI_MBA, PCI_MAPREG_TYPE_MEM, 0,
- &sc->memt, &sc->memh, NULL, NULL)) {
+ &sc->memt, &sc->memh, NULL, NULL, 0)) {
printf("%s: can't map memory space\n", sc->sc_dev.dv_xname);
return;
}