Commit graph

18 commits

Author SHA1 Message Date
Frank Gevaerts
9c43b2ce17 Remove card_enable_monitoring() and use a mutex instead. The card_enable_monitoring() method actually didn't eliminate the possible race conditions it was meant to fix.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26627 a1c6a512-1295-4272-9138-f99709370657
2010-06-06 13:20:47 +00:00
Frank Gevaerts
a0557b23f0 remane hotswap.* to sdmmc.*. The contents have nothing at all to do with hotswapping things
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26598 a1c6a512-1295-4272-9138-f99709370657
2010-06-05 21:12:16 +00:00
Rafaël Carré
bf3e50b89b sd-as3525v1: do not disable peripheral clocks in sd_enable()
(forward port of r26481 + cosmetics)
This lead to freezes under various conditons (bug report: FS#11267)

Battery life is almost not (if at all) affected:
- between 4 and 8 minutes less runtime for fuzev1
- 9 minutes less runtime for c200v2 (2 minutes difference on a 2 hours run)

Additional verifications of the runtime (including on other models) wouldn't hurt

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26512 a1c6a512-1295-4272-9138-f99709370657
2010-06-03 13:55:42 +00:00
Rafaël Carré
acb524e51a sd-as3525v1: set up bank selection data outside of the loop
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26441 a1c6a512-1295-4272-9138-f99709370657
2010-06-01 03:50:52 +00:00
Jack Halpin
8b6356d08a sd-as3525.c: Do not wait for TRAN state after transfer is over.
Waiting for TRAN state after the end of the transfer caused writing problems for some uSD cards.  Removing this wait returns write functionality to those cards.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26365 a1c6a512-1295-4272-9138-f99709370657
2010-05-28 21:47:36 +00:00
Rafaël Carré
ff9474e558 as3525v1: relax a bit requirements in the SD driver
- retry failed commands up to 6 times
- wait at most 5 seconds for the card to go to TRAN state

- wait for the card to be in TRAN state (i.e. not programming) before
  disabling SD clocks (remove the workaround in sd_enable() )

should fix lockups reported on fuzev1 under heavy internal storage + µSD use
(playback + database/pictureflow updating)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26291 a1c6a512-1295-4272-9138-f99709370657
2010-05-25 21:55:09 +00:00
Rafaël Carré
13f159df57 as3525*: sd_wait_for_state() is only used for waiting to SD_TRAN state
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26251 a1c6a512-1295-4272-9138-f99709370657
2010-05-24 15:07:15 +00:00
Rafaël Carré
6b46cc08ed as3525: hide our UNCACHED_ADDR from usb_storage.c
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26178 a1c6a512-1295-4272-9138-f99709370657
2010-05-19 18:13:06 +00:00
Rafaël Carré
627baea953 sd-as3525: wait 100µs before disabling SD clocks
test_disk doesn't freeze anymore when closing the file between writing & reading

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26164 a1c6a512-1295-4272-9138-f99709370657
2010-05-19 14:06:13 +00:00
Rafaël Carré
b3a8170afe sd-as3525: avoid division when calculating current bank, we only deal with 1 or 2 banks
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26161 a1c6a512-1295-4272-9138-f99709370657
2010-05-19 12:11:57 +00:00
Rafaël Carré
a53785911a sd-as3525: give timeout in HZ units, not in ticks
remove a TODO fixed in r26029

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26159 a1c6a512-1295-4272-9138-f99709370657
2010-05-19 12:11:50 +00:00
Rafaël Carré
c785722fec as3525: make sure we don't use a negative number of sectors
Better be safe than sorry, don't try to read/write outside our storage,
because we might overwrite the OF on the internal storage

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26077 a1c6a512-1295-4272-9138-f99709370657
2010-05-16 10:24:31 +00:00
Rafaël Carré
0f77db7346 as3525: fix capacity sanity check
adjust logical starting sector to physical starting sector after the check
number of blocks is already adjusted from physical to logical
don't panic anymore when accessing the last part of storage

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26050 a1c6a512-1295-4272-9138-f99709370657
2010-05-15 12:01:53 +00:00
Rafaël Carré
84b7747069 as3525v1: detect correctly internal storage capacity
check if SD transfers fit with the card capacity

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26029 a1c6a512-1295-4272-9138-f99709370657
2010-05-14 21:41:29 +00:00
Thomas Martitz
249aae587a FS#11172 - Fuzev2: Read the scrollwheel scrollwheel via IRQ
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25736 a1c6a512-1295-4272-9138-f99709370657
2010-04-27 10:11:52 +00:00
Thomas Martitz
845af676f8 as3525(v2): Add a somewhat inaccurate udelay (-0.5/+1.0µs). It should work good for some huge delays.
Use it in fuzev2 to improve some big delays (correct the biggest one to actually wait for the fifo to empty), and use it in the sd drivers.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25734 a1c6a512-1295-4272-9138-f99709370657
2010-04-27 09:34:29 +00:00
Rafaël Carré
c3c7306098 sd-as3525: do not reverse 2 times long responses, read them directly in the needed order
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25185 a1c6a512-1295-4272-9138-f99709370657
2010-03-14 21:46:25 +00:00
Rafaël Carré
6c93570b90 Sansa AMS: remove "ata" from SD drivers filenames
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24237 a1c6a512-1295-4272-9138-f99709370657
2010-01-15 14:03:41 +00:00
Renamed from firmware/target/arm/as3525/ata_sd_as3525.c (Browse further)