Subject: troubles mapping isa registers
To: None <port-alpha@netbsd.org>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: port-alpha
Date: 08/31/1999 18:13:32
Hi,
in order to fully support the cypress IDE controller, I need to read/write
things to I/O 0x22/0x23. A first attempt to map these registers fails.
Here is how I did it:
first I need  a bus_space_tag_t, and of course none is passed from the
upper level for this. As the bus-master DMA registers are supposed to be
in I/O space too I've 'duplicated' it:
sc->cy693_dmamode_iot = sc->sc_dma_iot;
Then I attempt to map these regs:
       if (sc->sc_dma_ok &&
           bus_space_map(sc->cy693_dmamode_iot, CY_DMA_ADDR, CY_DMA_SIZE, 0,
           &sc->cy693_dmamode_ioh)) {
               printf("%s: can't map DMA control registers\n",
                   sc->sc_wdcdev.sc_dev.dv_xname);
               sc->sc_dma_ok = 0;
       }

But bus_space_map() return != 0. 
CY_DMA_ADDR is defined to 0x22 and CY_DMA_SIZE to 0x2.
Any idea of what can be wrong ?

--
Manuel Bouyer, LIP6, Universite Paris VI.           Manuel.Bouyer@lip6.fr
--