Re: pcmcia card in wince 5.0 problem by david
david
Thu Jan 12 11:13:49 CST 2006
Thanks.
To enable status change interrupt, the following code added to
CPCCardBusBridge::InstallIsr(..):
//Setup ExCA Interrupt and General-Control Register to Enable
Status Change routed to PCI for PCMCIA..
WriteExCARegister( 3, ( ReadExCARegister( 3 ) & 0xe0 ) | 0x10 );
//----------------------------------------------------------------------------------------------------------------------------------------------------
//Setup ExCA Card Status-Change Register to enable change detection
on either /CD1 and /CD2.
WriteExCARegister( 5, ReadExCARegister( 5 ) | 0x08 );
//Setup ExCA Global Control Register to enable 82365 compatible
interrupts.
WriteExCARegister( 0x1e, ReadExCARegister( 0x1e ) | 0x1e );
//-----------------------------------------------------------------------------------------------------------------------------------------------------
// Default bridge setup. Do not route the function (Card) interrupt
SetBridgeControl( 0x80, FALSE );
Unfortunately, no interrupt was observed after pcmcia card inserted.
Here are relevent debug traces:
Loaded symbols for
'C:\WINCE500\PBWORKSPACES\TICEPC\RELDIR\CEPC_X86_DEBUG\PCC_TIPCCARD.DLL'
PID:43f98a4a TID:43fa1a0a 0x83fca800: TI : DLL_PROCESS_ATTACH
PID:43f98a4a TID:43fa1a0a 0x83fca800: Updated eptr->e32_vsize to =
00002000
PID:43f98a4a TID:43fa1a0a 0x83fca800: >>> Loading module giisr.dll at
address 0x802F6000-0x802F8000 (RW data at 0x81DB6000-0x81DB6504)
Loaded symbols for
'C:\WINCE500\PBWORKSPACES\TICEPC\RELDIR\CEPC_X86_DEBUG\GIISR.DLL'
PID:43f98a4a TID:43fa1a0a 0x83fca800: CardBus: ConfigPort - Installed
ISR Handler
PID:43f98a4a TID:43fa1a0a 0x83fca800: CardBus:InstallIsr
(irq=ffffffff),SysIntr=(0)
PID:43f98a4a TID:43fa1a0a 0x83fca800: PCMCIA:IsValidExCASig Valid
CHIP_REVISION detected = 0x84
PID:43f98a4a TID:43fa1a0a 0x83fca800: Bus/Device/Function = 2/6/0
PID:43f98a4a TID:43fa1a0a 0x83fca800: ---------------------PCI /
CardBus Bridge-------------------------------------------
PID:43f98a4a TID:43fa1a0a 0x83fca800: VendorID = 0x104C, DeviceID =
0xAC50, Command = 0x0167, Status = 0x0210
PID:43f98a4a TID:43fa1a0a 0x83fca800: RevisionID = 0x02, ProgIf =
0x00, SubClass = 0x07, BaseClass = 0x06
PID:43f98a4a TID:43fa1a0a 0x83fca800: CacheLineSize = 0x00,
LatencyTimer = 0x40, HeaderType = 0x02, BIST = 0x00
PID:43f98a4a TID:43fa1a0a 0x83fca800: BaseAddress (CardBus
Socket/ExCA Base Address Register) = 0xD0001000
PID:43f98a4a TID:43fa1a0a 0x83fca800: CapabilitiesPtr = 0xA0,
Reserved2 = 0x00, SecondaryStatus = 0xFFFF
PID:43f98a4a TID:43fa1a0a 0x83fca800: PrimaryBusNumber = 2,
CardbusBusNumber = 3
PID:43f98a4a TID:43fa1a0a 0x83fca800: SubordinateBusNumber = 3,
CardbusLatencyTimer = 64
PID:43f98a4a TID:43fa1a0a 0x83fca800: MemoryBase0 = 0xFFFFF000,
MemoryLimit0 = 0x00000000
PID:43f98a4a TID:43fa1a0a 0x83fca800: MemoryBase1 = 0xFFFFF000,
MemoryLimit1 = 0x00000000
PID:43f98a4a TID:43fa1a0a 0x83fca800: IOBase0_LO = 0xFFFC, IOBase0_HI
= 0xFFFF
PID:43f98a4a TID:43fa1a0a 0x83fca800: IOLimit0_LO = 0x0000,
IOLimit0_HI = 0x0000
PID:43f98a4a TID:43fa1a0a 0x83fca800: IOBase1_LO = 0xFFFC, IOBase1_HI
= 0xFFFF
PID:43f98a4a TID:43fa1a0a 0x83fca800: IOLimit1_LO = 0x0000,
IOLimit1_HI = 0x0000
PID:43f98a4a TID:43fa1a0a 0x83fca800: InterruptLine = 0xFF,
InterruptPin = 0x01, BridgeControl = 0x00C0
PID:43f98a4a TID:43fa1a0a 0x83fca800: SubVendorID = 0x1179,
SubSystemID = 0xFF10
PID:43f98a4a TID:43fa1a0a 0x83fca800: LegactyBaseAddress = 0x000003E1
PID:43f98a4a TID:43fa1a0a 0x83fca800: SystemControl = 0x08449060
PID:43f98a4a TID:43fa1a0a 0x83fca800: DeviceControl = 0x46
PID:43f98a4a TID:43fa1a0a 0x83fca800: Diagnostic = 0x60
PID:43f98a4a TID:43fa1a0a 0x83fca800:
-------------------------------------------------------------------------------
PID:43f98a4a TID:e3e8df96 0x83ea5800: CardBus: Socket 0 IST
(SockEvent=0,SocketMask=f,ExCA 0=84, 1=0 2=0,3=10,5=8,1e=e)
PID:43f98a4a TID:e3e8df96 0x83ea5800: CardBus: Socket 0 IST
(SockEvent=0,SocketMask=f,ExCA 0=84, 1=0 2=0,3=10,5=8,1e=e)
PID:43f98a4a TID:e3e8df96 0x83ea5800: CardBus: Socket 0 IST
(SockEvent=0,SocketMask=f,ExCA 0=84, 1=0 2=0,3=10,5=8,1e=e)
PID:43f98a4a TID:e3e8df96 0x83ea5800: CardBus: Socket 0 IST
(SockEvent=0,SocketMask=f,ExCA 0=84, 1=0 2=0,3=10,5=8,1e=e)
Where is the entry point if a card status change interrupt fired?
David