summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/sdhci.c
Commit message (Collapse)AuthorAgeFilesLines
* sdhci: improve no card, no reset quirkPierre Ossman2008-04-181-2/+10
| | | | | | | | | | | The quirk was meant to just inhibit some resets, but ended up blocking all of them. Fortunately, this was just what was needed. Change the comment to reflect reality. Also, this issue has just been observed on Samsung laptops, so reduce the number of chips the quirk affects. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdhci: allow led to be controlled freelyPierre Ossman2008-04-181-0/+44
| | | | | | | Hook up the controller LED to the LED subsystem, allowing more flexible control than simply indicating an ongoing request. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdhci: remove custom controller namePierre Ossman2008-04-181-28/+16
| | | | | | | Remove the use of the sdhci specific device name and use the mmc controller name instead. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdhci: add num index for multi controllers caseFeng Tang2008-02-081-1/+12
| | | | | | | | Some devices have several controllers; need add the index info to device slot name host->slot_desc[] Signed-off-by: Feng Tang <feng.tang@intel.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdhci: support JMicron JMB38x chipsPierre Ossman2007-12-121-1/+18
| | | | | | | | The JMicron JMB38x chip doesn't support transfers that aren't 32-bit aligned (both size and start address). It also doesn't like switching between PIO and DMA mode, so it needs to be reset after each request. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdhci: use PIO when DMA can't satisfy the requestPierre Ossman2007-12-121-3/+29
| | | | | | | | | | | Some controllers have been designed on the assumption that all transfers will be 32-bit aligned, both in start address and in size. This is not a guarantee the SDHCI specification provides and not one we can provide. Revert back to PIO for individual requests in order to work around the hardware bug. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdhci: don't warn about sdhci 2.0 controllersPierre Ossman2007-12-121-1/+1
| | | | | | | We support 2.0 controllers, even though we don't use anything in the new feature set. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdhci: describe quirksPierre Ossman2007-12-121-0/+10
| | | | | | Add a comment for each quirk to describe what it does and why. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* Add missing "\n" to log messageRolf Eike Beer2007-11-101-1/+1
| | | | | Signed-off-by: Rolf Eike Beer <eike-kernel@sf-tec.de> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* mmc: sg falloutJens Axboe2007-10-241-2/+0
| | | | | | | Do a full scan of the directory to try and be a bit more proactive, instead of waiting for things to break. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* [PATCH] Fix breakage after SG cleanupsRalf Baechle2007-10-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | Commits 58b053e4ce9d2fc3023645c1b96e537c72aa8d9a ("Update arch/ to use sg helpers") 45711f1af6eff1a6d010703b4862e0d2b9afd056 ("[SG] Update drivers to use sg helpers") fa05f1286be25a8ce915c5dd492aea61126b3f33 ("Update net/ to use sg helpers") converted many files to use the scatter gather helpers without ensuring that the necessary headerfile <linux/scatterlist> is included. This happened to work for ia64, powerpc, sparc64 and x86 because they happened to drag in that file via their <asm/dma-mapping.h>. On most of the others this probably broke. Instead of increasing the header file spider web I choose to include <linux/scatterlist.h> directly into the affectes files. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [SG] Update drivers to use sg helpersJens Axboe2007-10-221-1/+1
| | | | Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* sdhci: remove old dma module paramsPierre Ossman2007-10-031-12/+1
| | | | | | | The forcedma and nodma module parameters can be replaced with the quirks parameter, so remove the redundancy. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdhci: add SDHCI_QUIRK_BROKEN_DMA quirkFeng Tang2007-10-031-2/+11
| | | | | | | | Some controllers like ENE712 can't work properly with DMA mode, add this quirk to force these kinds of HW work with PIO mode Signed-off-by: Feng Tang <feng.tang@intel.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdhci: remove DMA capability check from controller's PCI Class regFeng Tang2007-10-031-2/+7
| | | | | | | | | Many host controllers don't fully follow the PCI spec to claim whether they support DMA in PCI class register. Leave the driver to judge it from the Capability register, quirks and module parameter Signed-off-by: Feng Tang <feng.tang@intel.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdhci: fix a typoNicolas Pitre2007-10-031-1/+1
| | | | | Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdhci: sdio interrupt supportPierre Ossman2007-09-231-1/+38
| | | | | | Add support for relaying the sdio interrupt signal from the card. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* mmc: remove BYTEBLOCK capabilityPierre Ossman2007-09-231-1/+1
| | | | | | | Remove the BYTEBLOCK capability and let the broken hosts fail the requests with -EINVAL instead. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* mmc: remove custom error codesPierre Ossman2007-09-231-27/+24
| | | | | | | Convert the MMC layer to use standard error codes and not its own, incompatible values. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdhci: tell which spurious interrupt we gotPierre Ossman2007-08-231-6/+6
| | | | | | When we get unexpected interrupts, also print which interrupt it was. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdhci: handle data interrupts during commandPierre Ossman2007-08-231-7/+21
| | | | | | | | It is fully legal for a controller to start issuing data related interrupts before it has signalled that the command has completed. Make sure the driver actually can handle this. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* mmc: ignore bad max block size in sdhciDavid Vrabel2007-08-231-5/+4
| | | | | | | | | Some SDHC cards report an invalid maximum block size, in these cases assume they support block sizes up to 512 bytes instead of returning an error. Signed-off-by: David Vrabel <david.vrabel@csr.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdhci: be more cautious about block count registerPierre Ossman2007-08-231-2/+2
| | | | | | | The block count register shouldn't be trusted for single block transfers, so avoid using it completely when calculating transferred bytes. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* mmc: remove redundant debug information from sdhci and wbsdPierre Ossman2007-07-261-13/+0
| | | | | | | Remove the extra debugging output that now is properly printed by the core. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* mmc: update header file pathsPierre Ossman2007-07-261-1/+1
| | | | | | | Make sure all headers in the files reflect their true position in the tree. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdhci: add support to ENE-CB714Leandro Dorileo2007-07-261-0/+27
| | | | | | | | | Added its pci_id and implemented a quirk for it because this controller needs to reset cmd and data when setting ios. Signed-off-by: Leandro Dorileo <dorileo@ossystems.com.br> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* mmc: check error bits before command completionPierre Ossman2007-07-261-13/+10
| | | | | | | | Some controllers signal "command complete" even on failures (which they are allowed to do according to the spec). Make sure we check the error bits first so we don't get any false positives. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdhci: make sure to clear the error interruptPierre Ossman2007-07-201-0/+2
| | | | | | | | The controller has a bit indicating that one of the higher bits (the error bits) are set. A previous bug caused this bit to be masked, but since that bug has been fixed we have to clear it explicictly. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdhci: Fix "Unexpected interrupt" handlingRolf Eike Beer2007-07-091-1/+1
| | | | | | | | | Whenever a power interrupt is signaled it is also reported as an unexpected one. All other unexpected interrupts get lost. Cause is a not inversed bitmask to remove power interrupts from the status. Signed-off-by: Rolf Eike Beer <eike-kernel@sf-tec.de> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdhci: add ene controller idMilko Krachounov2007-07-091-0/+8
| | | | | | | | | ENE has a very weird design where an SDHCI device (0805) is presented on the PCI bus, but that device is non-functional, and the real device is hidden as a more generic device. Signed-off-by: Milko Krachounov <milko@3mhz.net> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdhci: handle dma boundary interruptsPierre Ossman2007-05-141-0/+9
| | | | | | | | When the device hits certain memory boundaries, it signals an interrupt and expects to be serviced. We don't need the feature but we need to make sure the device doesn't stall. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* MMC: Fix handling of low-voltage cardsPhilip Langdale2007-05-011-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fix handling of low voltage MMC cards. The latest MMC and SD specs both agree that support for low-voltage operations is indicated by bit 7 in the OCR. The MMC spec states that the low voltage range is 1.65-1.95V while the SD spec leaves the actual voltage range undefined - meaning that there is still no such thing as a low voltage SD card. However, an old Sandisk spec implied that bits 7.0 represented voltages below 2.0V in 1V or 0.5V increments, and the code was accordingly written with that expectation. This confusion meant that host drivers attempting to support the typical low voltage (1.8V) would set the wrong bits in the host OCR mask (usually bits 5 and/or 6) resulting in the the low voltage mode never being used. This change corrects the low voltage range and adds sanity checks on the reserved bits (0-6) and for SD cards that claim to support low-voltage operations. Signed-off-by: Philip Langdale <philipl@overt.org> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* MMC: Consolidate voltage definitionsPhilip Langdale2007-05-011-10/+7
| | | | | | | | | | | | | | | | | Consolidate the list of available voltages. Up until now, a separate set of defines has been used for host->vdd than that used for the OCR voltage mask values. Having two sets of defines allows them to get out of sync and the current sets are already inconsistent with one claiming to describe ranges and the other specific voltages. Only the SDHCI driver uses the host->vdd defines and it is easily fixed to use the OCR defines. Signed-off-by: Philip Langdale <philipl@overt.org> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* mmc: Move host and card drivers to subdirsPierre Ossman2007-05-011-0/+1539
Clean up the drivers/mmc directory by moving card and host drivers into subdirectories. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>