fix DMA buffers when the src/dst is in IRAM
It worked fine because all the buffers are in DRAM, and the virtual
address happens to be the physical address
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27876 a1c6a512-1295-4272-9138-f99709370657
fuzev2 button_read_device() runs in interrupt context so writes are atomic
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27494 a1c6a512-1295-4272-9138-f99709370657
On tx underruns, a write is aborted early, leaving the dma channel active.
We didn't explicitly disable it, so there were still 4 words in the dma
controller fifo, corrupting the retried write.
To chase this bug I added verify after write, if no one sees write errors in
the next week or so this can be removed.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27113 a1c6a512-1295-4272-9138-f99709370657
We always need to write MCI_ARGUMENT register so if the command expects
no argument just set the function argument to 0
Code is now similar to as3525v2
hint: merging the 2 and/or all the SD drivers would be nice
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27088 a1c6a512-1295-4272-9138-f99709370657
test_disk says everything is alright but playback is buggy, especially
when playing lossless files
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27044 a1c6a512-1295-4272-9138-f99709370657
AMSv2 and AMSv1 lowmem put the codec buffer in IRAM so we need to adjust
the address : AS3525_PHYSICAL_ADDRESS macro will do just that
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26954 a1c6a512-1295-4272-9138-f99709370657
test_disk shows 1MB transfers are up to 3 times faster
not much difference for 1 or 8 sectors at a time
define STORAGE_WANTS_ALIGN to use the fast path when possible
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26953 a1c6a512-1295-4272-9138-f99709370657
Reserve 1MB of DRAM for loading rockbox and use the rest as BSS
Write sdram setup in assembler and move it to a separate file, together
with MMU init code
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26926 a1c6a512-1295-4272-9138-f99709370657
(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
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
- 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
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
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
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
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