Hello,
I am writing a PCMCIA card driver for Win2K. The card is inserted into a CardBus that utilizes the TI PCI1420 PC Controller chip. I have the WDM shell for the code working fine. The card is enumerated when inserted into the slot, resources are allocated, everything is fine except for one thing–I cannot access the 1420 registers.
In my legacy NT driver code, the registers were accessed via Host I/O locations 0x3e0 and 0x3e1. Both of the PCMCIA Card registers were accessed via these locations via the following method:
- WRITE_PORT_UCHAR() was invoked on location 0x3e0, specifying the desired register offset (0x00 to 0x3f for card 1 and 0x40 to 0x7f for card2)
- READ_PORT_UCHAR() or WRITE_PORT_UCHAR() were invoked on location 0x3e1. If it was a READ operation the value of the register written to 0x3e0 was returned; for WRITE operations the value specified was written to the register value previously written to 0x3e0.
The problem I have been encountering is that this scheme no longer seems to work. Since the CardBus is already powered-up and working when my card is inserted, I expect to be able to access the 1420’s registers to perform some initialization for my cards. However, when I attempt to read the registers via the 0x3e0/0x3e1 scheme I get values of 0xff for all.
Again, since the CardBus is functional (it has to be for my card to be enumerated-right?) I expect to see valid register values. Attempts to write to a given (writable) register value result in the value written not taking.
And this is strange…after my device initialization, I decided to write out each of the register locations again and no longer get all 0xff’s. This time, reads of 0x3e1 return the values written to 0x3e0: 0x00, 0x01, 0x02 . 0x3f. Doh!
I got the data book for the PCI1420 from TI and it indicated that in addition to being able to access the registers via the index/data method, they may be accessed directly via an alias to PCI memory space. I know that this memory offset is specified in the PCI header; however, I have no idea where this header resides in memory and no documentation has been enlightening enough to provide me with it. Does anyone know how I find this out?
Thanks for any help…
Jeremy in sunny FLA