summaryrefslogtreecommitdiff
path: root/drivers/mmc/host
AgeCommit message (Collapse)Author
2008-07-27imxmmc: fix crash when no platform data is providedPaulius Zaleckas
Don't crash if no platform data is provided. In this case assume that card is present. Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt> Acked-by: Pavel Pisa <pisa@cmp.felk.cvut.cz> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-07-27imxmmc: fix platform resourcesPaulius Zaleckas
Fixup platform resources handling. Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt> Acked-by: Pavel Pisa <pisa@cmp.felk.cvut.cz> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-07-27imxmmc: remove DEBUG definitionPaulius Zaleckas
Removed DEBUG #define #undef, because module is automaticaly compiled with -DDEBUG when CONFIG_MMC_DEBUG is defined. Currently it just generates compiler warning about redefinition. Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt> Acked-by: Pavel Pisa <pisa@cmp.felk.cvut.cz> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-07-24mmc_spi: put signals to low power off fixJan Nikitenko
The original intention was to write a zero byte to mmc to force spi signals to low when doing power off. Somehow the spi_w8r8 call got there so a read followed the write of single zero byte. This patch changes that to simple write of zero byte without the following read. This way the power off is more reliable and completely sufficient. Signed-off-by: Jan Nikitenko <jan.nikitenko@gmail.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-07-23sdhci: highmem capable PIO routinesPierre Ossman
Improve the PIO handling so that it can service highmem pages. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-07-23sdhci: fix bad warning from commit c8b3e02Pierre Ossman
Commit c8b3e02 renamed a variable, but missed one reference to it inside a WARN_ON, causing it to incorrectly trigger. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-07-23sdhci: add warnings for bad buffers in ADMA pathPierre Ossman
The ADMA code path assumes that the 3 byte alignment fix doesn't cross a page boundary. I'm not convinced this is worth supporting, but at least print a warning in the off chance we'll actually see such a request. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-07-23s3cmci: ensure host stopped on machine shutdownBen Dooks
Ensure that the s3cmci host controller is turned off when the machine is shutdown, otherwise we end up leaving the card powered and processing insertion and removal events after the system prints "System halted." Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-07-23au1xmmc: suspend/resume implementationManuel Lauss
Basic suspend/resume support: disable peripheral on suspend and reinit on resume. Tested on Au1200. Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-07-23s3cmci: fixes for section mismatch warningsBen Dooks
Fix the naming of various functions in the s3cmc driver to stop triggering section mismatch warnings. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-07-23pxamci: trivial fix of DMA alignment register bit clearingKarl Beldan
Signed-off-by: Karl Beldan <karl.beldan@gmail.com> Acked-by: Eric Miao <eric.miao@marvell.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-07-15mmc: host driver for Ricoh Bay1ControllersSascha Sommer
Signed-off-by: Sascha Sommer <saschasommer@freenet.de> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-07-15mmc: OLPC: update vdd/powerup quirk commentAndres Salomon
This comment update got lost in the great floo^Wmerge. As Pierre pointed out, no one knows what 'CaFe' is. Signed-off-by: Andres Salomon <dilinger@debian.org> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-07-15mmc: fix spares errors of sdhci.cTomas Winkler
1. sdhci_prepare_data: fix shadowing of count variable u8 count int count -> sg_cnt; 2. sdhci_add_host: assignment of integer to pointer dma_mask = 0 -> dma_mask = NULL; Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-07-15mmc: remove multiwrite capabilityPierre Ossman
Relax requirements on host controllers and only require that they do not report a transfer count than is larger than the actual one (i.e. a lower value is okay). This is how many other parts of the kernel behaves so upper layers should already be prepared to handle that scenario. This gives us a performance boost on MMC cards. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-07-15wbsd: fix bad dma_addr_t conversionPierre Ossman
DMA addresses are not pointers, so don't treat them as such. Avoids compiler warnings when using 64-bit DMA addresses on a 32-bit system. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-07-15atmel-mci: Driver for Atmel on-chip MMC controllersHaavard Skinnemoen
This is a driver for the MMC controller on the AP7000 chips from Atmel. It should in theory work on AT91 systems too with some tweaking, but since the DMA interface is quite different, it's not entirely clear if it's worth merging this with the at91_mci driver. This driver has been around for a while in BSPs and kernel sources provided by Atmel, but this particular version uses the generic DMA Engine framework (with the slave extensions) instead of an avr32-only DMA controller framework. This driver can also use PIO transfers when no DMA channels are available, and for transfers where using DMA may be difficult or impractical for some reason (e.g. the DMA setup overhead is usually not worth it for very short transfers, and badly aligned buffers or lengths are difficult to handle.) Currently, the driver only support PIO transfers. DMA support has been split out to a separate patch to hopefully make it easier to review. The driver has been tested using mmc-block and ext3fs on several SD, SDHC and MMC+ cards. Reads and writes work fine, with read transfer rates up to 3.5 MiB/s on fast cards with debugging disabled. The driver has also been tested using the mmc_test module on the same cards. All tests except 7, 9, 15 and 17 succeed. The first two are unsupported by all the cards I have, so I don't know if the driver handles this correctly. The last two fail because the hardware flags a Data CRC Error instead of a Data Timeout error. I'm not sure how to deal with that. Documentation for this controller can be found in many data sheets from Atmel, including the AT32AP7000 data sheet which can be found here: http://www.atmel.com/dyn/products/datasheets.asp?family_id=682 Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-07-15mmc: wbsd.c fix shadowing of 'dma' variableTomas Winkler
This patch fix warning :shadowing dma variable and made use of module_param_named instead of module_param Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-07-15MMC: S3C24XX: Refuse incorrectly aligned transfersBen Dooks
The hardware does not support any multi-block transfers with an block-size that is not 32bit aligned. Also the driver itself does not support single block non-32bit transfers either. Ensure that the s3cmci_setup_data() returns the appropriate error if we encounter this. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-07-15MMC: S3C24XX: Update error debugging.Ben Dooks
Add better debugging to show where errors are being generated, as some error codes can come from several different code paths. Also fix the error return path from s3cmci_setup_data() to return the error it returned to the request. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-07-15MMC: S3C24XX: Add media presence test to request handling.Ben Dooks
Ensure that we have physical media present before attempting to send a request to a card. This ensures that we do not get flooded by errors from commands that can never be completed timing out. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-07-15MMC: S3C24XX: Fix use of msecs where jiffies are neededBen Dooks
mmc_detect_change() takes jiffies, not msecs. Convert the previous value of msecs into jiffies before calling. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-07-15MMC: S3C24XX: Add MODULE_ALIAS() entries for the platform devicesBen Dooks
Add MODULE_ALIAS() declerations for all the supported platform devices for this driver. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-07-15MMC: S3C24XX: Fix s3c2410_dma_request() return code check.Ben Dooks
The driver should be checking for a negative error code from s3c2410_dma_request(), not non-zero. Newer kernels now return the DMA channel number that was allocated by the request. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-07-15MMC: S3C24XX: Allow card-detect on non-IRQ capable pinBen Dooks
Add support to the S3C24XX MMC driver to have the card detect be on a pin that is not IRQ capable. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-07-15MMC: S3C24XX: Ensure host->mrq->data is validBen Dooks
Fix a crash if host->mrq->data is NULL on ending a transfer. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-07-15MMC: S3C24XX: Add support to invert write protect lineBen Dooks
Support for inverting the sense of the MMC driver's write protect detection line. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-07-15MMC: S3C24XX: Add platform data for MMC/SD driverBen Dooks
This patch adds platform data support to the s3mci driver. This allows flexible board-specific configuration of set_power, card detect and read only pins. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-07-15MMC: Fix S3C24XX IRQ enable during PIO transfersRoman Moracik
Fix Bug #677 - I/O errors on heavy microSD writes for 2.6.22.x. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-07-15Fix the request finalisation by ensuring the controllerThomas Kleffel
is stopped. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Harald Welte <laforge@openmoko.org> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-07-15MMC: DMA free fix for S3C24XX SD/MMC driverHarald Welte
Bugfix to ensure DMA channel allocated is freed on exit. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-07-15MMC: S3C24XX MMC/SD driver write fixesHarald Welte
This patch is a workaround of some S3C2410 MMC chip bug Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-07-15MMC: S3C24XX MMC/SD driver.Thomas Kleffel
This is the latest S3C MMC/SD driver by Thomas Kleffel with cleanups as suggested by AKPM done by Ben Dooks. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Thomas Kleffel <tk@maintech.de> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-07-15sdhci: graceful handling of bad addressesPierre Ossman
Be a bit more robust and fall back to PIO if someone is feeding us bogus addresses. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-07-15sdhci: scatter-gather (ADMA) supportPierre Ossman
Add support for the scatter-gather DMA mode present on newer controllers. As the mode requires 32-bit alignment, non-aligned chunks are handled by using a bounce buffer. Also add some new quirks to handle controllers that have bugs in the ADMA engine. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-07-15sdhci-pci: don't penalize newer jmicron chipsPierre Ossman
The upcoming JMicron chips will have solved all the currently known bugs, so don't penalize them for older problems. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-07-15au1xmmc: remove custom carddetect poll implementation.Manuel Lauss
The MMC core provides a carddetect poll feature, time to remove the driver's own implementation of it. Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-07-15au1xmmc: abort requests early if no card is present.Manuel Lauss
Don't process an MMC request if no card is present. Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-07-15au1xmmc: codingstyle tidying.Manuel Lauss
Clean up the codebase, no functional changes. - merge the au1xmmc.h header contents into the driver file, - indentation, spelling and style fixes. Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-07-15au1xmmc: SDIO IRQ support.Manuel Lauss
Wire up the SD controllers' SDIO IRQ capability. Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-07-15au1xmmc: enable 4 bit transfer modeManuel Lauss
Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-07-15au1xmmc: remove db1200 board code, rewrite probe.Manuel Lauss
Remove the DB1200 board-specific functions (card present, read-only, activity LED methods) and instead add platform data which is passed to the driver. This also allows for platforms to implement other carddetect schemes (e.g. dedicated irq) without having to pollute the driver code. The poll timer (used for pb1200) is kept for compatibility. With the board-specific stuff gone, the driver's ->probe() code can be cleaned up considerably. Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-07-15at91_mci: Fix byte mode transitions.Ville Syrjala
The byte mode support fails to clear the byte mode bit in the command register, possibly leaving byte mode enabled with the counters programmed in non-byte mode. Signed-off-by: Ville Syrjala <syrjala@sci.fi> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-07-15at91_mci: Cover more AT91RM9200 and AT91SAM9261 errata.Ville Syrjala
According to the documentation the AT91SAM9261 MCI shares the block size limitations of the AT91RM9200 MCI. Also the errata documentation for AT91RM9200 and AT91SAM9261 state that stream commands are not supported. This has not been tested on actual hardware. Signed-off-by: Ville Syrjala <syrjala@sci.fi> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-07-15at91_mci: AT91SAM9260/9263 12 byte write erratum (v2)Ville Syrjala
AT91SAM926[0/3] PDC must write at least 12 bytes. The code compiles and runs but the actual condition for this erratum did not trigger in my tests so it's unclear if it actually works as intended. Signed-off-by: Ville Syrjala <syrjala@sci.fi> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-07-15at91_mci: manage cmd error and data error independentlyNicolas Ferre
In at91_mci_completed_command() function, this patch distinguishes command error and data error. It reports it in the corresponding error field. Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-07-15mmc: at91_mci: do not read irq status twice as it will forget some errorsNicolas Ferre
Reading AT91_MCI_SR again at the end of transfer can corrupt the error reporting. Some fields in the SR register are read-and-clear. Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-07-15mmc: at91_mci: add sdio irq managementEric Benard
Enable SDIO interrupt handling. Signed-off-by: Eric Benard <ebenard@free.fr> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-07-15mmc: at91_mci: add multiwrite switchNicolas Ferre
at91_mci is capable of multiwrite. Enable it before it disappears. Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-07-15mmc: at91_mci: update bytes_xfered value once xfer doneNicolas Ferre
Modify bytes_xfered value after a write. That will report, as accurately as possible, the amount of sectors that are effectively written. This update introduces the check of the busy signal given by the card. Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>