Subject: Need help with understanding the emuxki driver
To: None <tech-kern@netbsd.org>
From: Mark Kirby <mark@coris.org.uk>
List: tech-kern
Date: 11/27/2004 15:53:52
Hi,
I'm trying to add mpu support to the emuxki driver. I have mannaged to attach
an mpu(4) driver to my device. The problem i'm having is in mapping some
iospace for the mpu device.
As far as i can see (from looking at other pci sound drivers which have mpu
support) i can do it two ways.
The 1st way is to add something like
if (pci_mapreg_map(pa, EMUXKi_PCI_BAR_MPU, PCI_MAPREG_TYPE_IO, 0,
&sc->sc_mpu_iot, &sc->sc_mpu_ioh, NULL, NULL)) {
aprint_error("%s: can't map MPU I/O space\n",
sc->sc_dev.dv_xname);
return;
or i can do
if (bus_space_subregion(sc->sc_iot, sc->sc_ioh, 0x68, 4,
&sc->sc_opl_ioh))
panic("fms_attach: can't get opl subregion handle");
The problem with the 1st approach is that i don't know the value of the mpu
base address register. It's not listed in emuxkireg.h or emuxkivar.h, also i
can't find any reference to it in the latest linux drivers. So that implies,
to me at least, that thats not the way to go about it.
The problem with the second one is i don't no what values i need to put in
place of the 0x68 and 4.
Does anyone have any information on how mpu support was intended to be
implemented for the emuxki driver, or can offer me any general advice.
Any bone anyone can throw me will be greatly appreciated.
Thanks
Mark