Rockbox

  • Status Closed
  • Percent Complete
    100%
  • Task Type Patches
  • Category Drivers
  • Assigned To No-one
  • Operating System Another
  • Severity Low
  • Priority Very Low
  • Reported Version Version 3.2
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by funman - 2009-06-09
Last edited by funman - 2009-06-11

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

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 0×8 - 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

Closed by  funman
2009-06-11 17:17
Reason for closing:  Accepted
Additional comments about closing:  

use sd_max_write_timeout for bank selection (the attached patch was wrong about that)

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...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing