Rockbox

This is the bug/patch tracker for Rockbox. Click here for more information.

Quick links: Bugs · Patches · Rockbox frontpage

Tasklist

FS#11140 - sd-as3525v2.c Use CD Interrupt vs. CD polling in send_cmd()

Attached to Project: Rockbox
Opened by Jack Halpin (FlynDice) - Tuesday, 23 March 2010, 20:23 GMT+2
Last edited by Rafaël Carré (funman) - Tuesday, 04 May 2010, 00:16 GMT+2
Task Type Patches
Category Drivers
Status Closed
Assigned To No-one
Player Type Another
Severity Low
Priority Normal
Reported Version Release 3.4
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Private No

Details

I believe this patch works as far as the SD part is concerned. Rockbox loads from the SD normally and I can browse the contents of both the internal and uSD. Using the CD int also allows us to check for a response timeout and a bad response crc value. Attempting to play music results in a stkov ata/sd or a Data abort at various locations. This is new territory for me so I thought I'd ask for some help here if someone may understand what's going on!
   send_cmd_int.diff (3.1 KiB)
 b/firmware/target/arm/as3525/sd-as3525v2.c |   40 ++++++++++++++++++-----------
 1 file changed, 25 insertions(+), 15 deletions(-)

This task depends upon

Closed by  Rafaël Carré (funman)
Tuesday, 04 May 2010, 00:16 GMT+2
Reason for closing:  Accepted
Additional comments about closing:  r25799
Comment by Rafaël Carré (funman) - Wednesday, 24 March 2010, 13:36 GMT+2
There's no wakeup_init() , although I'm not sure if it's a problem (bss is set to 0)

The rest looks ok (didn't test yet)
Comment by Rafaël Carré (funman) - Wednesday, 24 March 2010, 18:06 GMT+2
ATA error -10 at boot with r25316, no µSD plugged in, Clip+ 4GB
Comment by Jack Halpin (FlynDice) - Wednesday, 24 March 2010, 23:55 GMT+2
Sorry, seems using HS timings makes it a bit touchier. I've got the response timeout disabled and it exhibits the same behavior as before with this patch.
Browsing both internal and uSD works fine and displaying album art files works but when I attempt to play a music file the wps screen flashes up and then I get Stkov ata/sd followed by data abort.
   send_cmd_int_2.diff (4.8 KiB)
 b/firmware/target/arm/as3525/sd-as3525v2.c |   50 +++++++++++++++++------------
 1 file changed, 30 insertions(+), 20 deletions(-)

Comment by Rafaël Carré (funman) - Thursday, 25 March 2010, 15:15 GMT+2
same result than you, no idea where the problems come from.
Comment by Rafaël Carré (funman) - Monday, 03 May 2010, 21:45 GMT+2
sync + Enable DMA channel before send_cmd() => looks alright on Clip+/Clipv2
   send_cmd_int_3.diff (5.9 KiB)
 b/firmware/target/arm/as3525/sd-as3525v2.c |   58 ++++++++++++++++++-----------
 1 file changed, 36 insertions(+), 22 deletions(-)

Comment by Rafaël Carré (funman) - Monday, 03 May 2010, 22:25 GMT+2
write support !!!!

I ask for a (discarded) response when issuing *_multiple_blocks

It works with this patch but without it I got errors when initializing the database (which stresses read/write i think)
   send_cmd_int_4.diff (6 KiB)
 b/firmware/target/arm/as3525/sd-as3525v2.c |   64 +++++++++++++++--------------
 1 file changed, 35 insertions(+), 29 deletions(-)

Comment by Rafaël Carré (funman) - Monday, 03 May 2010, 23:05 GMT+2
Remove panicf() if send_cmd() fails (it seems to work fine)

Add a comment for dummy response
   send_cmd_int_5.diff (6 KiB)
 b/firmware/target/arm/as3525/sd-as3525v2.c |   63 +++++++++++++++--------------
 1 file changed, 34 insertions(+), 29 deletions(-)

Loading...