summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoronoe <onoe@FreeBSD.org>2000-10-10 09:50:25 +0000
committeronoe <onoe@FreeBSD.org>2000-10-10 09:50:25 +0000
commitb06428d52ecdf2bc361589c54373c1e5335ce5eb (patch)
treebdc737c34e522df36ccaae1e9384b5aa1608be01
parent742d7c16fe03ff171a9ace8797259ed0656b26e1 (diff)
downloadFreeBSD-src-b06428d52ecdf2bc361589c54373c1e5335ce5eb.zip
FreeBSD-src-b06428d52ecdf2bc361589c54373c1e5335ce5eb.tar.gz
awi needs to access memory with 8bit,
but pccardd apparently maps memory with MDF_16BITS flag. So memory mapped access is disabled and use IO port instead for now. This fixes the problem for config index 0x01 in the pccard.conf with the message: "awi0: failed to complete selftest (timeout)"
-rw-r--r--sys/dev/awi/if_awi_pccard.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/dev/awi/if_awi_pccard.c b/sys/dev/awi/if_awi_pccard.c
index 95bf1c5..82190d5 100644
--- a/sys/dev/awi/if_awi_pccard.c
+++ b/sys/dev/awi/if_awi_pccard.c
@@ -140,8 +140,17 @@ awi_pccard_attach(device_t dev)
}
psc->sc_mem_rid = 0;
+#if 1
+ /*
+ * XXX: awi needs to access memory with 8bit,
+ * but pccardd apparently maps memory with MDF_16BITS flag.
+ * So memory mapped access is disabled and use IO port instead.
+ */
+ psc->sc_mem_res = 0;
+#else
psc->sc_mem_res = bus_alloc_resource(dev, SYS_RES_MEMORY,
&psc->sc_mem_rid, 0, ~0, 0x8000, RF_ACTIVE);
+#endif
if (psc->sc_mem_res) {
sc->sc_chip.sc_memt = rman_get_bustag(psc->sc_mem_res);
sc->sc_chip.sc_memh = rman_get_bushandle(psc->sc_mem_res);
OpenPOWER on IntegriCloud