summaryrefslogtreecommitdiff
path: root/firmware/drivers/ata_mmc.c (follow)
Commit message (Collapse)AuthorAge
* Move ata_mmc.c into target tree as it is SH (ondio) specific. Associated ↵Marcin Bukat2011-03-01
| | | | | | header file is left intact as it seems to be used in many places for historical reasons git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29478 a1c6a512-1295-4272-9138-f99709370657
* All kernel objects in code shared amongs targets (core, plugins, codecs) ↵Michael Sevakis2011-02-14
| | | | | | should be declared SHAREDBSS_ATTR as any core could potentially touch them even though they seem only to involve threads on one core. The exception is target code for particular CPUs where proper allocation is fixed. playlist.c was a little odd too-- use one mutex for the current playlist and a separate one for created playlists (still pondering the necessity of more than one). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29305 a1c6a512-1295-4272-9138-f99709370657
* Make mutexes a tiny bit leaner. There is no need for a separate locked ↵Michael Sevakis2010-12-26
| | | | | | semaphore since having an owning thread also indicates that it is locked. Rename member 'count' to 'recursion' since it counts reentry, not locks. Change presents no compatibility issues for plugins or codecs because the structure size goes down. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28901 a1c6a512-1295-4272-9138-f99709370657
* Remove card_enable_monitoring() and use a mutex instead. The ↵Frank Gevaerts2010-06-06
| | | | | | 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
* remane hotswap.* to sdmmc.*. The contents have nothing at all to do with ↵Frank Gevaerts2010-06-05
| | | | | | hotswapping things git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26598 a1c6a512-1295-4272-9138-f99709370657
* Simplify some expressions using the ? operatorBertrik Sikken2010-01-01
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24136 a1c6a512-1295-4272-9138-f99709370657
* Make sd_present() and mmc_present() look only at the actual presence of a ↵Frank Gevaerts2009-07-20
| | | | | | card, not at initialisation state git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21981 a1c6a512-1295-4272-9138-f99709370657
* Commit FS#9545, storage cleanup and multi-driver supportFrank Gevaerts2009-07-17
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21933 a1c6a512-1295-4272-9138-f99709370657
* card_extract_bits() take the start bit argument as defined in public SanDisk ↵Rafaël Carré2009-07-01
| | | | | | specifications for SD and MMC, i.e. bit 0 is the lsb git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21600 a1c6a512-1295-4272-9138-f99709370657
* Merge tCardInfo struct (MMC) and tSDCardInfo struct (SD)Rafaël Carré2009-07-01
| | | | | | | | | | | | | | | | | Put specific members under #ifdef (CONFIG_STORAGE & STORAGE_xx) (2 members for SD and 1 for MMC) Fix a typo: tsac doesn't exist and must be read taac Move card_get_info functions declaration inside hotswap.h to remove mutual inclusion of ata_mmc.h and hotswap.h Move static const data structures from SD drivers into sd.h (sd_exponent and sd_mantissa) Fix sd_command prototypes in SD drivers (card registers are unsigned long) Fix speed calculation in Sansa AMS driver (PP SD driver needs to be checked) Move ata-sd-target.h to sd-pp-target.h to reflect the PP specifity. Now it only contains declaration of microsd_int() Remove unused ata-sd-target.h for injenic TODO: - check if CSD register bits are extracted correctly in PP driver - correctly define read_timeout and write_timeout unit for MMC & SD, and use timeouts in Sansa AMS driver git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21586 a1c6a512-1295-4272-9138-f99709370657
* Convert a number of places in core and plugins to use the BIT_N() macro ↵Jens Arnold2009-06-07
| | | | | | instead of 1<<n. Speeds up things on SH1, and also reduces core binsize. Most notable speedups: 1 bit lcd driver: drawpixel +20%, drawline + 27%, hline +5%; jpeg viewer: +8% for 1/8 scaling. Other targets are unaffected. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21205 a1c6a512-1295-4272-9138-f99709370657
* implement single-driver storage layer with macros instead of inlinesFrank Gevaerts2008-11-02
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18975 a1c6a512-1295-4272-9138-f99709370657
* conditionalise *_get_info() to get some binsize backFrank Gevaerts2008-11-01
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18965 a1c6a512-1295-4272-9138-f99709370657
* Apply FS#9500. This adds a storage_*() abstraction to replace ata_*(). To do ↵Frank Gevaerts2008-11-01
| | | | | | | | | that, it also introduces sd_*, nand_*, and mmc_*. This should be a good first step to allow multi-driver targets, like the Elio (ATA/SD), or the D2 (NAND/SD). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18960 a1c6a512-1295-4272-9138-f99709370657
* Some more size optimisations, giving a tiny write speedup as well.Jens Arnold2008-09-19
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18552 a1c6a512-1295-4272-9138-f99709370657
* Change the way send_cmd() returns data to make it cleaner and save binsize. ↵Jens Arnold2008-09-19
| | | | | | Also change the command composition for the same reasons. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18551 a1c6a512-1295-4272-9138-f99709370657
* Further MMC driver touchup: * Save a tiny amount of power by not enabling ↵Jens Arnold2008-09-17
| | | | | | the internal flash clock when accessing the MMC. * R2W factors > 32 are valid in newer MMC specs, so don't limit to 32 anymore. * Revise the port setup, and only do the basic setup once. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18541 a1c6a512-1295-4272-9138-f99709370657
* Fix error handling in multiple block read and multiple block write state. ↵Jens Arnold2008-09-15
| | | | | | When an error occurs, the host still needs to send CMD_STOP_TRANSMISSION resp. the STOP_TRAN token. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18524 a1c6a512-1295-4272-9138-f99709370657
* Implement chasing bitswap for reading. Speeds up reading single 512-byte ↵Jens Arnold2008-09-14
| | | | | | blocks by 15..20%. * Restructure the write buffer handling a bit, making it more readable and a bit smaller. Also fixes an old corner case bug: writing data from address 0x0 (archos boot ROM dump) would have written wrong data. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18516 a1c6a512-1295-4272-9138-f99709370657
* Simplify & fix the MMC driver. After more than 3 years I found that the MMC ↵Jens Arnold2008-09-14
| | | | | | specs were a bit misleading, and the 'large' MMC which state a block size of 1024 or 2048 bytes and no partial read and/or partial write capability are happily accepting a block size of 512 bytes. So go KISS and remove all the variable/partial block handling code. This fixes the driver for the Transcend 4GB MMCplus, which doesn't cope when we actually set the 2048 byte block size it states. It also makes write operations involving small blocks faster and more reliable. * Note: The 4GB Transcend still doesn't work when plugged at boot, but works when hotplugged. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18515 a1c6a512-1295-4272-9138-f99709370657
* Updated our source code header to explicitly mention that we are GPL v2 orDaniel Stenberg2008-06-28
| | | | | | | | | later. We still need to hunt down snippets used that are not. 1324 modified files... http://www.rockbox.org/mail/archive/rockbox-dev-archive-2008-06/0060.shtml git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17847 a1c6a512-1295-4272-9138-f99709370657
* No need to have \n here. panicf() won't output it anyway.Jens Arnold2008-03-08
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16577 a1c6a512-1295-4272-9138-f99709370657
* Revert accidental tree commit. Sorry for that.Jens Arnold2008-03-08
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16574 a1c6a512-1295-4272-9138-f99709370657
* No need to have \n here. panicf() won't output it anyway.Jens Arnold2008-03-08
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16570 a1c6a512-1295-4272-9138-f99709370657
* Remove sector 0 write protection from the ATA and MMC drivers. The one in ↵Jens Arnold2008-02-22
| | | | | | the ATA driver makes it impossible to change sector 0 from within rockbox USB mode, and nobody reported having seen that sector 0 panic for a loong time. Afaik it dates back to when ATA and filesystem write support were developed. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16370 a1c6a512-1295-4272-9138-f99709370657
* Proper mutexing in the MMC driver's ata_init(), resembling what is done in ↵Jens Arnold2008-01-20
| | | | | | the ata driver. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16116 a1c6a512-1295-4272-9138-f99709370657
* Finally full multicore support for PortalPlayer 502x targets with an eye ↵Michael Sevakis2007-10-16
| | | | | | towards the possibility of other types. All SVN targets the low-lag code to speed up blocking operations. Most files are modified here simple due to a name change to actually support a real event object and a param change to create_thread. Add some use of new features but just sit on things for a bit and leave full integration for later. Work will continue on to address size on sensitive targets and simplify things if possible. Any PP target having problems with SWP can easily be changed to sw corelocks with one #define change in config.h though only PP5020 has shown an issue and seems to work without any difficulties. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15134 a1c6a512-1295-4272-9138-f99709370657
* Accept FS#7134 - Sansa: external sd card support by Antonius Hellmann with ↵Michael Sevakis2007-06-30
| | | | | | some tweaks. All testers have given the green light. (Now for the RED ?? ;). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13741 a1c6a512-1295-4272-9138-f99709370657
* Moved SH1 system code to target tree. * First shot at hwcompat cleanup.Jens Arnold2007-04-11
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13114 a1c6a512-1295-4272-9138-f99709370657
* Dual core support for PP502x players (iPod G4 and later, iriver h10, Sansa - ↵Daniel Ankers2007-03-04
| | | | | | iPod G3 will be coming soon.) This allows threads to be run on either core provided that all communications between the cores is done using uncached memory. There should be no significant change in battery life from doing this. Documentation (on the RockboxKernel wiki page) will follow shortly. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12601 a1c6a512-1295-4272-9138-f99709370657
* Settings are now stored in /.rockbox/config.cfg instead of the hidden ↵Jonathan Gordon2007-01-23
| | | | | | sector. (FS #6557) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12093 a1c6a512-1295-4272-9138-f99709370657
* Woops. Missed a file.Michael Sevakis2006-12-19
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11819 a1c6a512-1295-4272-9138-f99709370657
* Get rid of ages-old interdependency between ata.c and mas.cJens Arnold2006-11-12
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11519 a1c6a512-1295-4272-9138-f99709370657
* Ondio: Better activity monitoring for 'ata' idle notification.Jens Arnold2006-11-09
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11481 a1c6a512-1295-4272-9138-f99709370657
* Bah, Linus was right, trying to call the ata_idle callbacks on usb andJonathan Gordon2006-11-09
| | | | | | | | shutdown doesnt work. Threads with callbacks must handle these 2 events instead. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11477 a1c6a512-1295-4272-9138-f99709370657
* Missed one hotswap ifdef...Jens Arnold2006-11-08
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11466 a1c6a512-1295-4272-9138-f99709370657
* Fix idle monitoring to not freeze the Ondio, and add it in a more elegant ↵Jens Arnold2006-11-08
| | | | | | way. Fixed hotswap ifdefing. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11465 a1c6a512-1295-4272-9138-f99709370657
* fix booboo in ata.c (SYS_POWEROFF falling into SYS_USB_CONNECTED)Jonathan Gordon2006-11-08
| | | | | | | | | enable ata_idle callbacks in ata_mmc.c (calls the callbacks after 10s of real inactivity) fix builds git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11462 a1c6a512-1295-4272-9138-f99709370657
* * changes to ata.c - idle callbacks are called after 2 sec of real idle,Jonathan Gordon2006-11-08
| | | | | | | | | | | | and shutdown and usb (it makes sense here). ata_sleep doesnt get broken by callbacks. * allow ata_sleep() at the end of buffering again * config block uses ata_idle instead of delayed sector when saving * remove delayed sector code from ata_mmc.c (idle callbacks are not yet implemented for ata_mmc.c tho) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11461 a1c6a512-1295-4272-9138-f99709370657
* New scheduler, with priorities for swcodec platforms. Frequent taskMiika Pekkarinen2006-09-16
| | | | | | | | | | switching should be more efficient and tasks are stored in linked lists to eliminate unnecessary task switching to improve performance. Audio should no longer skip on swcodec targets caused by too CPU hungry UI thread or background threads. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10958 a1c6a512-1295-4272-9138-f99709370657
* Ondio: (Hopefully) fix the occasional freezes during playback: Use DMA ↵Jens Arnold2006-05-07
| | | | | | channel 0 for MMC transfer. As it has higher priority than channel 3 (used for playback), the risk of serial receive overruns is minimised. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9885 a1c6a512-1295-4272-9138-f99709370657
* Removed unused ata_standby(), changed return type of ata_sleep() to void, ↵Jens Arnold2005-11-07
| | | | | | removed misleading comment from ata.h git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7782 a1c6a512-1295-4272-9138-f99709370657
* Ondio: Fix multivolume and hotswap for the old MMC clock circuit.Jens Arnold2005-05-22
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6502 a1c6a512-1295-4272-9138-f99709370657
* (1) Early USB detection on boot, before trying to mount the partitions. ↵Jens Arnold2005-05-17
| | | | | | Cleaner & quicker; removes the need for the extra USB check at the top of ask_resume() which caused a deadlock in screenshot mode (see patch #1110332). On Ondio, this allows to leave an MMC in the slot when booting with USB connected for instant access. (2) Ondio: Track MMC status, only ask to remove the card if required. Probe MMC status if unknown. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6488 a1c6a512-1295-4272-9138-f99709370657
* Hotswap: Better placement for switching the MMC monitor off/on.Jens Arnold2005-05-16
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6480 a1c6a512-1295-4272-9138-f99709370657
* Hotswap: Avoid mount race at startup and after returning from USB mode.Jens Arnold2005-05-16
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6479 a1c6a512-1295-4272-9138-f99709370657
* Some code cleanup.Jens Arnold2005-05-14
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6471 a1c6a512-1295-4272-9138-f99709370657
* Improved bitfield handling for settings and MMC (more straigtforward, ↵Jens Arnold2005-05-04
| | | | | | smaller code). This switches the order for fields crossing a longword boundary, so the config block version bump is necessary. Save your settings to a file before upgrading. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6404 a1c6a512-1295-4272-9138-f99709370657
* MMC driver: More flexible background copy & bitswap concept, using global ↵Jens Arnold2005-05-02
| | | | | | variables - slightly less read latency when both partial and full blocks are involved. Some code cleanup. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6393 a1c6a512-1295-4272-9138-f99709370657
* Speed optimisations: (1) Read, write: Use single/multiple block commands ↵Jens Arnold2005-04-28
| | | | | | depending on the block count. (2) Write: Combine first partial sector transfer (after caching) & main loop into one block-transfer sequence. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6381 a1c6a512-1295-4272-9138-f99709370657