1
0
Fork 0
forked from len0rd/rockbox
foxbox/firmware/export
Rafaël Carré d3e783b268 Fix the Sansa AMS SD driver
- Make write_sectors() function fail.
- Disable interrupts while transferring data and do not yield(), so we are sure the FIFO is not overflowed
Note this solution is only temporary since it's not friendly to other threads and confuse kernel tick precision
This will be reverted when we will be using DMA to access the SD card, but for now it permits further development
- PL180: Rename the MMC_* registers into MCI_*, to not make people believe it is a MMC only controller
- Supports non aligned destination buffers when reading
- Correct the timeout units which were lamely copied from ata-sd-pp.c and were in milliseconds (note that the timeouts are disabled now)
- Higher a bit the stack size
- Use the full initialization procedure in the bootloader and the loaded firmware
- Use the CCU_IO register only when a SD slot is present
- Put some panicf() around to catch problems

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19122 a1c6a512-1295-4272-9138-f99709370657
2008-11-16 22:26:50 +00:00
..
adc.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
as3514.h Remove some unneeded #includes 2008-11-14 22:14:40 +00:00
as3525.h AS3525: implement tick_start() with TIMER2 2008-11-06 14:34:37 +00:00
ascodec.h Oops, fix red - only include ascodec-target.h when HAVE_AS3514 is defined 2008-10-31 00:37:58 +00:00
ata.h *_hard_reset() is only used inside ata.c, so there's no need to export it to the world 2008-11-04 19:37:28 +00:00
ata_idle_notify.h Apply FS#9500. This adds a storage_*() abstraction to replace ata_*(). To do that, it also introduces sd_*, nand_*, and mmc_*. 2008-11-01 16:14:28 +00:00
ata_mmc.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
audio.h Moved pcm_record from firmware to apps. Cleaned up some. Now all code using struct mp3entry is in apps. 2008-10-14 11:12:20 +00:00
audiohw.h Use shorter fields in sound_settings_info struct to save some bytes 2008-08-11 13:01:01 +00:00
backlight.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
bidi.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
bitswap.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
buffer.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
button.h Commit FS#9308: differentiate between TOUCHPAD & TOUCHSCREEN 2008-08-23 09:46:38 +00:00
config-c100.h fix reds 2008-11-01 16:49:38 +00:00
config-c200.h cleanup storage defines 2008-10-31 21:25:04 +00:00
config-clip.h AMS Sansa (formerly 'V2') use the as3514 RTC 2008-11-10 18:18:27 +00:00
config-cowond2.h fix reds 2008-11-01 16:49:38 +00:00
config-creativezv.h cleanup storage defines 2008-10-31 21:25:04 +00:00
config-creativezvm.h cleanup storage defines 2008-10-31 21:25:04 +00:00
config-creativezvm60gb.h cleanup storage defines 2008-10-31 21:25:04 +00:00
config-e200.h cleanup storage defines 2008-10-31 21:25:04 +00:00
config-e200v2.h AMS Sansa (formerly 'V2') use the as3514 RTC 2008-11-10 18:18:27 +00:00
config-fmrecorder.h cleanup storage defines 2008-10-31 21:25:04 +00:00
config-fuze.h AMS Sansa (formerly 'V2') use the as3514 RTC 2008-11-10 18:18:27 +00:00
config-gigabeat-s.h cleanup storage defines 2008-10-31 21:25:04 +00:00
config-gigabeat.h Revert last commit (accidentally committed the whole tree) 2008-11-12 04:15:34 +00:00
config-h10.h cleanup storage defines 2008-10-31 21:25:04 +00:00
config-h10_5gb.h cleanup storage defines 2008-10-31 21:25:04 +00:00
config-h100.h cleanup storage defines 2008-10-31 21:25:04 +00:00
config-h120.h cleanup storage defines 2008-10-31 21:25:04 +00:00
config-h300.h cleanup storage defines 2008-10-31 21:25:04 +00:00
config-hdd1630.h cleanup storage defines 2008-10-31 21:25:04 +00:00
config-iaudio7.h fix reds 2008-11-01 16:49:38 +00:00
config-iaudiom3.h cleanup storage defines 2008-10-31 21:25:04 +00:00
config-iaudiom5.h cleanup storage defines 2008-10-31 21:25:04 +00:00
config-iaudiox5.h cleanup storage defines 2008-10-31 21:25:04 +00:00
config-ifp7xx.h cleanup storage defines 2008-10-31 21:25:04 +00:00
config-ipod1g2g.h cleanup storage defines 2008-10-31 21:25:04 +00:00
config-ipod3g.h cleanup storage defines 2008-10-31 21:25:04 +00:00
config-ipod4g.h cleanup storage defines 2008-10-31 21:25:04 +00:00
config-ipodcolor.h cleanup storage defines 2008-10-31 21:25:04 +00:00
config-ipodmini.h cleanup storage defines 2008-10-31 21:25:04 +00:00
config-ipodmini2g.h cleanup storage defines 2008-10-31 21:25:04 +00:00
config-ipodnano.h cleanup storage defines 2008-10-31 21:25:04 +00:00
config-ipodvideo.h cleanup storage defines 2008-10-31 21:25:04 +00:00
config-logikdax.h fix reds 2008-11-01 16:49:38 +00:00
config-m200.h fix reds 2008-11-01 16:49:38 +00:00
config-m200v4.h m200v4: make buttons work again (added a small delay). make m200 keymap better. Add button mappings for the sim. Remove some config defines temporary to make building work again. 2008-11-14 21:57:43 +00:00
config-meizu-m3.h Add new storage-related defines for meizu 2008-11-01 17:25:49 +00:00
config-meizu-m6sl.h Add new storage-related defines for meizu 2008-11-01 17:25:49 +00:00
config-meizu-m6sp.h Add new storage-related defines for meizu 2008-11-01 17:25:49 +00:00
config-mrobe100.h cleanup storage defines 2008-10-31 21:25:04 +00:00
config-mrobe500.h cleanup storage defines 2008-10-31 21:25:04 +00:00
config-ondavx747.h Onda VX747: 2008-11-05 00:24:46 +00:00
config-ondavx767.h Onda VX747: 2008-11-04 20:30:01 +00:00
config-ondiofm.h cleanup storage defines 2008-10-31 21:25:04 +00:00
config-ondiosp.h cleanup storage defines 2008-10-31 21:25:04 +00:00
config-player.h cleanup storage defines 2008-10-31 21:25:04 +00:00
config-recorder.h cleanup storage defines 2008-10-31 21:25:04 +00:00
config-recorderv2.h cleanup storage defines 2008-10-31 21:25:04 +00:00
config-sa9200.h cleanup storage defines 2008-10-31 21:25:04 +00:00
config-tpj1022.h cleanup storage defines 2008-10-31 21:25:04 +00:00
config.h AMS Sansa (formerly 'V2') use the as3514 RTC 2008-11-10 18:18:27 +00:00
config_caps.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
cpu.h Commit FS#9467 - initial work on port to Sansa Clip by Rafaël Carré and François Dinel. A few cosmetic changes were made by me prior to committing: 1) TAB policing in button-clip.c; 2) Add François Dinel to CREDITS; 3) Add François Dinel as (C) holder in button-target.h (it was previously blank); 4) Add Rockbox header to bootloader/sansa_as3525.c with Rafaël Carré as (C) holder; 5) Change target_id to 50 (next available number) in tools/configure and fixed indentation; 6) Change MODEL_NUMBER in config-clip.h to 50 (next available number); 7) Remove unused in/out macros from system-target.h 2008-10-12 16:46:01 +00:00
debug.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
disk.h Apply FS#9500. This adds a storage_*() abstraction to replace ata_*(). To do that, it also introduces sd_*, nand_*, and mmc_*. 2008-11-01 16:14:28 +00:00
dm320.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
ds2411.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
eeprom_24cxx.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
eeprom_settings.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
enc_base.h New recording setting to configure how mono recordings are made. Previously, this was always L+R, which was kinda silly if your signal was on L only. This setting allows for L, R or L+R. SWCODEC only for now, to be added for HWCODEC (although that will only be L and L+R probably) 2008-10-08 22:18:16 +00:00
events.h Accept FS#9480 - centralise and organise the events in the apps/ layer. 2008-10-16 10:38:03 +00:00
fat.h Apply FS#9500. This adds a storage_*() abstraction to replace ata_*(). To do that, it also introduces sd_*, nand_*, and mmc_*. 2008-11-01 16:14:28 +00:00
fmradio.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
fmradio_i2c.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
font.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
gdb_api.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
general.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
generic_i2c.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
hangul.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
hd66789r.h Commit fs#9404 (iAudio 7 updates by vitja). Also fixes play/pause behaviour on D2. 2008-09-16 08:09:44 +00:00
hotswap.h cleanup storage defines 2008-10-31 21:25:04 +00:00
hwcompat.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
i2c-coldfire.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
i2c-pp.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
i2c.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
i2s.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
ifp_usb_serial.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
imx31l.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
isp1362.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
isp1583.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
jz4740.h Onda VX747: 2008-11-04 20:30:01 +00:00
kernel.h Fix red-- it should. 2008-10-27 17:18:01 +00:00
lcd-charcell.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
lcd-remote.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
lcd.h Make lcd_set_enable_hook() conditional on HAVE_LCD_ENABLE and HAVE_LCD_COLOR 2008-10-31 21:48:44 +00:00
led.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
logf.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
ltv350qv.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
lv24020lp.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
m5636.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
mas.h Moved pcm_record from firmware to apps. Cleaned up some. Now all code using struct mp3entry is in apps. 2008-10-14 11:12:20 +00:00
mas35xx.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
mc13783.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
mcf5249.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
mcf5250.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
mips-archdefs.h And set svn:eol-style ... 2008-07-14 15:19:29 +00:00
mips.h And set svn:eol-style ... 2008-07-14 15:19:29 +00:00
mipsregs.h Onda VX747: 2008-11-04 20:30:01 +00:00
mmc.h Since *set_led_enabled() is actually an ata-specific feature, move it back to ata_* only 2008-11-04 19:57:36 +00:00
mp3_playback.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
mv.h Now also commit added files 2008-11-01 16:25:04 +00:00
nand.h Since *set_led_enabled() is actually an ata-specific feature, move it back to ata_* only 2008-11-04 19:57:36 +00:00
nand_id.h Apply FS#9500. This adds a storage_*() abstraction to replace ata_*(). To do that, it also introduces sd_*, nand_*, and mmc_*. 2008-11-01 16:14:28 +00:00
panic.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
pcf5060x.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
pcf50605.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
pcf50606.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
pcm.h Red build fix: Moved PCM #defines from pcm_record.h to pcm.h. Added necessary #includes to statusbar.c and s1a0903x01.c. 2008-10-14 11:43:32 +00:00
pcm_sampr.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
pl180.h Fix the Sansa AMS SD driver 2008-11-16 22:26:50 +00:00
pnx0101.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
power.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
powermgmt.h cleanup storage defines 2008-10-31 21:25:04 +00:00
pp5002.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
pp5020.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
pp5024.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
profile.h Commit FS#9170 by Dave Hooper. Adds support for profiling on ARM, and fixes various issues with compiling profile builds. Also, note that profile_reader.pl syntax has changed. 2008-07-28 22:43:41 +00:00
qt1106.h set svn properties 2008-09-17 18:50:34 +00:00
r61509.h Fix the LCD bug! 2008-07-16 15:25:35 +00:00
ramdisk.h Since *set_led_enabled() is actually an ata-specific feature, move it back to ata_* only 2008-11-04 19:57:36 +00:00
rolo.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
rtc.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
s1a0903x01.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
s3c2440.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
s5l8700.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
scroll_engine.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
sd.h sd.h : avoid namespace collision by prefixing defines with SD_ 2008-11-09 23:40:21 +00:00
serial.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
sh7034.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
si4700.h Add more driver stubs to make the Fuze and e200v2 main builds compile; Correct the memory definition for the Fuze (8MB) 2008-11-11 14:46:13 +00:00
sound.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
spdif.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
spi.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
storage.h Since *set_led_enabled() is actually an ata-specific feature, move it back to ata_* only 2008-11-04 19:57:36 +00:00
structec.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
sw_i2c.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
system.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
tcc77x.h Initial commit of iaudio 7 port by Vitja Makarov (FS#9245). Port is at quite an advanced stage, but is troubled by the lack of a reliable NAND driver (similar to the Cowon D2 port) and is not yet suitable for non-developers. 2008-09-06 17:50:59 +00:00
tcc780x.h Add some missed bits + change MODE to TMODE 2008-09-22 19:27:21 +00:00
tea5767.h code police : fix some multiply defined variables 2008-10-18 23:31:29 +00:00
thread.h Onda VX747: 2008-09-14 16:26:08 +00:00
timer.h Commit FS#9467 - initial work on port to Sansa Clip by Rafaël Carré and François Dinel. A few cosmetic changes were made by me prior to committing: 1) TAB policing in button-clip.c; 2) Add François Dinel to CREDITS; 3) Add François Dinel as (C) holder in button-target.h (it was previously blank); 4) Add Rockbox header to bootloader/sansa_as3525.c with Rafaël Carré as (C) holder; 5) Change target_id to 50 (next available number) in tools/configure and fixed indentation; 6) Change MODEL_NUMBER in config-clip.h to 50 (next available number); 7) Remove unused in/out macros from system-target.h 2008-10-12 16:46:01 +00:00
tlv320.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
tsc2100.h Minor missing #include and static function fixes for mrobe 2008-09-10 20:14:22 +00:00
tuner.h Add more driver stubs to make the Fuze and e200v2 main builds compile; Correct the memory definition for the Fuze (8MB) 2008-11-11 14:46:13 +00:00
uda1380.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
usb-tcc7xx.h Prepare for usb-telechips testing 2008-09-22 18:49:37 +00:00
usb.h Add more driver stubs to make the Fuze and e200v2 main builds compile; Correct the memory definition for the Fuze (8MB) 2008-11-11 14:46:13 +00:00
usb_ch9.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
usb_core.h reorganise the USB stack a bit to allow for easier integration of non-ARC controller drivers 2008-10-03 22:43:16 +00:00
usb_drv.h reorganise the USB stack a bit to allow for easier integration of non-ARC controller drivers 2008-10-03 22:43:16 +00:00
wm8721.h Remove the audiohw_set_nsorder() function since it is not used, only implemented on WM8731 and not wanted/used there. 2008-10-18 22:37:41 +00:00
wm8731.h Remove the audiohw_set_nsorder() function since it is not used, only implemented on WM8731 and not wanted/used there. 2008-10-18 22:37:41 +00:00
wm8751.h cleanup some audio driver headers 2008-07-02 23:01:21 +00:00
wm8758.h Remove the audiohw_set_nsorder() function since it is not used, only implemented on WM8731 and not wanted/used there. 2008-10-18 22:37:41 +00:00
wm8975.h Remove the audiohw_set_nsorder() function since it is not used, only implemented on WM8731 and not wanted/used there. 2008-10-18 22:37:41 +00:00
wm8978.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
wm8985.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
wmcodec.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00