Hi,

I am building wince 5.0 on new hardware, and I am trying to get the my
SDmemory card to come up. There are many layers to this driver and I am
trying to peel my way through it, but sure could use some help. Device
actually supports SDIO , so I have included SDMemory and SDIO Standard Host
controller, in the SD card drivers directory there is SD Bus, SD Bus
Driver, SdCardLib,SDClientDriver,SDHCDriver,and SDHClib (quite confusing). I
have been looking/reading but its pretty daunting at first... anyway, I
have enabled as much debug as I could find and I have pasted it below in
multiple sections separated by ========= first section is power up/driver
load/init with no card inserted, second section is debug when I plug card
in, third is card removal,there is an awful lot of debug, and when i first
sent the message was too big so I removed PIDs and TIDS and then I removed
tsome countdown code that repeated (from 40 down to 1) so I removed a
bunch of those counts so I could email. so I'm hoping someone familiar
with this
driver might be able to help shorten this task...
Thanks,
Joe W.
Power up no card inserted
==================
Loaded symbols for
'C:\WINCE500\PBWORKSPACES\AMDLXZ\RELDIR\GEODELX_X86_RELEASE\SDBUS.DLL'
SDBusDriver: PROCESS_ATTACH
SDCard: +SDInitializeCardLib
SDCard: -SDInitializeCardLib
SDBusDriver: +SDC_Init
SDBusDriver: Initialize: Using request list depth of 48 entries
SDCard: +SDCreateMemoryList
SDCard: -SDCreateMemoryList
SDCard: +SDCreateMemoryList
SDCard: -SDCreateMemoryList
SDBusDriver: BusRequestCompleteDispatch Work Item Starting Up
SDBusDriver: Bus Driver instance created : 0x00042DE0 ! -SDC_Ini
Loaded symbols for
'C:\WINCE500\PBWORKSPACES\AMDLXZ\RELDIR\GEODELX_X86_RELEASE\SDHC.DLL'
5739 SDCard: +SDInitializeCardLib
5739 SDCard: -SDInitializeCardLib
5739 SDHCDGetHCFunctions: +Init
5741 SDHCDGetHCFunctions: -Init
5744 SDHC +Init
5744 SDHC Active RegPath: Drivers\Active\30
5747 CSDHCBase::InitializeHardware: IRQ 0xA mapped to SYS_INTR 0x16
5747 CSDHCBase::InitializeHardware: Base address -> 0xff900000;
length -> 0x100
5807 SDHC: Using timeout control value of 0xd for 2.0 seconds
5807 +DumpStdHCRegs - Slot 0 -------------------------
5807 SystemAddressLo: 0x0000
5809 SystemAddressHi: 0x0000
5811 BlockSize: 0x0000
5813 BlockCount: 0x0000
5813 Argument0: 0x0000
5815 Argument1: 0x0000
5815 TransferMode: 0x0000
5925 Command: 0x0000
5925 R0: 0x0000
5925 R1: 0x0000
5925 R2: 0x0000
5925 R3: 0x0000
5927 R4: 0x0000
5927 R5: 0x0000
6096 R6: 0x0000
6096 R7: 0x0000
6096 BufferDataPort0: 0x1404
6096 BufferDataPort1: 0x6000
6098 PresentState: 0x1F20000
6098 HostControl: 0x0000
6098 PowerControl: 0x0000
6100 BlockGapControl: 0x0000
6102 WakeUpControl: 0x0000
6104 ClockControl: 0x0000
6106 TimeOutControl: 0x0000
6106 SoftReset: 0x0000
6106 NormalIntStatus: 0x0000
6106 ErrorIntStatus: 0x0000
6106 NormalIntStatusEnable: 0x0000
6106 ErrorIntStatusEnable: 0x0000
6106 NormalIntSignalEnable: 0x0000
6107 ErrorIntSignalEnable: 0x0000
6107 AutoCMD12ErrorStatus: 0x0000
6109 Capabilities: 0x18021A1
6109 MaxCurrentCapabilites: 0x0040
6109 SlotInterruptStatus: 0x0000
6109 HostControllerVersion: 0x0400
6109 -DumpStdHCRegs-------------------------
6109 SDBusDriver: Host Controller "SD Std Host" assigned number 0
6109 CSDHCBase::SlotOptionHandler(0, SDHCDGetSlotInfo)
6110 SDHCSetRate - Clock Control Reg = 101
6110 SDHCSetRate - Actual clock rate = 16500000
6110 SDCard: +SDCreateMemoryList
6112 SDCard: -SDCreateMemoryList
6112 SDBusDriver: SlotStatusChange Work Item Starting Up
6112 SDBusDriver: SlotStatusChange getting message
6112 SDHCInitialize++
6112 SDHCInitialize--
6113 SDHC -Init
6122 CSDHCBase::IST: Thread Starting
6122 CSDHCBase::HandleInterrupt: Slot Interrupt_Status=0x0
6122 SDHCControllerIst - Card is Removed

Insert Card
====================
619655 CSDHCBase::HandleInterrupt: Slot Interrupt_Status=0x1
619655 HandleInterrupt (0) - Normal Interrupt_Status=0x40
619655 SDHCControllerIst - Card is Inserted!
619656 CSDHCSlotBase::SetVoltage: Set SDHC_POWER_CONTROL reg = 0x0f
619907 SDHCSetRate - Clock Control Reg = 8001
619907 SDHCSetRate - Actual clock rate = 128906
619910 SDCard: +SDAllocateFromMemList
619910 SDCard: -SDAllocateFromMemList
619910 SDBusDriver: SlotStatusChange Dispatching message event: 2
619910 SDBusDriver: HandleAddDevice+
619910 SDCard: +AllocateMemoryWithTag
619910 SDCard: -AllocateMemoryWithTag
619910 SDGetClientFunctions: +Init
619912 SDGetClientFunctions: -Init
619912 SDBusDriver: HandleAddDevice - Delaying init: 1 MS
619914 CSDHCBase::SlotOptionHandler(0, SDHCDSetSlotInterface)
619914 CSDHCSlotBase::SlotOptionHandler: Clock Setting: 100000
619914 SHCSDSlotOptionHandler - Setting Host Control Register 0
619914 SDHCSetRate - Clock Control Reg = 8001
619914 SDHCSetRate - Actual clock rate = 128906
619914 SDSetCardInterfaceForSlot - HC ClockRate differs desired
setting: desired: 100000 Hz, Actual : 128906 Hz
619914 SDBusDriver: Checking for SDIO card in slot 0 ....
619914 SDCard: SendSynchCommandRequest+
619915 SDCard: SDBusRequest+
619916 SDCard: +SDAllocateFromMemList
619918 SDCard: -SDAllocateFromMemList
619918 SDBus: Allocated request 0x00043588
619918 SDBusDriver: Submitting bus request:0x00043588 to device
TempInitDevice0
619918 +++ SDCard: CMD5 CMDArg: 0x00000000 TransferClass:2
ResponseType: R4
619918 +++ SDCard: Calling Send Handler for HC:SD Std Host. Slot:0,
Request:0x00043588
619918 CSDHCSlotBase::BusRequestHandler: CMD:5
619919 CSDHCSlotBase::SubmitBusRequestHandler: CMD:5
619919 Sending command register 0x0502
619919 Sending command Argument 0x00000000
619920 HandleInterrupt (0) - Normal Interrupt_Status=0x8000
619920 CSDHCBase::HandleInterrupt: Slot Interrupt_Status=0x0
619920 SDCard: +SDFreeToMemList
619920 SDCard: -SDFreeToMemList
619921 SDBus: Freed request 0x00043588
619921 SDCard: SDBusRequest-
619921 SDCard: SendSynchCommandRequest-
619921 SDBusDriver: SDIO Card check timeout, moving on
619921 SDBusDriver: Instructing new card in slot 0 to go IDLE
619921 SDCard: SendSynchCommandRequest+
619921 SDCard: SDBusRequest+
619922 SDCard: +SDAllocateFromMemList
619922 SDCard: -SDAllocateFromMemList
619922 SDBus: Allocated request 0x00043588
619922 SDBusDriver: Submitting bus request:0x00043588 to device
TempInitDevice0
619922 +++ SDCard: CMD0 CMDArg: 0x00000000 TransferClass:2
ResponseType: NoResponse
619922 +++ SDCard: Calling Send Handler for HC:SD Std Host. Slot:0,
Request:0x00043588
619922 CSDHCSlotBase::BusRequestHandler: CMD:0
619923 CSDHCSlotBase::SubmitBusRequestHandler: CMD:0
619923 Sending command register 0x0000
619923 Sending command Argument 0x00000000
619923 HandleInterrupt (0) - Normal Interrupt_Status=0x01
619924 SDCard: SDBusRequest-
619924 SDCard: +SDFreeToMemList
619924 SDCard: -SDFreeToMemList
619924 SDBus: Freed request 0x00043588
619924 SDCard: SendSynchCommandRequest-
619924 SDBusDriver: Checking for MMC Card in slot 0
619924 SDCard: SendSynchCommandRequest+
619925 SDCard: SDBusRequest+
619925 SDCard: +SDAllocateFromMemList
619926 SDCard: -SDAllocateFromMemList
619927 SDBus: Allocated request 0x00043588
619927 SDBusDriver: Submitting bus request:0x00043588 to device
TempInitDevice0
619927 +++ SDCard: CMD1 CMDArg: 0x00300000 TransferClass:2
ResponseType: R3
619927 +++ SDCard: Calling Send Handler for HC:SD Std Host. Slot:0,
Request:0x00043588
619927 CSDHCSlotBase::BusRequestHandler: CMD:1
619927 CSDHCSlotBase::SubmitBusRequestHandler: CMD:1
619928 Sending command register 0x0102
619928 Sending command Argument 0x00300000
619929 HandleInterrupt (0) - Normal Interrupt_Status=0x8000
619929 CSDHCBase::HandleInterrupt: Slot Interrupt_Status=0x0
619929 SDCard: +SDFreeToMemList
619929 SDCard: -SDFreeToMemList
619929 SDBus: Freed request 0x00043588
619930 SDCard: SDBusRequest-
619930 SDCard: SendSynchCommandRequest-
619930 SDCard: SendSynchCommandRequest+
619930 SDCard: SDBusRequest+
619930 SDCard: +SDAllocateFromMemList
619930 SDCard: -SDAllocateFromMemList
619930 SDBus: Allocated request 0x00043588
619931 SDBusDriver: Submitting bus request:0x00043588 to device
TempInitDevice0
619931 +++ SDCard: CMD55 CMDArg: 0x00000000 TransferClass:2
ResponseType: R1
619931 +++ SDCard: Calling Send Handler for HC:SD Std Host. Slot:0,
Request:0x00043588
619931 CSDHCSlotBase::BusRequestHandler: CMD:55
619931 CSDHCSlotBase::SubmitBusRequestHandler: CMD:55
619931 Sending command register 0x371A
619931 Sending command Argument 0x00000000
619933 HandleInterrupt (0) - Normal Interrupt_Status=0x01
619933 SDCard: SDBusRequest-
619933 SDCard: +SDFreeToMemList
619933 SDCard: -SDFreeToMemList
619933 SDBus: Freed request 0x00043588
619933 SDCard: SendSynchCommandRequest-
619933 SDCard: SendSynchCommandRequest+
619934 SDCard: SDBusRequest+
619935 SDCard: +SDAllocateFromMemList
619935 SDCard: -SDAllocateFromMemList
619936 SDBus: Allocated request 0x00043588
619936 SDBusDriver: Submitting bus request:0x00043588 to device
TempInitDevice0
619936 +++ SDCard: CMD41 CMDArg: 0x00000000 TransferClass:2
ResponseType: R3
619936 +++ SDCard: Calling Send Handler for HC:SD Std Host. Slot:0,
Request:0x00043588
619936 CSDHCSlotBase::BusRequestHandler: CMD:41
619936 CSDHCSlotBase::SubmitBusRequestHandler: CMD:41
619936 Sending command register 0x2902
619937 Sending command Argument 0x00000000
619938 HandleInterrupt (0) - Normal Interrupt_Status=0x01
619938 SDCard: SDBusRequest-
619938 SDCard: +SDFreeToMemList
619938 SDCard: -SDFreeToMemList
619938 SDBus: Freed request 0x00043588
619938 SDCard: SendSynchCommandRequest-
619938 SDBusDriver: SDMemory Card detected in slot 0
619939 SDBusDriver: Device Power Range:0x00FF8000 matches HC desired
power: 0x00100000
619939 SDBusDriver: Setting slot 0 power to 0x00100000
619939 CSDHCBase::SlotOptionHandler(0, SDHCDSetSlotPower)
619941 SDCard: SendSynchCommandRequest+
619941 SDCard: SDBusRequest+
619941 SDCard: +SDAllocateFromMemList
619941 SDCard: -SDAllocateFromMemList
619941 SDBus: Allocated request 0x00043588
619941 SDBusDriver: Submitting bus request:0x00043588 to device
TempInitDevice0
619941 +++ SDCard: CMD0 CMDArg: 0x00000000 TransferClass:2
ResponseType: NoResponse
619942 +++ SDCard: Calling Send Handler for HC:SD Std Host. Slot:0,
Request:0x00043588
619942 CSDHCSlotBase::BusRequestHandler: CMD:0
619942 CSDHCSlotBase::SubmitBusRequestHandler: CMD:0
619942 Sending command register 0x0000
619942 Sending command Argument 0x00000000
619943 HandleInterrupt (0) - Normal Interrupt_Status=0x01
619943 SDCard: SDBusRequest-
619943 SDCard: +SDFreeToMemList
619943 SDCard: -SDFreeToMemList
619943 SDBus: Freed request 0x00043588
619943 SDCard: SendSynchCommandRequest-
619944 SDBusDriver: Power Set, checking card in slot 0, MaxRetries: 40,
Time: 2000 MS, Interval: 50 MS
619944 SDCard: SendSynchCommandRequest+
619944 SDCard: SDBusRequest+
619944 SDCard: +SDAllocateFromMemList
619944 SDCard: -SDAllocateFromMemList
619944 SDBus: Allocated request 0x00043588
619944 SDBusDriver: Submitting bus request:0x00043588 to device
TempInitDevice0
619945 +++ SDCard: CMD55 CMDArg: 0x00000000 TransferClass:2
ResponseType: R1
619945 +++ SDCard: Calling Send Handler for HC:SD Std Host. Slot:0,
Request:0x00043588
619945 CSDHCSlotBase::BusRequestHandler: CMD:55
619945 CSDHCSlotBase::SubmitBusRequestHandler: CMD:55
619945 Sending command register 0x371A
619945 Sending command Argument 0x00000000
619947 HandleInterrupt (0) - Normal Interrupt_Status=0x01
619947 SDCard: SDBusRequest-
619947 SDCard: +SDFreeToMemList
619947 SDCard: -SDFreeToMemList
619948 SDBus: Freed request 0x00043588
619948 SDCard: SendSynchCommandRequest-
619948 SDCard: SendSynchCommandRequest+
619948 SDCard: SDBusRequest+
619950 SDCard: +SDAllocateFromMemList
619950 SDCard: -SDAllocateFromMemList
619950 SDBus: Allocated request 0x00043588
619950 SDBusDriver: Submitting bus request:0x00043588 to device
TempInitDevice0
619951 +++ SDCard: CMD41 CMDArg: 0x00100000 TransferClass:2
ResponseType: R3
619951 +++ SDCard: Calling Send Handler for HC:SD Std Host. Slot:0,
Request:0x00043588
619951 CSDHCSlotBase::BusRequestHandler: CMD:41
619951 CSDHCSlotBase::SubmitBusRequestHandler: CMD:41
619951 Sending command register 0x2902
619951 Sending command Argument 0x00100000
619952 HandleInterrupt (0) - Normal Interrupt_Status=0x01
619952 SDCard: SDBusRequest-
619953 SDCard: +SDFreeToMemList
619953 SDCard: -SDFreeToMemList
619953 SDBus: Freed request 0x00043588
619953 SDCard: SendSynchCommandRequest-
619953 SDBusDriver: Card in slot 0 not ready, countdown: 40
620004 SDCard: SendSynchCommandRequest+
620004 SDCard: SDBusRequest+
620004 SDCard: +SDAllocateFromMemList
620004 SDCard: -SDAllocateFromMemList
620004 SDBus: Allocated request 0x00043588
620004 SDBusDriver: Submitting bus request:0x00043588 to device
TempInitDevice0
620004 +++ SDCard: CMD55 CMDArg: 0x00000000 TransferClass:2
ResponseType: R1
620005 +++ SDCard: Calling Send Handler for HC:SD Std Host. Slot:0,
Request:0x00043588
620005 CSDHCSlotBase::BusRequestHandler: CMD:55
620005 CSDHCSlotBase::SubmitBusRequestHandler: CMD:55
620005 Sending command register 0x371A
620005 Sending command Argument 0x00000000
620006 HandleInterrupt (0) - Normal Interrupt_Status=0x01
620006 SDCard: SDBusRequest-
620007 SDCard: +SDFreeToMemList
620007 SDCard: -SDFreeToMemList
620007 SDBus: Freed request 0x00043588
620007 SDCard: SendSynchCommandRequest-
620007 SDCard: SendSynchCommandRequest+
620007 SDCard: SDBusRequest+
620007 SDCard: +SDAllocateFromMemList
620008 SDCard: -SDAllocateFromMemList
620008 SDBus: Allocated request 0x00043588
620008 SDBusDriver: Submitting bus request:0x00043588 to device
TempInitDevice0
620008 +++ SDCard: CMD41 CMDArg: 0x00100000 TransferClass:2
ResponseType: R3
620008 +++ SDCard: Calling Send Handler for HC:SD Std Host. Slot:0,
Request:0x00043588
620008 CSDHCSlotBase::BusRequestHandler: CMD:41
620008 CSDHCSlotBase::SubmitBusRequestHandler: CMD:41
620009 Sending command register 0x2902
620009 Sending command Argument 0x00100000
620010 HandleInterrupt (0) - Normal Interrupt_Status=0x01
620010 SDCard: SDBusRequest-
620011 SDCard: +SDFreeToMemList
620011 SDCard: -SDFreeToMemList
620011 SDBus: Freed request 0x00043588
620011 SDCard: SendSynchCommandRequest-
620011 SDBusDriver: Card in slot 0 not ready, countdown: 39
620062 SDCard: SendSynchCommandRequest+
620066 SDCard: SDBusRequest+
620066 SDCard: +SDAllocateFromMemList
620066 SDCard: -SDAllocateFromMemList
620066 SDBus: Allocated request 0x00043588
620067 SDBusDriver: Submitting bus request:0x00043588 to device
TempInitDevice0
620068 +++ SDCard: CMD55 CMDArg: 0x00000000 TransferClass:2
ResponseType: R1
620068 +++ SDCard: Calling Send Handler for HC:SD Std Host. Slot:0,
Request:0x00043588
620068 CSDHCSlotBase::BusRequestHandler: CMD:55
620069 CSDHCSlotBase::SubmitBusRequestHandler: CMD:55
620069 Sending command register 0x371A
620069 Sending command Argument 0x00000000
620070 HandleInterrupt (0) - Normal Interrupt_Status=0x01
620070 SDCard: SDBusRequest-
620070 SDCard: +SDFreeToMemList
620070 SDCard: -SDFreeToMemList
620071 SDBus: Freed request 0x00043588
620071 SDCard: SendSynchCommandRequest-
620071 SDCard: SendSynchCommandRequest+
620071 SDCard: SDBusRequest+
620071 SDCard: +SDAllocateFromMemList
620073 SDCard: -SDAllocateFromMemList
620073 SDBus: Allocated request 0x00043588
620073 SDBusDriver: Submitting bus request:0x00043588 to device
TempInitDevice0
620073 +++ SDCard: CMD41 CMDArg: 0x00100000 TransferClass:2
ResponseType: R3
620074 +++ SDCard: Calling Send Handler for HC:SD Std Host. Slot:0,
Request:0x00043588
620074 CSDHCSlotBase::BusRequestHandler: CMD:41
620074 CSDHCSlotBase::SubmitBusRequestHandler: CMD:41
620074 Sending command register 0x2902
620074 Sending command Argument 0x00100000
620075 HandleInterrupt (0) - Normal Interrupt_Status=0x01
620075 SDCard: SDBusRequest-
620075 SDCard: +SDFreeToMemList
620076 SDCard: -SDFreeToMemList
620076 SDBus: Freed request 0x00043588

======== Removed repeated countdowns === 38 thru 5 ============

620076 SDCard: SendSynchCommandRequest-countdown: 4
622159 SDCard: SendSynchCommandRequest+
622159 SDCard: SDBusRequest+
622160 SDCard: +SDAllocateFromMemList
622160 SDCard: -SDAllocateFromMemList
622160 SDBus: Allocated request 0x00043588
622160 SDBusDriver: Submitting bus request:0x00043588 to device
TempInitDevice0
622160 +++ SDCard: CMD55 CMDArg: 0x00000000 TransferClass:2
ResponseType: R1
622161 +++ SDCard: Calling Send Handler for HC:SD Std Host. Slot:0,
Request:0x00043588
622161 CSDHCSlotBase::BusRequestHandler: CMD:55
622161 CSDHCSlotBase::SubmitBusRequestHandler: CMD:55
622161 Sending command register 0x371A
622161 Sending command Argument 0x00000000
622162 HandleInterrupt (0) - Normal Interrupt_Status=0x01
622162 SDCard: SDBusRequest-
622162 SDCard: +SDFreeToMemList
622163 SDCard: -SDFreeToMemList
622163 SDBus: Freed request 0x00043588
622163 SDCard: SendSynchCommandRequest-
622163 SDCard: SendSynchCommandRequest+
622163 SDCard: SDBusRequest+
622163 SDCard: +SDAllocateFromMemList
622163 SDCard: -SDAllocateFromMemList
622164 SDBus: Allocated request 0x00043588
622164 SDBusDriver: Submitting bus request:0x00043588 to device
TempInitDevice0
622164 +++ SDCard: CMD41 CMDArg: 0x00100000 TransferClass:2
ResponseType: R3
622164 +++ SDCard: Calling Send Handler for HC:SD Std Host. Slot:0,
Request:0x00043588
622164 CSDHCSlotBase::BusRequestHandler: CMD:41
622164 CSDHCSlotBase::SubmitBusRequestHandler: CMD:41
622164 Sending command register 0x2902
622165 Sending command Argument 0x00100000
622166 HandleInterrupt (0) - Normal Interrupt_Status=0x01
622166 SDCard: SDBusRequest-
622166 SDCard: +SDFreeToMemList
622167 SDCard: -SDFreeToMemList
622167 SDBus: Freed request 0x00043588
622167 SDCard: SendSynchCommandRequest-
622167 SDBusDriver: Card in slot 0 not ready, countdown: 3
622218 SDCard: SendSynchCommandRequest+
622218 SDCard: SDBusRequest+
622218 SDCard: +SDAllocateFromMemList
622218 SDCard: -SDAllocateFromMemList
622218 SDBus: Allocated request 0x00043588
622218 SDBusDriver: Submitting bus request:0x00043588 to device
TempInitDevice0
622218 +++ SDCard: CMD55 CMDArg: 0x00000000 TransferClass:2
ResponseType: R1
622219 +++ SDCard: Calling Send Handler for HC:SD Std Host. Slot:0,
Request:0x00043588
622219 CSDHCSlotBase::BusRequestHandler: CMD:55
622219 CSDHCSlotBase::SubmitBusRequestHandler: CMD:55
622219 Sending command register 0x371A
622219 Sending command Argument 0x00000000
622220 HandleInterrupt (0) - Normal Interrupt_Status=0x01
622220 SDCard: SDBusRequest-
622220 SDCard: +SDFreeToMemList
622221 SDCard: -SDFreeToMemList
622221 SDBus: Freed request 0x00043588
622221 SDCard: SendSynchCommandRequest-
622221 SDCard: SendSynchCommandRequest+
622221 SDCard: SDBusRequest+
622222 SDCard: +SDAllocateFromMemList
622222 SDCard: -SDAllocateFromMemList
622223 SDBus: Allocated request 0x00043588
622223 SDBusDriver: Submitting bus request:0x00043588 to device
TempInitDevice0
622223 +++ SDCard: CMD41 CMDArg: 0x00100000 TransferClass:2
ResponseType: R3
622223 +++ SDCard: Calling Send Handler for HC:SD Std Host. Slot:0,
Request:0x00043588
622223 CSDHCSlotBase::BusRequestHandler: CMD:41
622223 CSDHCSlotBase::SubmitBusRequestHandler: CMD:41
622223 Sending command register 0x2902
622224 Sending command Argument 0x00100000
622225 HandleInterrupt (0) - Normal Interrupt_Status=0x01
622225 SDCard: SDBusRequest-
622225 SDCard: +SDFreeToMemList
622225 SDCard: -SDFreeToMemList
622225 SDBus: Freed request 0x00043588
622225 SDCard: SendSynchCommandRequest-
622225 SDBusDriver: Card in slot 0 not ready, countdown: 2
622277 SDCard: SendSynchCommandRequest+
622277 SDCard: SDBusRequest+
622277 SDCard: +SDAllocateFromMemList
622277 SDCard: -SDAllocateFromMemList
622277 SDBus: Allocated request 0x00043588
622277 SDBusDriver: Submitting bus request:0x00043588 to device
TempInitDevice0
622277 +++ SDCard: CMD55 CMDArg: 0x00000000 TransferClass:2
ResponseType: R1
622277 +++ SDCard: Calling Send Handler for HC:SD Std Host. Slot:0,
Request:0x00043588
622278 CSDHCSlotBase::BusRequestHandler: CMD:55
622278 CSDHCSlotBase::SubmitBusRequestHandler: CMD:55
622278 Sending command register 0x371A
622278 Sending command Argument 0x00000000
622279 HandleInterrupt (0) - NormalInterrupt_Status=0x01
622279 SDCard: SDBusRequest-
622279 SDCard: +SDFreeToMemList
622280 SDCard: -SDFreeToMemList
622280 SDBus: Freed request 0x00043588
622280 SDCard: SendSynchCommandRequest-
622280 SDCard: SendSynchCommandRequest+
622280 SDCard: SDBusRequest+
622282 SDCard: +SDAllocateFromMemList
622282 SDCard: -SDAllocateFromMemList
622282 SDBus: Allocated request 0x00043588
622282 SDBusDriver: Submitting bus request:0x00043588 to device
TempInitDevice0
622283 +++ SDCard: CMD41 CMDArg: 0x00100000 TransferClass:2
ResponseType: R3
622284 +++ SDCard: Calling Send Handler for HC:SD Std Host. Slot:0,
Request:0x00043588
622284 CSDHCSlotBase::BusRequestHandler: CMD:41
622284 CSDHCSlotBase::SubmitBusRequestHandler: CMD:41
622284 Sending command register 0x2902
622284 Sending command Argument 0x00100000
622285 HandleInterrupt (0) - Normal Interrupt_Status=0x01
622286 SDCard: SDBusRequest-
622286 SDCard: +SDFreeToMemList
622286 SDCard: -SDFreeToMemList
622286 SDBus: Freed request 0x00043588
622286 SDCard: SendSynchCommandRequest-
622286 SDBusDriver: Card in slot 0 not ready,
countdown: 1
622337 SDBusDriver: HandleAddDevice-
622337 SDCard: +SDFreeToMemList
622340 SDCard: -SDFreeToMemList
622341 SDBusDriver: SlotStatusChange getting
message
================================
Remove Card
===============
838589 CSDHCBase::HandleInterrupt: Slot
Interrupt_Status=0x1
838589 HandleInterrupt (0) - Normal
Interrupt_Status=0x80
838589 SDHCControllerIst - Card is Removed!
838589 SDCard: +SDAllocateFromMemList
838589 SDCard: -SDAllocateFromMemList
838590 SDBusDriver: SlotStatusChange Dispatching
message event: 1
838591 SDBusDriver: HandleRemoveDevice+
838591 SDCard: +SDFreeMemory
838591 SDCard: -SDFreeMemory
838591 SDUnloadDevice: Client Device deleted
838592 SDBusDriver: HandleRemoveDevice-
838592 SDCard: +SDFreeToMemList
838592 SDCard: -SDFreeToMemList
838592 SDBusDriver: SlotStatusChange getting
message

Re: SD Card Experts by chris

chris
Fri Mar 21 16:29:59 PDT 2008

Joe Welfeld wrote:
> <snip> but sure could use some help.

With what? Was there a question in any of that?

chris

Re: SD Card Experts by vishal

vishal
Sun Mar 23 22:26:05 PDT 2008

hi joe ,
i too faced similar problem earlier while writing driver
for sd memory card

1) if you are writing code for sdmemory card and not for mmc card then
try to comment out entire mmc checking part present in
sdhceventhandlers.cpp
as given below this will ensure that yr bus driver does not enter
into unnecessary loop to check fr mmc card and directly jumps for
checking sd memory card
/*
// check for MMC if we did not previously detect a combo device
if (Device_SD_Combo != deviceType) {
.......
}*/




2) when bus driver sends these commands to your hcd the
busrequesthandler will get called and in this function u need to send
commands to the sd card and send the appropriate respone to
busdriver ...........

Re: SD Card Experts by Joe

Joe
Mon Mar 24 05:32:50 PDT 2008

Hi,

Thought the question was inherent for someone familiar with this code...,
It appears I enter into this loop for 40 times waiting for "something" and
the card never presents itself.

619944 SDBusDriver: Power Set, checking card in slot 0, MaxRetries: 40,
Time: 2000 MS, Interval: 50 MS

622225 SDBusDriver: Card in slot 0 not ready, countdown: 2
622277 SDCard: SendSynchCommandRequest+
622277 SDCard: SDBusRequest+
622277 SDCard: +SDAllocateFromMemList
622277 SDCard: -SDAllocateFromMemList
622277 SDBus: Allocated request 0x00043588
622277 SDBusDriver: Submitting bus request:0x00043588 to device
TempInitDevice0
622277 +++ SDCard: CMD55 CMDArg: 0x00000000 TransferClass:2
ResponseType: R1
622277 +++ SDCard: Calling Send Handler for HC:SD Std Host. Slot:0,
Request:0x00043588
622278 CSDHCSlotBase::BusRequestHandler: CMD:55
622278 CSDHCSlotBase::SubmitBusRequestHandler: CMD:55
622278 Sending command register 0x371A
622278 Sending command Argument 0x00000000
622279 HandleInterrupt (0) - NormalInterrupt_Status=0x01
622279 SDCard: SDBusRequest-
622279 SDCard: +SDFreeToMemList
622280 SDCard: -SDFreeToMemList
622280 SDBus: Freed request 0x00043588
622280 SDCard: SendSynchCommandRequest-
622280 SDCard: SendSynchCommandRequest+
622280 SDCard: SDBusRequest+
622282 SDCard: +SDAllocateFromMemList
622282 SDCard: -SDAllocateFromMemList

622282 SDBus: Allocated request 0x00043588
622282 SDBusDriver: Submitting bus request:0x00043588 to device
TempInitDevice0
622283 +++ SDCard: CMD41 CMDArg: 0x00100000 TransferClass:2
ResponseType: R3
622284 +++ SDCard: Calling Send Handler for HC:SD Std Host. Slot:0,
Request:0x00043588
622284 CSDHCSlotBase::BusRequestHandler: CMD:41
622284 CSDHCSlotBase::SubmitBusRequestHandler: CMD:41
622284 Sending command register 0x2902
622284 Sending command Argument 0x00100000
622285 HandleInterrupt (0) - Normal Interrupt_Status=0x01
622286 SDCard: SDBusRequest-
622286 SDCard: +SDFreeToMemList
622286 SDCard: -SDFreeToMemList
622286 SDBus: Freed request 0x00043588
622286 SDCard: SendSynchCommandRequest-
622286 SDBusDriver: Card in slot 0 not ready, countdown: 1

I get card not ready, I was hoping someone that was familar could help
break down what is going on here and save me some time ? CMD 55 ? CMD 41
? what is the driver trying to do ?

Vishal

I get your comment regarding removing MMC code, but wondering if you
could elaborate more on your Item "2"


Thanks,

Joe Welfeld



"chris" <none@nothanks.com> wrote in message
news:__idnQ4RN4Vq2XnanZ2dnUVZ_u-dnZ2d@comcast.com...
> Joe Welfeld wrote:
>> <snip> but sure could use some help.
>
> With what? Was there a question in any of that?
>
> chris



Re: SD Card Experts by Joe

Joe
Mon Mar 24 06:50:17 PDT 2008

Hi Vishal,

I commented out MMC loop and I am detecting its an SD card, but I still
count down in that loop to 0 with card not ready, so it appears I am
sending the command but the card is not getting it ? can you elaborate on
your Item 2 below a bit more ?

Thanks,

Joe


<vishal.g.shah@gmail.com> wrote in message
news:53b1a580-872d-47f7-a9aa-879a0e144c33@e10g2000prf.googlegroups.com...
> hi joe ,
> i too faced similar problem earlier while writing driver
> for sd memory card
>
> 1) if you are writing code for sdmemory card and not for mmc card then
> try to comment out entire mmc checking part present in
> sdhceventhandlers.cpp
> as given below this will ensure that yr bus driver does not enter
> into unnecessary loop to check fr mmc card and directly jumps for
> checking sd memory card
> /*
> // check for MMC if we did not previously detect a combo device
> if (Device_SD_Combo != deviceType) {
> .......
> }*/
>
>
>
>
> 2) when bus driver sends these commands to your hcd the
> busrequesthandler will get called and in this function u need to send
> commands to the sd card and send the appropriate respone to
> busdriver ...........



Re: SD Card Experts by Tarun

Tarun
Mon Mar 24 20:00:02 PDT 2008

On Mar 24, 8:32=A0pm, "Joe Welfeld" <jwelfeldnos...@datastrip.net>
wrote:
> Hi,
>
> Thought the question was inherent for someone familiar =A0 with this code.=
..,
> It appears I enter into =A0this loop for 40 times waiting for "something" =
=A0and
> the card never presents itself.
>
> 619944 =A0 =A0 SDBusDriver: Power Set, checking card in slot 0, MaxRetries=
: 40,
> Time: 2000 MS, Interval: 50 MS
>
> =A0622225 =A0 =A0 SDBusDriver: Card in slot 0 not ready, countdown: 2
> =A0622277 =A0 =A0 SDCard: SendSynchCommandRequest+
> =A0622277 =A0 =A0 SDCard: SDBusRequest+
> =A0622277 =A0 =A0 SDCard: +SDAllocateFromMemList
> =A0622277 =A0 =A0 SDCard: -SDAllocateFromMemList
> =A0622277 =A0 =A0 SDBus: Allocated request 0x00043588
> =A0622277 =A0 =A0 SDBusDriver: Submitting bus request:0x00043588 to device=

> TempInitDevice0
> =A0622277 =A0 =A0 +++ SDCard: CMD55 =A0CMDArg: 0x00000000 TransferClass:2
> ResponseType: R1
> =A0622277 =A0 =A0 +++ SDCard: Calling Send Handler for HC:SD Std Host. Slo=
t:0,
> Request:0x00043588
> =A0622278 =A0 =A0 CSDHCSlotBase::BusRequestHandler: CMD:55
> =A0622278 =A0 =A0 CSDHCSlotBase::SubmitBusRequestHandler: CMD:55
> =A0622278 =A0 =A0 Sending command register 0x371A
> =A0622278 =A0 =A0 Sending command Argument 0x00000000
> =A0622279 =A0 =A0 HandleInterrupt (0) - NormalInterrupt_Status=3D0x01
> =A0622279 =A0 =A0 SDCard: SDBusRequest-
> =A0622279 =A0 =A0 SDCard: +SDFreeToMemList
> =A0622280 =A0 =A0 SDCard: -SDFreeToMemList
> =A0622280 =A0 =A0 SDBus: Freed request 0x00043588
> =A0622280 =A0 =A0 SDCard: SendSynchCommandRequest-
> =A0622280 =A0 =A0 SDCard: SendSynchCommandRequest+
> =A0622280 =A0 =A0 SDCard: SDBusRequest+
> =A0622282 =A0 =A0 SDCard: +SDAllocateFromMemList
> =A0622282 =A0 =A0 SDCard: -SDAllocateFromMemList
>
> =A0622282 =A0 =A0 SDBus: Allocated request 0x00043588
> =A0622282 =A0 =A0 SDBusDriver: Submitting bus request:0x00043588 to device=

> TempInitDevice0
> =A0622283 =A0 =A0 +++ SDCard: CMD41 =A0CMDArg: 0x00100000 TransferClass:2
> ResponseType: R3
> =A0622284 =A0 =A0 +++ SDCard: Calling Send Handler for HC:SD Std Host. Slo=
t:0,
> Request:0x00043588
> =A0622284 =A0 =A0 CSDHCSlotBase::BusRequestHandler: CMD:41
> =A0622284 =A0 =A0 CSDHCSlotBase::SubmitBusRequestHandler: CMD:41
> =A0622284 =A0 =A0 Sending command register 0x2902
> =A0622284 =A0 =A0 Sending command Argument 0x00100000
> =A0622285 =A0 =A0 HandleInterrupt (0) - Normal Interrupt_Status=3D0x01
> =A0622286 =A0 =A0 SDCard: SDBusRequest-
> =A0622286 =A0 =A0 SDCard: +SDFreeToMemList
> =A0622286 =A0 =A0 SDCard: -SDFreeToMemList
> =A0622286 =A0 =A0 SDBus: Freed request 0x00043588
> =A0622286 =A0 =A0 SDCard: SendSynchCommandRequest-
> =A0622286 =A0 =A0 SDBusDriver: Card in slot 0 not ready, countdown: 1
>
> I get card not ready, =A0 I was hoping someone that was familar could help=

> break down what is going on here =A0and save me some time ? =A0 =A0CMD 55 =
? CMD 41
> ? =A0what is the driver trying to do ?
>
> =A0Vishal
>
> I get your comment regarding =A0removing MMC =A0 code, =A0but wondering if=
you
> could elaborate more on your Item "2"
>
> Thanks,
>
> Joe Welfeld
>
> "chris" <n...@nothanks.com> wrote in message
>
> news:__idnQ4RN4Vq2XnanZ2dnUVZ_u-dnZ2d@comcast.com...
>
>
>
> > Joe Welfeld wrote:
> >> <snip> =A0but sure could use some help.
>
> > With what? =A0Was there a question in any of that?
>
> > chris- Hide quoted text -
>
> - Show quoted text -

Hi,

The CMD 55 followed by CMD 41 is actually ACMD 41. This is a status
checking command..... I think I have faced a similar rough patch...
lemme dig out the code and find the fix.

CheerZ
-Tarun

Re: SD Card Experts by vishal

vishal
Mon Mar 24 21:23:29 PDT 2008


hi joe ,

In your host controller driver before calling
SDHCDRegisterHostController you should have defined certain handlers
for bus driver such as


// set the slot option handler
SDHCDSetSlotOptionHandler(m_pHCContext,CSDIOControllerBase::SDHCDSlotOptionH=
andler);
// set the Send packet handler
SDHCDSetBusRequestHandler(m_pHCContext,CSDIOControllerBase::SDHCDBusRequestH=
andler);
and so on ....

here SDHCDBusRequestHandler is the funtion which gets called in
response to calls like SendSDCommand from busdriver
SDHCDBusRequestHandler should be implemeted in your hcd and should
send the requested commands to the card and the response from the
card needs to be updated in PSD_BUS_REQUEST pRequest structure and
once the busrequest is completed by sdhcdbusrequesthandler it informs
the busdriver of completion of command by calling
SDHCDIndicateBusRequestComplete(m_pHCContext, pRequest, status);

In the similar way busdriver will keep on sending commands
like cmd2 cmd3 cmd9 cmd13 and so on and retrieves card info like
CID, RCA ,OEM ID,SCR ........ and later loads client driver i.e
sdmemory.dll




On Mar 24, 6:50=A0pm, "Joe Welfeld" <jwelfeldnos...@datastrip.net>
wrote:
> Hi Vishal,
>
> I commented out MMC loop and I am detecting its an SD =A0card, =A0 =A0but =
I still
> count down in that loop to 0 =A0with card =A0not ready, =A0 so it appears =
I am
> sending the command but the card is not getting it ? =A0can you elaborate =
on
> your Item 2 below a bit more ?
>
> Thanks,
>
> Joe
>
> <vishal.g.s...@gmail.com> wrote in message
>
> news:53b1a580-872d-47f7-a9aa-879a0e144c33@e10g2000prf.googlegroups.com...
>
>
>
> > hi joe ,
> > =A0 =A0 =A0 =A0 =A0 i too faced similar problem earlier while writing dr=
iver
> > for sd memory card
>
> > 1) if you are writing code for sdmemory card and not for mmc card then
> > try to comment out entire mmc checking part present in
> > sdhceventhandlers.cpp
> > =A0 =A0as given below this will ensure that yr bus driver does not enter=

> > into unnecessary loop to check fr mmc card and directly jumps for
> > checking sd memory card
> > =A0 =A0/*
> > =A0 =A0// check for MMC if we did not previously detect a combo device
> > =A0 =A0if (Device_SD_Combo !=3D deviceType) {
> > =A0 =A0.......
> > =A0 =A0}*/
>
> > 2) when bus driver sends these commands to your hcd the
> > busrequesthandler will get called and in this function u need to send
> > commands to the sd card and send the appropriate respone to
> > busdriver ...........- Hide quoted text -
>
> - Show quoted text -


Re: SD Card Experts by Joe

Joe
Tue Mar 25 06:20:59 PDT 2008

Hi,

I am supposedly using Standard SDIO and I see those handlers getting set in
the init function in sdhc.cpp I thought that if my device is "standard"
I should be able to use the SDIO Standard host controller and SDMemory
without modification ?

Joe W.

<vishal.g.shah@gmail.com> wrote in message
news:f22dda15-395b-4c21-bd73-e82cebdb17bd@s12g2000prg.googlegroups.com...

hi joe ,

In your host controller driver before calling
SDHCDRegisterHostController you should have defined certain handlers
for bus driver such as


// set the slot option handler
SDHCDSetSlotOptionHandler(m_pHCContext,CSDIOControllerBase::SDHCDSlotOptionHandler);
// set the Send packet handler
SDHCDSetBusRequestHandler(m_pHCContext,CSDIOControllerBase::SDHCDBusRequestHandler);
and so on ....

here SDHCDBusRequestHandler is the funtion which gets called in
response to calls like SendSDCommand from busdriver
SDHCDBusRequestHandler should be implemeted in your hcd and should
send the requested commands to the card and the response from the
card needs to be updated in PSD_BUS_REQUEST pRequest structure and
once the busrequest is completed by sdhcdbusrequesthandler it informs
the busdriver of completion of command by calling
SDHCDIndicateBusRequestComplete(m_pHCContext, pRequest, status);

In the similar way busdriver will keep on sending commands
like cmd2 cmd3 cmd9 cmd13 and so on and retrieves card info like
CID, RCA ,OEM ID,SCR ........ and later loads client driver i.e
sdmemory.dll




On Mar 24, 6:50 pm, "Joe Welfeld" <jwelfeldnos...@datastrip.net>
wrote:
> Hi Vishal,
>
> I commented out MMC loop and I am detecting its an SD card, but I still
> count down in that loop to 0 with card not ready, so it appears I am
> sending the command but the card is not getting it ? can you elaborate on
> your Item 2 below a bit more ?
>
> Thanks,
>
> Joe
>
> <vishal.g.s...@gmail.com> wrote in message
>
> news:53b1a580-872d-47f7-a9aa-879a0e144c33@e10g2000prf.googlegroups.com...
>
>
>
> > hi joe ,
> > i too faced similar problem earlier while writing driver
> > for sd memory card
>
> > 1) if you are writing code for sdmemory card and not for mmc card then
> > try to comment out entire mmc checking part present in
> > sdhceventhandlers.cpp
> > as given below this will ensure that yr bus driver does not enter
> > into unnecessary loop to check fr mmc card and directly jumps for
> > checking sd memory card
> > /*
> > // check for MMC if we did not previously detect a combo device
> > if (Device_SD_Combo != deviceType) {
> > .......
> > }*/
>
> > 2) when bus driver sends these commands to your hcd the
> > busrequesthandler will get called and in this function u need to send
> > commands to the sd card and send the appropriate respone to
> > busdriver ...........- Hide quoted text -
>
> - Show quoted text -



Re: SD Card Experts by vishal

vishal
Wed Mar 26 01:48:46 PDT 2008

I dont think standard code will work as is but still u can check
wheather
IoBase address in your sdhc.cpp matches with the base address of SD
Registers in your hardware platform ......



// Map in address space for SD hardware registers
PhysicalAddress.HighPart =3D 0;
PhysicalAddress.LowPart =3D IoBase;
g_SDRegBase =3D (UCHAR *)MmMapIoSpace (PhysicalAddress,
SD_HWREGS_SIZE,
FALSE);







On Mar 25, 6:20=A0pm, "Joe Welfeld" <jwelfeldnos...@datastrip.net>
wrote:
> Hi,
>
> I am supposedly using Standard SDIO and I see those handlers getting set i=
n
> the init function in sdhc.cpp =A0 I thought that if my =A0device is "stand=
ard"
> I should be able to use the SDIO Standard host controller and SDMemory
> without modification ?
>
> Joe W.
>
> <vishal.g.s...@gmail.com> wrote in message
>
> news:f22dda15-395b-4c21-bd73-e82cebdb17bd@s12g2000prg.googlegroups.com...
>
> hi joe ,
>
> =A0 =A0 =A0 =A0 In your host controller driver before calling
> SDHCDRegisterHostController you should have defined certain handlers
> for bus driver such as
>
> =A0// set the slot option handler
> SDHCDSetSlotOptionHandler(m_pHCContext,CSDIOControllerBase::SDHCDSlotOptio=
n=ADHandler);
> // set the Send packet handler
> SDHCDSetBusRequestHandler(m_pHCContext,CSDIOControllerBase::SDHCDBusReques=
t=ADHandler);
> and so on ....
>
> here SDHCDBusRequestHandler is the funtion which gets called in
> response to calls like SendSDCommand from busdriver
> SDHCDBusRequestHandler =A0should be implemeted in your hcd and should
> send the requested commands to the card =A0and the response from the
> card needs to be updated in PSD_BUS_REQUEST pRequest structure and
> once the busrequest is completed by sdhcdbusrequesthandler it informs
> the busdriver of completion of command by calling
> SDHCDIndicateBusRequestComplete(m_pHCContext, pRequest, status);
>
> =A0 =A0 =A0 =A0 =A0 =A0In the similar way busdriver will keep on sending c=
ommands
> like cmd2 cmd3 cmd9 cmd13 and so on and retrieves card info =A0like
> CID, RCA ,OEM ID,SCR ........ and later loads client driver i.e
> sdmemory.dll
>
> On Mar 24, 6:50 pm, "Joe Welfeld" <jwelfeldnos...@datastrip.net>
> wrote:
>
>
>
> > Hi Vishal,
>
> > I commented out MMC loop and I am detecting its an SD card, but I still
> > count down in that loop to 0 with card not ready, so it appears I am
> > sending the command but the card is not getting it ? can you elaborate o=
n
> > your Item 2 below a bit more ?
>
> > Thanks,
>
> > Joe
>
> > <vishal.g.s...@gmail.com> wrote in message
>
> >news:53b1a580-872d-47f7-a9aa-879a0e144c33@e10g2000prf.googlegroups.com...=

>
> > > hi joe ,
> > > i too faced similar problem earlier while writing driver
> > > for sd memory card
>
> > > 1) if you are writing code for sdmemory card and not for mmc card then=

> > > try to comment out entire mmc checking part present in
> > > sdhceventhandlers.cpp
> > > as given below this will ensure that yr bus driver does not enter
> > > into unnecessary loop to check fr mmc card and directly jumps for
> > > checking sd memory card
> > > /*
> > > // check for MMC if we did not previously detect a combo device
> > > if (Device_SD_Combo !=3D deviceType) {
> > > .......
> > > }*/
>
> > > 2) when bus driver sends these commands to your hcd the
> > > busrequesthandler will get called and in this function u need to send
> > > commands to the sd card and send the appropriate respone to
> > > busdriver ...........- Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -


Re: SD Card Experts by Joe

Joe
Wed Mar 26 13:14:11 PDT 2008

Its a PCI device so IO base should match up, since it is read from PCI
window. certainly I am detecting card in/out correctly and it looks lie
other registers are being read, but Iwill do some more checking...




<vishal.g.shah@gmail.com> wrote in message
news:7649ac30-71e8-463e-8bda-d4199bc3cc20@q78g2000hsh.googlegroups.com...
I dont think standard code will work as is but still u can check
wheather
IoBase address in your sdhc.cpp matches with the base address of SD
Registers in your hardware platform ......



// Map in address space for SD hardware registers
PhysicalAddress.HighPart = 0;
PhysicalAddress.LowPart = IoBase;
g_SDRegBase = (UCHAR *)MmMapIoSpace (PhysicalAddress,
SD_HWREGS_SIZE,
FALSE);







On Mar 25, 6:20 pm, "Joe Welfeld" <jwelfeldnos...@datastrip.net>
wrote:
> Hi,
>
> I am supposedly using Standard SDIO and I see those handlers getting set
> in
> the init function in sdhc.cpp I thought that if my device is