aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host (follow)
AgeCommit message (Collapse)AuthorFilesLines
2008-01-28Merge branch 'pxa-plat' into develRussell King2-17/+46
* pxa-plat: (53 commits) [ARM] 4762/1: Basic support for Toradex Colibri module [ARM] pxa: fix mci_init functions returning -1 [ARM] 4737/1: Refactor corgi_lcd to improve readability + bugfix [ARM] 4747/1: pcm027: support for pcm990 baseboard for phyCORE-PXA270 [ARM] 4746/1: pcm027: network support for phyCORE-PXA270 [ARM] 4745/1: pcm027: default configuration [ARM] 4744/1: pcm027: add support for phyCORE-PXA270 CPU module [NET] smc91x: Make smc91x use IRQ resource trigger flags [ARM] pxa: add default config for littleton [ARM] pxa: add basic support for Littleton (PXA3xx Form Factor Platform) [ARM] 4664/1: Add basic support for HTC Magician PDA phones [ARM] 4649/1: Base support for pxa-based Toshiba e-series PDAs. [ARM] pxa: skip registers saving/restoring if entering standby mode [ARM] pxa: fix PXA27x resume [ARM] pxa: Avoid fiddling with CKEN register on suspend [ARM] pxa: Add PXA3 standby code hooked into the IRQ wake scheme [ARM] pxa: Add zylonite MFP wakeup configurations [ARM] pxa: program MFPs for low power mode when suspending [ARM] pxa: make MFP configuration processor independent [ARM] pxa: remove un-used pxa3xx_mfp_set_xxx() functions ... Conflicts: arch/arm/mach-pxa/ssp.c Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-27i2c/tps65010: move header to <linux/i2c/...>David Brownell1-1/+1
Move the tps65010 header file from the OMAP arch directory to the more generic <linux/i2c/...> directory, and remove the spurious dependency of this driver on OMAP. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-01-26[ARM] pxa: mmc: add 1st host controller support for pxa3xxBridge Wu1-1/+1
This patchis to add the first mmc controller support for pxa3xx. It's valid for pxa3[0|1|2]0. On zylonite, the first controller supports two slots, this patch only support the first one right now. Signed-off-by: Bridge Wu <bridge.wu@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-26[ARM] 4711/1: pxa: mmc: move DMA specific code to platform layerBridge Wu1-7/+23
This patch is to move pxamci DMA specific code to corresponding platform layer because using DRCMRRXMMC/DRCMRTXMMC in pxamci.c makes the driver code dedicated to platform which is not extensible. It is applicable to all pxa platforms. Signed-off-by: Bridge Wu <bridge.wu@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-26[ARM] 4709/1: pxa: mmc: add 26MHz support for pxa3[0|1]0 mmc controllerBridge Wu1-9/+22
pxa3[0|1]0 mmc controller can support 26MHz clock mode, they support SD spec 1.1 and MMC spec 4.0 which specify high speed mode. So host caps will include MMC_CAP_MMC_HIGHSPEED and MMC_CAP_SD_HIGHSPEED for pxa3[0|1]0. This patch is to add 26MHz support for them. pxa host clock will be set to 26MHz mode when the card supported max clock rate is higher than or equal to 26MHz. Signed-off-by: Bridge Wu <bridge.wu@marvell.com> Acked-by: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-12-12sdhci: support JMicron JMB38x chipsPierre Ossman1-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>
2007-12-12sdhci: use PIO when DMA can't satisfy the requestPierre Ossman2-4/+31
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>
2007-12-12sdhci: don't warn about sdhci 2.0 controllersPierre Ossman1-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>
2007-12-12sdhci: describe quirksPierre Ossman1-0/+10
Add a comment for each quirk to describe what it does and why. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-12-05spi: use simplified spi_sync() calling conventionMarc Pignat1-10/+0
Given the patch which simplifies the spi_sync calling convention, this one updates the callers of that routine which tried using it according to the previous specification. (Most didn't.) Signed-off-by: Marc Pignat <marc.pignat@hevs.ch> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-21tifm_sd: handle non-power-of-2 block sizesAlex Dubov1-11/+7
It is possible to handle arbitrary block sizes with tifm card reader by conditionally switching to PIO in case such block has to be delivered. At the beginning of each request, DMA is either disabled (non-power-of-2 block size) or set to load time user preference. Signed-off-by: Alex Dubov <oakad@yahoo.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-11-10Add missing "\n" to log messageRolf Eike Beer1-1/+1
Signed-off-by: Rolf Eike Beer <eike-kernel@sf-tec.de> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-10-31[ARM] Fix pxamci regressionRussell King1-2/+9
Fix: WARNING: at arch/arm/mach-pxa/clock.c:69 clk_disable() [<c002d7c8>] (dump_stack+0x0/0x14) from [<c00334f4>] (clk_disable+0x34/0xa0) [<c00334c0>] (clk_disable+0x0/0xa0) from [<c028a43c>] (pxamci_set_ios+0x74/0xf0) [<c028a3c8>] (pxamci_set_ios+0x0/0xf0) from [<c0281548>] (mmc_power_off+0x90/0x9c) [<c02814b8>] (mmc_power_off+0x0/0x9c) from [<c0281a30>] (mmc_start_host+0x18/0x28) [<c0281a18>] (mmc_start_host+0x0/0x28) from [<c02825a0>] (mmc_add_host+0xe8/0x104) [<c02824b8>] (mmc_add_host+0x0/0x104) from [<c028a7d0>] (pxamci_probe+0x24c/0x2f4) [<c028a584>] (pxamci_probe+0x0/0x2f4) from [<c01e5948>] (platform_drv_probe+0x20/0x24) ... Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-10-29Correction of "Update drivers to use sg helpers" patch for IMXMMC driverPavel Pisa1-1/+1
The previous change omits "data->" prefix in the "data->sg" case. This change fixes kernel compilation. Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz> drivers/mmc/host/imxmmc.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Signed-off-by: Jens Axboe <axboe@carl.home.kernel.dk>
2007-10-27scatterlist fallout: mmcAl Viro1-1/+1
#include <scatterlist/scatterlist.h> is an odd thing to do... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-27mmc_spi: Fix mmc-over-spi regressionDavid Brownell1-19/+33
Patch 49dce689ad4ef0fd1f970ef762168e4bd46f69a3 changed the sysfs data structures for SPI in a way which broke the MMC-over-SPI host driver. This patch fixes that regression by changing the scheme used to keep from knowingly trying to use a shared bus segment, and updates the adjacent comments slightly to better explain the issue. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-10-27at91_mci: Fix bad referencePierre Ossman1-2/+2
The flags parameter got removed in a previous commit, but some references were overlooked. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-10-24mmc: sg falloutJens Axboe5-8/+5
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>
2007-10-23[PATCH] Fix breakage after SG cleanupsRalf Baechle1-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>
2007-10-23mmc: fix sg->page falloutEmil Medve1-1/+1
Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-10-22[SG] Update drivers to use sg helpersJens Axboe8-26/+23
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-10-17mmc: at91_mci: cleanup: use MCI_ERRORSAndrew Victor1-3/+1
A small MMC driver cleanup. Use the defined AT91_MCI_ERRORS in at91_mci_completed_command() instead of specifying all the error bits individually. Signed-off-by: Andrew Victor <andrew@sanpeople.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-10-16missing include in mmcAl Viro1-0/+1
AFAICS, fallout from repacing include of blkdev.h with include of bio.h. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-16spi doesn't need class_deviceTony Jones1-2/+2
Make the SPI framework and drivers stop using class_device. Update docs accordingly ... highlighting just which sysfs paths should be "safe"/stable. Signed-off-by: Tony Jones <tonyj@suse.de> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-15Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds2-21/+36
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (95 commits) [ARM] 4578/1: CM-x270: PCMCIA support [ARM] 4577/1: ITE 8152 PCI bridge support [ARM] 4576/1: CM-X270 machine support [ARM] pxa: Avoid pxa_gpio_mode() in gpio_direction_{in,out}put() [ARM] pxa: move pxa_set_mode() from pxa2xx_mainstone.c to mainstone.c [ARM] pxa: move pxa_set_mode() from pxa2xx_lubbock.c to lubbock.c [ARM] pxa: Make cpu_is_pxaXXX dependent on configuration symbols [ARM] pxa: PXA3xx base support [NET] smc91x: fix PXA DMA support code [SERIAL] Fix console initialisation ordering [ARM] pxa: tidy up arch/arm/mach-pxa/Makefile [ARM] Update arch/arm/Kconfig for drivers/Kconfig changes [ARM] 4600/1: fix kernel build failure with build-id-supporting binutils [ARM] 4599/1: Preserve ATAG list for use with kexec (2.6.23) [ARM] Rename consistent_sync() as dma_cache_maint() [ARM] 4572/1: ep93xx: add cirrus logic edb9307 support [ARM] 4596/1: S3C2412: Correct IRQs for SDI+CF and add decoding support [ARM] 4595/1: ns9xxx: define registers as void __iomem * instead of volatile u32 [ARM] 4594/1: ns9xxx: use the new gpio functions [ARM] 4593/1: ns9xxx: implement generic clockevents ...
2007-10-14Fix compile while compiling drivers/mmc/host/mmc_spi.o with !BLOCKDavid Brownell1-1/+1
Make sure the mmc_spi driver can build without CONFIG_BLOCK. Issue noted by "Avuton Olrich" <avuton@gmail.com> and randconfig. While that won't be a common configuration, sometimes embedded boards use SDIO to interface WLAN or Bluetooth chips (vs some parallel interface), and don't provide an MMC/SD socket for use with flash memory cards. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-12[ARM] pxa: update PXA MMC interface driver to use clk supportRussell King2-21/+36
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-10-11mmc: don't use weight32()Nicolas Pitre2-2/+4
Using weight32() to determine if a value is a power of 2 is a rather heavi weight solution. The classic idiom is (x & (x - 1)) == 0, but the kernel already provide a is_power_of_2 function for it. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-10-10pxamci: support arbitrary block sizeNicolas Pitre1-3/+16
The PXA has two transmit FIFOes, each32 byte deep. when one FIFO is full and the other one has been transmitted, they are automatically swapped and DMA is triggered for another 32 byte burst. However, when there is less than 32 bytes left to send, the FIFO swap has to be done manually. This is required for some SDIO transfers which are not required to be multiples of 32 bytes. A DMA completion interrupt is set for each descriptor which length isn't a multiple of 32 in order to force the FIFO swap. While at it, the DMA interrupt handler has been made a bit more resilient against errors. Signed-off-by: Nicolas Pitre <nico@marvell.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-10-03sdhci: remove old dma module paramsPierre Ossman1-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>
2007-10-03sdhci: add SDHCI_QUIRK_BROKEN_DMA quirkFeng Tang1-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>
2007-10-03sdhci: remove DMA capability check from controller's PCI Class regFeng Tang1-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>
2007-10-03sdhci: fix a typoNicolas Pitre2-2/+2
Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-10-03mmc: Disabler for Ricoh MMC controllerPhilip Langdale3-0/+169
Thanks to Matt Domsch and Rezwanul Kabir at Dell, we know how to disable the MMC controller on the multi-function Ricoh R5C832. The MMC controller needs to be disabled or it will steal MMC cards from the SD controller where they would otherwise be supported by the Linux SDHCI driver. Signed-off-by: Philipl Langdale <philipl@overt.org> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-09-25mmc: pxamci: add SDIO card interrupt reporting capabilityBridge Wu2-5/+24
Again, only available from PXA27x. Signed-off-by: Bridge Wu <mingqiao.wu@gmail.com> Signed-off-by: Nicolas Pitre <nico@marvell.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-09-25mmc: pxamci: set proper buswidth capabilities according to PXA flavorBridge Wu2-1/+10
From PXA27x, it is possible to do 4-bit data transfers. Signed-off-by: Bridge Wu <mingqiao.wu@gmail.com> Signed-off-by: Nicolas Pitre <nico@marvell.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-09-25mmc: pxamci: set proper block capabilities according to PXA flavorNicolas Pitre1-2/+2
From PXA27x, it is possible to do 2048-byte block transfers. Signed-off-by: Nicolas Pitre <nico@marvell.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-09-25mmc: pxamci: better pending IRQ determinationBridge Wu1-1/+1
Pending interrupts should be determined from both I_REG and I_MASK registers. Signed-off-by: Bridge Wu <mingqiao.wu@gmail.com> Signed-off-by: Nicolas Pitre <nico@marvell.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-09-24arm: i.MX/MX1 SDHC implements SD cards read-only switch read-backPavel Pisa1-2/+14
The patch enables to define MMC host get_ro() method through platform data. Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-09-23mmc_spi host driverDavid Brownell3-0/+1422
This is the latest version of the MMC-over-SPI support. It works on 2.6.23-rc2 plus git-mmc (from rc1-mm2), along with the preceding patches which teach the rest of the MMC stack about SPI. The main issue of note is that sometimes cards need to be power cycled to recover after certain faults. Also, it may sometimes be necessary to disable CRCs. ("modprobe mmc_core use_spi_crc=n") Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: mikael.starvik@axis.com, Cc: Hans-Peter Nilsson <hp@axis.com> Cc: Jan Nikitenko <jan.nikitenko@gmail.com> Cc: Mike Lavender <mike@steroidmicros.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-09-23sdhci: sdio interrupt supportPierre Ossman1-1/+38
Add support for relaying the sdio interrupt signal from the card. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-09-23mmc: at91_mci: disable handling of blocks with size not multiple of 4 bytesMarc Pignat1-0/+8
This kind of transfer is not supported, so don't advertise it and make it fail early. Signed-off-by: Marc Pignat <marc.pignat@hevs.ch> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-09-23mmc: remove confusing flagPierre Ossman2-14/+16
The MMC_DATA_MULTI flag never had a proper definition of what it means, so remove it and let the drivers check the block count in the request. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-09-23mmc: remove BYTEBLOCK capabilityPierre Ossman6-7/+21
Remove the BYTEBLOCK capability and let the broken hosts fail the requests with -EINVAL instead. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-09-23mmc: remove custom error codesPierre Ossman9-106/+100
Convert the MMC layer to use standard error codes and not its own, incompatible values. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-09-11bug in AT91 MCI suspend routinesAnti Sullin1-3/+3
This patch fixes a bug in AT91 mmc host driver, that enables the wakeup from suspend on card detection pin even if the card detect pin is not available (==0). If not card detection pin is defined, IRQ0 == FIQ gets enabled and if some activity is present on that pin, the system gets a FIQ request, that causes a crash. Signed-off-by: Anti Sullin <anti.sullin@artecdesign.ee> Signed-off-by: Nicolas Ferre <nicolas.ferre@rfo.atmel.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-08-23sdhci: tell which spurious interrupt we gotPierre Ossman1-6/+6
When we get unexpected interrupts, also print which interrupt it was. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-08-23sdhci: handle data interrupts during commandPierre Ossman2-7/+22
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>
2007-08-23mmc: ignore bad max block size in sdhciDavid Vrabel1-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>
2007-08-23sdhci: be more cautious about block count registerPierre Ossman1-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>