summaryrefslogtreecommitdiff
path: root/drivers/mmc/host
AgeCommit message (Collapse)Author
2010-01-20tegra: Dynamically control the card clock for SD memory devicesDeepesh Gujarathi
On certain embedded devices, leaving the card clock enabled on SD memory devices with no active transactions can increase power consumption. Enable this option to automatically disable the card clock after a transfer completes. Change-Id: I6da3388c1528bf1334c3534b7251a526812199f1
2009-12-21tegra: fix typos in / remove various debug printsGary King
removes some unnecessary status prints in tegra_udc.c and sdhci-tegra.c fixes the type in the tegra driver name in fsl_udc_core.c
2009-12-15tegra: use sdio_platform_data from tegra_devices.h, not sdio_pdataGary King
update sdhci driver to reflect correct typename Change-Id: I350196cdde9c52a8cac7e74d041a15a683f8bc1c
2009-12-14mmc: add MMC driver for NVIDIA Tegra SDIO DDKGary King
Adds an MMC driver for Tegra AP15 and AP16 SoCs using the NVIDIA Tegra SDIO DDK
2009-12-14mmc: Add SDHCI-compliant driver for NVIDIA Tegra SoCsGary King
Tegra's internal MMC controller is SDHCI compliant; this adds an SDHCI driver using NvOdm and NvRm APIs for managing board clocks Change-Id: I019feb4850dc262d8262723f39a34c08ef75fa19
2009-12-08sdhci: add controller-specific override query for max_clkGary King
on some (mostly SoC) controllers, the maximum clock speed reported by the controller may not be achievable on the platform. use a callback function to allow for greater flexibility for these systems
2009-12-08sdhci: move card detection interrupt logic into a callback functionGary King
enables platforms which do not support the standard card detection interrupt to trigger the card detection using a platform-specific handler
2009-12-08sdhci: add controller-specific set_clock callbackGary King
on platforms which support dynamic clock configuration, better performance and power may be obtained by calling a controller's set_clock routine rather than assuming that the input clock to the controller is always max_clk
2009-12-08sdhci: add BROKEN_CTRL_HISPD quirkGary King
don't change CTRL_HISPD bit after switching to high-speed mode on controllers which have this quirk
2009-12-08sdhci: add support for 8 bit data transfersGary King
2009-12-08sdhci: add ENABLE_INTERRUPT_AT_BLOCK_GAP quirkGary King
some controllers need to have INTERRUPT_AT_BLOCK_GAP enabled to detect card interrupts in SDIO mode
2009-12-08sdhci: add BROKEN_WRITE_PROTECT quirkGary King
call a host-specified callback function to detect card read-only status on hosts which do not detect the write protect flag correctly
2009-12-07mmc: Add CONFIG_EMBEDDED_MMC_START_OFFSET configurationGary King
enables platforms to specify a non-zero offset for the MBR and kernel-visible file systems, for embedded systems which store proprietary data at the start of the eMMC device.
2009-12-07Merge commit 'arm/2.6.28-arm' into android-tegra-2.6.29Gary King
Conflicts: MAINTAINERS arch/arm/Kconfig arch/arm/Makefile arch/arm/boot/compressed/head.S arch/arm/common/Makefile arch/arm/configs/realview-smp_defconfig arch/arm/configs/realview_defconfig arch/arm/configs/versatile_defconfig arch/arm/include/asm/elf.h arch/arm/include/asm/uaccess.h arch/arm/kernel/module.c arch/arm/kernel/signal.c arch/arm/mach-realview/Kconfig arch/arm/mach-realview/Makefile arch/arm/mach-realview/core.c arch/arm/mach-realview/core.h arch/arm/mach-realview/include/mach/board-pba8.h arch/arm/mach-realview/include/mach/debug-macro.S arch/arm/mach-realview/include/mach/hardware.h arch/arm/mach-realview/include/mach/irqs.h arch/arm/mach-realview/include/mach/memory.h arch/arm/mach-realview/include/mach/uncompress.h arch/arm/mach-realview/localtimer.c arch/arm/mach-realview/platsmp.c arch/arm/mach-realview/realview_eb.c arch/arm/mach-realview/realview_pb1176.c arch/arm/mach-realview/realview_pb11mp.c arch/arm/mach-realview/realview_pba8.c arch/arm/mm/Kconfig arch/arm/mm/copypage-v6.c arch/arm/mm/dma-mapping.c arch/arm/mm/proc-v7.S arch/arm/oprofile/op_model_mpcore.c arch/arm/tools/mach-types arch/arm/vfp/vfpmodule.c drivers/mtd/maps/integrator-flash.c drivers/net/smsc911x.c drivers/net/smsc911x.h
2009-03-12mmc: s3cmci: fix s3c2410_dma_config() arguments.Ben Dooks
The s3cmci driver is calling s3c2410_dma_config with incorrect data for the DCON register. The S3C2410_DCON_HWTRIG is implicit in the channel configuration and the device selection of S3C2410_DCON_CH0_SDI is incorrect as the DMA system may not select channel 0. Signed-off-by: Ben Dooks <ben@simtec.co.uk> Acked-by: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-03-10Add a delay to the MMCI change notificationColin Tuckley
This is needed to allow the hardware to stabilise before reading the SD/MMC card. Signed-off-by: Colin Tuckley <colin.tuckley@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
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-03-02sdhci: Add quirk for controllers with no end-of-busy IRQBen Dooks
The Samsung SDHCI (and FSL eSDHC) controller block seems to fail to generate an INT_DATA_END after the transfer has completed and the bus busy state finished. Changes in e809517f6fa5803a5a1cd56026f0e2190fc13d5c to use the new busy method are the cause of the behaviour change. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2009-02-18Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc: omap_hsmmc: Change while(); loops with finite version omap_hsmmc: recover from transfer failures omap_hsmmc: only MMC1 allows HCTL.SDVS != 1.8V omap_hsmmc: card detect irq bugfix sdhci: fix led naming mmc_test: fix basic read test s3cmci: Fix hangup in do_pio_write() Revert "sdhci: force high speed capability on some controllers" MMC: fix bug - SDHC card capacity not correct
2009-02-18atmel-mci: fix initialization of dma slave dataDan Williams
The conversion of atmel-mci to dma_request_channel missed the initialization of the channel dma_slave information. The filter_fn passed to dma_request_channel is responsible for initializing the channel's private data. This implementation has the additional benefit of enabling a generic client-channel data passing mechanism. Reviewed-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Acked-by: Haavard Skinnemoen <hskinnemoen@atmel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-02-18omap_hsmmc: Change while(); loops with finite versionJean Pihet
Replace the infinite 'while() ;' loops with a finite loop version. Signed-off-by: Jean Pihet <jpihet@mvista.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2009-02-18omap_hsmmc: recover from transfer failuresJean Pihet
Timeouts during a command that has a data phase can result in the next command issued after the command that failed not being processed, i.e. no interrupt ever occurs to indicate the command has completed. This failure can result in a deadlock. This patch resets the data state machine to clear the error in case of a command timeout. Tested on OMAP3430 chip and intensive MMC/SD device removal while transferring data. Signed-off-by: Andy Lowe <alowe@mvista.com> Signed-off-by: Jean Pihet <jpihet@mvista.com> Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2009-02-18omap_hsmmc: only MMC1 allows HCTL.SDVS != 1.8VDavid Brownell
Based on a patch from Tony Lindgren ... after initialization, never change HCTL.SDVS except for MMC1. The other controller instances only support 1.8V in that field, although they can suport other card/SDIO/eMMC/... voltages with level shifting solutions such as external transceivers. MMC2 behavior sanity tested on Overo/WLAN, OMAP3430 SDP, and custom hardware. MMC1 also sanity tested on those platforms plus Beagle. This also fixes a bug preventing MMC2 (and also presumably MMC3) from powering down when requested. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2009-02-18omap_hsmmc: card detect irq bugfixDavid Brownell
Work around lockdep issue when card detect IRQ handlers run in thread context ... it forces IRQF_DISABLED, which prevents all access to twl4030 card detect signals. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2009-02-18sdhci: fix led namingHelmut Schaa
Fix the led device naming for the sdhci driver. The led class documentation defines the led name to have the form "devicename:colour:function" while not applicable sections should be left blank. To comply with the documentation the led device name is changed from "mmc*" to "mmc*::". Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2009-02-18s3cmci: Fix hangup in do_pio_write()Yauhen Kharuzhy
This commit fixes the regression what was added by commit 088a78af978d0c8e339071a9b2bca1f4cb368f30 "s3cmci: Support transfers which are not multiple of 32 bits." fifo_free() now returns amount of available space in FIFO buffer in bytes. But do_pio_write() writes to FIFO 32-bit words. Condition for return from cycle is (fifo_free() == 0), but when fifo has 1..3 bytes of free space then this condition will never be true and system hangs. This patch changes condition in the while() to (fifo_free() > 3). Signed-off-by: Yauhen Kharuzhy <jekhor@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.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>
2009-02-02pxamci: enable DMA for write ops after CMD/RESPCliff Brake
With the PXA270 MMC hardware, there seems to be an issue of data corruption on writes where a 4KB data block is offset by one byte. If we delay enabling the DMA for writes until after the CMD/RESP has finished, the problem seems to be fixed. related to PXA270 Erratum #91 Tested-by: Vernon Sauder <VernonInHand@gmail.com> Signed-off-by: Cliff Brake <cbrake@bec-systems.com> Acked-by: Eric Miao <eric.miao@marvell.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2009-02-02pxamci: replace #ifdef CONFIG_PXA27x with if (cpu_is_pxa27x())Cliff Brake
Signed-off-by: Cliff Brake <cbrake@bec-systems.com> Acked-by: Eric Miao <eric.miao@marvell.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2009-02-02ricoh_mmc: Use suspend_late/resume_earlyphilipl@overt.org
If ricoh_mmc suspends before sdhci_pci, it will pull the card out from under the controller, which could leave the system in a very confused state. Using suspend_late/resume_early ensures that sdhci_pci suspends first and resumes second. Signed-off-by: Philip Langdale <philipl@overt.org> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2009-02-02mmci: Add support for ST Micro derivateLinus Walleij
This patch adds support for the ST Microelectronics version of the PL180 PrimeCell. They use designer ID 0x80 and have a few alterations/bugfixes related to open drain and HW flow control. They also add some SDIO registers, I am unsure if these are in ST HW only or if this is things also added in later ARM revisions, but they are included in the mmci.h file for completeness. Signed-off-by: Linus Walleij <linus.walleij@ericsson.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2009-02-02mmc: Add a MX2/MX3 specific SDHC driverSascha Hauer
This patch adds a MX2/MX3 specific SDHC driver. The hardware is basically the same as in the MX1, but unlike the MX1 controller the MX2 controller just works as expected. Since the MX1 driver has more workarounds for bugs than anything else I had no success with supporting MX1 and MX2 in a sane way in one driver. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2009-01-24[ARM] 5369/1: omap mmc: Add new omap hsmmc controller for 2430 and 34xx, v3Madhusudhan Chikkature
Add omap hsmmc controller for 2430 and 34xx. Note that this controller has different registers compared to the earlier omap MMC controller, so sharing code currently is not possible. Various updates and fixes from linux-omap list have been merged into this patch. Signed-off-by: Madhusudhan Chikkature<madhu.cr@ti.com> Acked-by: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-01-24[ARM] 5365/1: s3cmci: Use new include path of dma.hRamax Lo
Since dma.h has been moved to arch/arm/mach-s3c2410/include/mach, use the new include path. Signed-off-by: Ramax Lo <ramaxlo@gmail.com> Acked-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-01-09Merge branch 'next' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx: (22 commits) ioat: fix self test for multi-channel case dmaengine: bump initcall level to arch_initcall dmaengine: advertise all channels on a device to dma_filter_fn dmaengine: use idr for registering dma device numbers dmaengine: add a release for dma class devices and dependent infrastructure ioat: do not perform removal actions at shutdown iop-adma: enable module removal iop-adma: kill debug BUG_ON iop-adma: let devm do its job, don't duplicate free dmaengine: kill enum dma_state_client dmaengine: remove 'bigref' infrastructure dmaengine: kill struct dma_client and supporting infrastructure dmaengine: replace dma_async_client_register with dmaengine_get atmel-mci: convert to dma_request_channel and down-level dma_slave dmatest: convert to dma_request_channel dmaengine: introduce dma_request_channel and private channels net_dma: convert to dma_find_channel dmaengine: provide a common 'issue_pending_all' implementation dmaengine: centralize channel allocation, introduce dma_find_channel dmaengine: up-level reference counting to the module level ...
2009-01-07Merge branches 'fixes', 'cleanups' and 'boards'Haavard Skinnemoen
2009-01-06dmaengine: kill enum dma_state_clientDan Williams
DMA_NAK is now useless. We can just use a bool instead. Reviewed-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2009-01-06dmaengine: kill struct dma_client and supporting infrastructureDan Williams
All users have been converted to either the general-purpose allocator, dma_find_channel, or dma_request_channel. Reviewed-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2009-01-06atmel-mci: convert to dma_request_channel and down-level dma_slaveDan Williams
dma_request_channel provides an exclusive channel, so we no longer need to pass slave data through dmaengine. Cc: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> Reviewed-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2009-01-06dmaengine: up-level reference counting to the module levelDan Williams
Simply, if a client wants any dmaengine channel then prevent all dmaengine modules from being removed. Once the clients are done re-enable module removal. Why?, beyond reducing complication: 1/ Tracking reference counts per-transaction in an efficient manner, as is currently done, requires a complicated scheme to avoid cache-line bouncing effects. 2/ Per-transaction ref-counting gives the false impression that a dma-driver can be gracefully removed ahead of its user (net, md, or dma-slave) 3/ None of the in-tree dma-drivers talk to hot pluggable hardware, but if such an engine were built one day we still would not need to notify clients of remove events. The driver can simply return NULL to a ->prep() request, something that is much easier for a client to handle. Reviewed-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: Maciej Sosnowski <maciej.sosnowski@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2009-01-05atmel-mci: move atmel-mci.h file to include/linuxNicolas Ferre
Needed to use the atmel-mci driver in an architecture independant maner. Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2008-12-31Merge branch 'master' of ../mmcPierre Ossman
2008-12-31mmc_spi: Add support for OpenFirmware bindingsAnton Vorontsov
The support is implemented via platform data accessors, new module (of_mmc_spi) will be created automatically when the driver compiles on OpenFirmware platforms. Link-time dependency will load the module automatically. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-12-31pxamci: fix dma_unmap_sg lengthVernon Sauder
dma_unmap_sg should be given the same length as dma_map_sg, not the value returned from dma_map_sg Signed-off-by: Vernon Sauder <vsauder@inhand.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-12-31drivers/mmc: Move a dereference below a NULL testJulia Lawall
In each case, if the NULL test is necessary, then the dereference should be moved below the NULL test. The semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @@ type T; expression E; identifier i,fld; statement S; @@ - T i = E->fld; + T i; ... when != E when != i if (E == NULL) S + i = E->fld; // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-12-31sdhci: handle built-in sdhci with modular leds classPierre Ossman
As reported by Randy Dunlap, having sdhci built-in and LEDs class as a module resulted in undefined symbols. Change the code to handle that case properly (by not having LEDs class support in sdhci). Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-12-31mmc: balanc pci_iomap with pci_iounmapRoel Kluin
balance pci_iomap with pci_iounmap, not iounmap Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-12-31ricoh_mmc: Handle newer models of Ricoh controllersphilipl@overt.org
The latest generation of laptops are shipping with a newer model of Ricoh chip where the firewire controller is the primary PCI function but a cardbus controller is also present. The existing code assumes that if a cardbus controller is, present, then it must be the one to manipulate - but the real rule is that you manipulate PCI function 0. This patch adds an additional constraint that the target must be function 0. Signed-off-by: Philip Langdale <philipl@overt.org> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-12-31sdhci: activate led support also when moduleÉric Piel
CONFIG_LEDS_CLASS is defined only if led-class is built-in, otherwise when it is a module the option is called CONFIG_LEDS_CLASS_MODULE. Led support should also be activated in this case. Signed-off-by: Eric Piel <eric.piel@tremplin-utc.net> 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>