Hi,

I am new to PCI drivers but have been tasked to de-jungo an existing
PCI driver on a pentium bsp. Basically this means remove the jungo
(WinDriver) layer from an existing driver.

I have identified the following functions to remove and have started to
replace them.
WD_CardRegister
WD_CardUnregister
WD_PciScanCards
WD_PciGetCardInfo
WD_PciConfigDump
WD_Transfer
WD_DMALock
WD_DMAUnlock
WD_Sleep
WD_IntEnable
WD_IntDisable
WD_IntCount
WD_IntWait

I am currently detecting the card, reading the base addresses and
reading and writing from PCI configuration space. Some of the code is
below.

pciConfigLibInit(PCI_MECHANISM_1,PCI_CONFIG_ADDR,P CI_CONFIG_DATA,NULL);
int pciBusNo;
int pciDevNo;
int pciFuncNo;
if (pciFindDevice (pciScanCards->searchId.dwVendorId,
pciScanCards->searchId.dwDeviceId, 0, &pciBusNo, &pciDevNo, &pciFuncNo)
!= OK)
{
//Read base addresses, detect if IO or Mem then get size and reset
baseaddress after size query.
//Now need to do WD_CardRegister code
}

Firstly, Does anyone have experience of removing the Jungo layer from a
driver and a good method for doing this.

Secondly, What do need to do to peform the code for the
WD_CardRegister function. I assume this is setting up the local memory
and interupts. What do I need to do to set up the PCI card here for the
pentium bsp. I have seen sysMmuMapAdd being used to set up the Mem base
addresses however I get `VM_STATE_MASK_VALID' undeclared when I try to
use this code.

Thirdly, How do I register the interupt handler. I am currently using:-

pciIntConnect((VOIDFUNCPTR*)(INUM_TO_IVEC(INT_NUM_ IRQ0+5)),(VOIDFUNCPTR)InteruptHander,
0;//5 is actually returned from reading the base addresses
sysIntEnablePIC(5);

Basically, I nedd to know what I need to o to set up a PCI cards, Mem,
IO and interupts.

Any help or pointers to sources of documentation would be greatfully
received.

thanks

Tim