summaryrefslogtreecommitdiff
path: root/firmware/target/arm/as3525/sd-as3525v2.c
AgeCommit message (Collapse)Author
2011-12-14Sansa AMSv2: don't panic if microsd init failedRafaël Carré
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31254 a1c6a512-1295-4272-9138-f99709370657
2011-12-14Sansa AMSv2: enable usb storage in bootloaderRafaël Carré
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31249 a1c6a512-1295-4272-9138-f99709370657
2011-12-12Deal with a complication when transferring recording method from PP5024: ↵Michael Sevakis
since the FIFO POP is always read until empty, keep track of sample parity instead of always saving the first one in the FIFO upon entering the ISR or else the first of a duplicate that is also the last in the FIFO would get duplicated. Also, give top priority to audio interrupts in all cases. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31218 a1c6a512-1295-4272-9138-f99709370657
2011-10-29Sansa clip zip: update mkamsboot and fix various drivers to make it boot to ↵Bertrik Sikken
the main firmware git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30853 a1c6a512-1295-4272-9138-f99709370657
2011-09-24Sansa clipzip: make main build compile (plugins still disabled)Bertrik Sikken
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30588 a1c6a512-1295-4272-9138-f99709370657
2011-04-18AMS: consistently use bitclr32/bitset32/bitmod32 for register CCU_IO ↵Bertrik Sikken
(instead of using |= or &= ) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29748 a1c6a512-1295-4272-9138-f99709370657
2011-04-01AMSv2: fix dependency between button light and sd card control for fuze v2 ↵Bertrik Sikken
variant 0 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29667 a1c6a512-1295-4272-9138-f99709370657
2011-03-29AMSv2 sd: do not try to switch sd cards into high-speed mode.Bertrik Sikken
High-speed mode is only half implemented (sd controller still uses normal speed) and causes card detection problems. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29660 a1c6a512-1295-4272-9138-f99709370657
2011-03-28AMSv2 sd: correct CLKENA settings (to stop sd clock when idle) for AMSv2 ↵Bertrik Sikken
variant 1 players git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29657 a1c6a512-1295-4272-9138-f99709370657
2011-03-28AMSv2 sd: do sd slot switching with GPIO B5 only for AMSv2 variant 1Bertrik Sikken
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29656 a1c6a512-1295-4272-9138-f99709370657
2011-03-26AMSv2 SD: use INTERNAL_AS3525 and SD_SLOT_AS3525 defines instead of a direct ↵Bertrik Sikken
value git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29652 a1c6a512-1295-4272-9138-f99709370657
2011-03-26AMSv2 SD: wait for response to command SD_STOP_TRANSMISSION instead of ↵Bertrik Sikken
ignoring the response git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29651 a1c6a512-1295-4272-9138-f99709370657
2011-03-26AMSv2 SD: reorganise code to select 4-bit mode data transfer mode a bit and ↵Bertrik Sikken
add comments git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29648 a1c6a512-1295-4272-9138-f99709370657
2011-03-26AMSv2 SD: sd card communication speed can be changed back to full speed ↵Bertrik Sikken
after CMD3 (SEND_RCA) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29647 a1c6a512-1295-4272-9138-f99709370657
2011-03-24fix warning, use unsigned variableRafaël Carré
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29638 a1c6a512-1295-4272-9138-f99709370657
2011-03-24SD AMSv2: fix r29625Rafaël Carré
The number of blocks could have been checked while the card was not initialized yet. See FS#11870 for details git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29637 a1c6a512-1295-4272-9138-f99709370657
2011-03-21AMSv2 SD: send 80 idle clocks before sending initial CMD0 (go idle state)Bertrik Sikken
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29630 a1c6a512-1295-4272-9138-f99709370657
2011-03-21AMSv2 SD: receive sd card command responses during initialisation instead of ↵Bertrik Sikken
ignoring them git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29629 a1c6a512-1295-4272-9138-f99709370657
2011-03-21AMSv2 SD: wait for previous data transfer completion before sending a commandBertrik Sikken
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29628 a1c6a512-1295-4272-9138-f99709370657
2011-03-21AMSv2 SD: use a sleep instead of a udelay for 100 ms delayBertrik Sikken
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29627 a1c6a512-1295-4272-9138-f99709370657
2011-03-20SD AMSv2: fix r29169Rafaël Carré
Restore access to the last AMS_OF_SIZE == 0xF000 sectors of internal drive Mostly visible when using USB (or database?) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29625 a1c6a512-1295-4272-9138-f99709370657
2011-03-20SD amsv2: remove double assignementRafaël Carré
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29624 a1c6a512-1295-4272-9138-f99709370657
2011-03-20Add another delay in the AMSv2 sd controller driver as a work-around for SD ↵Bertrik Sikken
initialisation problems, see FS#11870 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29619 a1c6a512-1295-4272-9138-f99709370657
2011-03-02Merge functionality of wakeups and semaphores-- fewer APIs and object types. ↵Michael Sevakis
semaphore_wait takes a timeout now so codecs and plugins have to be made incompatible. Don't make semaphores for targets not using them. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29492 a1c6a512-1295-4272-9138-f99709370657
2011-01-29AMSv2 SD: Fix card insert lockups in USB mode. First, get rid of infinite ↵Michael Sevakis
loops and retry those a limited number of times-- no explaination for their dubious existence was offered in the source. Second, SD thread was no longer monitoring inserts (and it wouldn't really matter if it were). Thus, .initialized was reported as '1' despite the new card needing reinit. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29169 a1c6a512-1295-4272-9138-f99709370657
2011-01-18Try to get some control over #ifdef hell in usb.c by refactoring and inline ↵Michael Sevakis
function use. SYS_USB_DISCONNECTED_ACK hasn't been doing anything useful for the USB thread; remove it. USB thread simply ignores that value. Observe only valid usb_state transitions. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29084 a1c6a512-1295-4272-9138-f99709370657
2010-12-26Apply FS#11798 (Files in MicroSD card aren't being shown in File Browser or ↵Bertrik Sikken
Database on Clip+) by Will Sowerbutts git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28903 a1c6a512-1295-4272-9138-f99709370657
2010-12-12AMSv2: handle sd card ACMDs similar to how it's done for AMSv1Bertrik Sikken
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28814 a1c6a512-1295-4272-9138-f99709370657
2010-12-12AMSv2: only switch sd cards to high speed mode for for v2 sd cards, just ↵Bertrik Sikken
like is done for AMSv1 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28808 a1c6a512-1295-4272-9138-f99709370657
2010-09-08Change sd-as3525*.c to the new cache coherency function names.Thomas Martitz
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28046 a1c6a512-1295-4272-9138-f99709370657
2010-08-28AMSv2: remove a bunch of panicf() in SD driverRafaël Carré
The driver is stable so we can use error codes for debugging Fix 2 problems in error code path: - release sd mutex - release dma module when needed git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27915 a1c6a512-1295-4272-9138-f99709370657
2010-08-25typo in r27876Rafaël Carré
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27878 a1c6a512-1295-4272-9138-f99709370657
2010-08-25sd-as3525*: use AS3525_PHYSICAL_ADDRRafaël Carré
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
2010-08-12Introduce NORETURN_ATTR wrapper for __attribute__((noreturn)), using this ↵Thomas Martitz
and a bit further cleanup in main gets rid of a warning when compiling for android. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27788 a1c6a512-1295-4272-9138-f99709370657
2010-07-22Correction to previous commit: fix condition to include backlight-target.h ↵Bertrik Sikken
(not needed for clip+) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27521 a1c6a512-1295-4272-9138-f99709370657
2010-07-22Sansa Clip+: detect AMSv2 variant (just like was already done for fuze v2), ↵Bertrik Sikken
this makes SD transfers work for newer clip+ players ("COMBO4E" type). Variable fuzev2_variant has been renamed to amsv2_variant. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27520 a1c6a512-1295-4272-9138-f99709370657
2010-07-20Revert r26290Rafaël Carré
If the card is not actively deselected on newer Fuzev2, frequent switches between internal storage and µSD will lock up. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27500 a1c6a512-1295-4272-9138-f99709370657
2010-07-19newer Fuzev2 doesn't seem to use B5 for button lightRafaël Carré
playing from µSD now works to some degree database update or copy between the 2 drives lock up git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27496 a1c6a512-1295-4272-9138-f99709370657
2010-07-19as3525*: use atomic bit manipulation for CCU_IORafaël Carré
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
2010-07-19Support new Fuzev2 revisions (fuzev2_variant == 1)Rafaël Carré
- Revert BUTTON_HOME - Modifications to SD driver (µSD not working yet) TODO: µSD and FM radio git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27492 a1c6a512-1295-4272-9138-f99709370657
2010-07-19sd-as3525v2: remove unneeded prototypesRafaël Carré
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27488 a1c6a512-1295-4272-9138-f99709370657
2010-07-02AMS SoC's: Some register bit changes need interrupt protection: timer API ↵Michael Sevakis
and CGU_PERI. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27236 a1c6a512-1295-4272-9138-f99709370657
2010-06-23revert r27044 (which was a revert of r26953 & r26954)Rafaël Carré
The bug was in playback.c and was fixed in previous commit git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27074 a1c6a512-1295-4272-9138-f99709370657
2010-06-22revert r26953 + r26954Rafaël Carré
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
2010-06-19fix r26953: use physical address for DMA buffer, also for IRAMRafaël Carré
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
2010-06-19sd-as3525*: handle aligned transfers without memcpy()Rafaël Carré
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
2010-06-16FS#11402 by me : sd_enable for Sansa AMSv2Rafaël Carré
Gets a bit more battery life Adjust current usage, it was a bit too low for Clipv2/Clip+ git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26866 a1c6a512-1295-4272-9138-f99709370657
2010-06-06sd-as3525v2: check the (supposedly) card data line for business when writingRafaël Carré
Fix panics when deleting large files from µSD Tested on problematic Transcend 4GB Class 6 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26631 a1c6a512-1295-4272-9138-f99709370657
2010-06-06Remove card_enable_monitoring() and use a mutex instead. The ↵Frank Gevaerts
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-05remane hotswap.* to sdmmc.*. The contents have nothing at all to do with ↵Frank Gevaerts
hotswapping things git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26598 a1c6a512-1295-4272-9138-f99709370657