diff options
author | mjacob <mjacob@FreeBSD.org> | 2000-05-07 05:31:39 +0000 |
---|---|---|
committer | mjacob <mjacob@FreeBSD.org> | 2000-05-07 05:31:39 +0000 |
commit | 66bc1a23cf7a0d61ee987b2855a6bd109d540184 (patch) | |
tree | aa6bdbad09bc7881a75533ee4b9cb3771a4f4fc0 /sys/alpha/mcbus | |
parent | 747ab40a69b70e5ff8d144ce2f7cec27a83bb7ff (diff) | |
download | FreeBSD-src-66bc1a23cf7a0d61ee987b2855a6bd109d540184.zip FreeBSD-src-66bc1a23cf7a0d61ee987b2855a6bd109d540184.tar.gz |
EISA/ISA memory space is any pa < 8MB.
Diffstat (limited to 'sys/alpha/mcbus')
-rw-r--r-- | sys/alpha/mcbus/mcpcia.c | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/sys/alpha/mcbus/mcpcia.c b/sys/alpha/mcbus/mcpcia.c index a4b11d5..c021e08 100644 --- a/sys/alpha/mcbus/mcpcia.c +++ b/sys/alpha/mcbus/mcpcia.c @@ -247,6 +247,12 @@ static u_int8_t mcpcia_readb(u_int32_t pa) { struct mcpcia_softc *sc = MCPCIA_SOFTC(MCPCIA_INST(pa)); + if (pa < (8 << 20)) { + if (mcpcia_eisa == NULL) { + return (0xff); + } + return SPARSE_READ_BYTE(mcpcia_eisa->smem_base, pa); + } return SPARSE_READ_BYTE(sc->smem_base, MCPCIA_ADDR(pa)); } @@ -254,6 +260,12 @@ static u_int16_t mcpcia_readw(u_int32_t pa) { struct mcpcia_softc *sc = MCPCIA_SOFTC(MCPCIA_INST(pa)); + if (pa < (8 << 20)) { + if (mcpcia_eisa == NULL) { + return (0xffff); + } + return SPARSE_READ_WORD(mcpcia_eisa->smem_base, pa); + } return SPARSE_READ_WORD(sc->smem_base, MCPCIA_ADDR(pa)); } @@ -268,7 +280,12 @@ static void mcpcia_writeb(u_int32_t pa, u_int8_t data) { struct mcpcia_softc *sc = MCPCIA_SOFTC(MCPCIA_INST(pa)); - SPARSE_WRITE_BYTE(sc->smem_base, MCPCIA_ADDR(pa), data); + if (pa < (8 << 20)) { + if (mcpcia_eisa) + SPARSE_WRITE_BYTE(mcpcia_eisa->smem_base, pa, data); + } else { + SPARSE_WRITE_BYTE(sc->smem_base, MCPCIA_ADDR(pa), data); + } alpha_mb(); } @@ -276,7 +293,12 @@ static void mcpcia_writew(u_int32_t pa, u_int16_t data) { struct mcpcia_softc *sc = MCPCIA_SOFTC(MCPCIA_INST(pa)); - SPARSE_WRITE_WORD(sc->smem_base, MCPCIA_ADDR(pa), data); + if (pa < (8 << 20)) { + if (mcpcia_eisa) + SPARSE_WRITE_WORD(mcpcia_eisa->smem_base, pa, data); + } else { + SPARSE_WRITE_WORD(sc->smem_base, MCPCIA_ADDR(pa), data); + } alpha_mb(); } |