aboutsummaryrefslogtreecommitdiff
path: root/drivers/mmc/host/sdhci-pci.c
AgeCommit message (Collapse)Author
2010-03-30include cleanup: Update gfp.h and slab.h includes to prepare for breaking ↵Tejun Heo
implicit slab.h inclusion from percpu.h percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by: Tejun Heo <tj@kernel.org> Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2010-03-06mmc: enable DMA on Ricoh sdhci reader by defaultVasily Khoruzhick
This card reader doesn't advertise, however DMA works well. Probably windows SDHCI driver assumes that all readers support DMA and thus we see that bug. Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> Tested-by: Maxim Levitsky <maximlevitsky@gmail.com> Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com> Cc: Harald Welte <HaraldWelte@viatech.com> Cc: Norbert Preining <preining@logic.at> Cc: <linux-mmc@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-03-06sdio: sdhci support for suspend mode PM featuresNicolas Pitre
Tested with an XO v1.5 from OLPC. Signed-off-by: Nicolas Pitre <nico@marvell.com> Cc: <linux-mmc@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-15sdhci: add support for the SysKonnect CardBus2SDIO adapterNicolas Pitre
This is still in use especially to develop SDIO device drivers on laptop machines which are lacking SDIO slots. This adapter supports SDIO cards only due to lack of 136-bit response capability. Signed-off-by: Nicolas Pitre <nico@marvell.com> Cc: <linux-mmc@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-23sdhci: support for ADMA only hostsRichard Röjfors
Add support for ADMA on SDHCI hosts, not supporting SDMA. According to the SDHCI specifications a host can support ADMA but not SDMA Signed-off-by: Richard Röjfors <richard.rojfors@mocean-labs.com> Cc: <linux-mmc@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-23sdhci: add no-card-no-reset quirk for Ricoh R5C822/Sony Z11Chris Ball
Card insertion detection is broken without this quirk on a Sony Vaio Z11, as discussed on linux-mmc here: http://marc.info/?t=125017355000008 Signed-off-by: Chris Ball <cjb@laptop.org> Tested-by: Norbert Preining <preining@logic.at> Cc: <linux-mmc@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-21sdhci: Specific quirk vor VIA SDHCI controller in VX855ESHarald Welte
The SDHCI controller found in the VX855ES requires 10ms delay between applying power and applying clock. This issue has been discovered and documented by the OLPC XO1.5 team. Signed-off-by: Harald Welte <HaraldWelte@viatech.com> Signed-off-by: Pierre Ossman <pierre@ossman.eu>
2009-05-03sdhci-pci: bad error handling in probe functionDan Carpenter
The goto unmap is too early, we haven't allocated host or done the request_region(). Found by smatch (http://repo.or.cz/w/smatch.git). [ Second error path fix by Pierre Ossman ] Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Pierre Ossman <pierre@ossman.eu>
2009-04-08New mail address for Pierre OssmanPierre Ossman
Signed-off-by: Pierre Ossman <pierre@ossman.eu>
2009-04-07dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32)Yang Hongyang
Replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) Signed-off-by: Yang Hongyang<yanghy@cn.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-03-02sdhci: Add NO_BUSY_IRQ quirk for Marvell CAFE host chipAndres Salomon
As described here: http://lkml.org/lkml/2009/2/20/265 The CAFE chip is broken due to commit e809517f6fa5803a5a1cd5602. Anton added a quirk here: http://lkml.org/lkml/2009/2/20/279 that fixes CAFE's problem. This adds the quirk for CAFE. Signed-off-by: Andres Salomon <dilinger@debian.org> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2009-02-18Revert "sdhci: force high speed capability on some controllers"Pierre Ossman
This reverts commit a4b76193774b463b922cab2f92450efb20d29ef0. It turned out that the controller had problem running at the higher speed, so go back to trusting the hardware capability bits. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-12-31pci: use pci_ioremap_bar() in drivers/mmcArjan van de Ven
Use the new pci_ioremap_bar() function in drivers/mmc. pci_ioremap_bar() just takes a pci device and a bar number, with the goal of making it really hard to get wrong, while also having a central place to stick sanity checks. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-10-13Merge branch 'master' of ↵David Woodhouse
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 Conflicts: include/asm-x86/statfs.h
2008-10-12sdhci: force high speed capability on some controllersPierre Ossman
Some high speed capable controllers forget to set the high speed capability bit. Make sure we enable the functionality anyway. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-09-04Use PCI_DEVICE_ID_88ALP01 for CAFÉ chip, rather than PCI_DEVICE_ID_CAFE.David Woodhouse
Probably better to use the official designation. Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Acked-by: Pierre Ossman <drzeus@drzeus.cx>
2008-08-01sdhci: handle bug in JMB38x for sizes < 4 bytesPierre Ossman
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-15sdhci-pci: unaligned data with ricoh controllersPierre Ossman
The Ricoh controllers cannot handle unaligned data blocks. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-07-15sdhci: handle hot-removePierre Ossman
Gracefully handle when the device is suddenly removed. Do a test read and avoid any further access if that read returns -1. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-07-15sdhci: support JMicron secondary interfacePierre Ossman
JMicron chips sometimes have two interfaces to work around limitations in Microsoft's sdhci driver. This patch allows us to use either interface. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-07-15sdhci: toggle JMicron PMOS settingPierre Ossman
Some of the JMicron chips requires us to manually enable the power output stages of the chip. Add the necessary hooks and functions to manage this. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-07-15sdhci: make workaround for timeout bug more generalPierre Ossman
Give the quirk for broken timeout handling a better chance of handling more controllers by simply classifying the system as broken and setting a fixed value. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-07-15sdhci: more complex quirks handlingPierre Ossman
Extend the quirks handling in the PCI driver to be able to have callbacks and not just flags. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-07-15sdhci: remove forced dma quirksPierre Ossman
Remove the quirk to force DMA on the Ricoh and TI controllers as it is no longer needed. The only bug they have is that they use an incorrect PCI interface value, and that is not respected anymore. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-07-15sdhci: move pci stuff to separate modulePierre Ossman
The SDHCI interface is not PCI specific, yet the Linux driver was intimitely connected to the PCI bus. This patch properly separates the PCI specific portion from the bus independent code. This patch is based on work by Ben Dooks but he did not have time to complete it. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>