Rockbox

Tasklist

FS#10309 - Sansa AMS : correctly sets timeout for data access

Attached to Project: Rockbox
Opened by Rafaël Carré (funman) - Tuesday, 09 June 2009, 19:08 GMT
Last edited by Rafaël Carré (funman) - Thursday, 11 June 2009, 17:17 GMT
Task Type Patches
Category Drivers
Status Closed
Assigned To No-one
Operating System Another
Severity Low
Priority Normal
Reported Version Version 3.2
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Sets MCI_DATA_TIMER to a correct value (100ms for read, 250ms for write)

We should also calculate a timeout given what the card CSD reports, and take the lower between the calculated value and 100/250ms.

The OF doesn't seem to do that so we just save some calculations at each boot and µSD insertion.

In the same process I started removing the duplicate tSDCardInfo structure and putting the 2 needed struct members into tCardInfo (designed for MMC iiuc).

I also let some crude debug code into the isr to detect infinite loops (I actually detected a timeout - status 0x8 - and I started working on this patch)

TODO:
- check if speed calculation is correct (didn't bother)
- modify ata-sd-pp.c (tSDCardInfo -> tCardInfo) - can wait release branching since we are now frozen
This task depends upon

Closed by  Rafaël Carré (funman)
Thursday, 11 June 2009, 17:17 GMT
Reason for closing:  Accepted
Additional comments about closing:  use sd_max_write_timeout for bank selection (the attached patch was wrong about that)
Comment by Rafaël Carré (funman) - Tuesday, 09 June 2009, 19:39 GMT
Simpler patch : only MCI_DATA_TIMER changes.

I wanted to use the tCardInfo struct because it has tsac & nsac members, but these are not used by Sansa OF so I just ignored them and used the default timeout mentioned in SD spec

Loading...