aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
Commit message (Collapse)AuthorAge
* pxamci: enable DMA for write ops after CMD/RESPCliff Brake2009-02-02
| | | | | | | | | | | | | | | | 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>
* pxamci: replace #ifdef CONFIG_PXA27x with if (cpu_is_pxa27x())Cliff Brake2009-02-02
| | | | | | 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>
* ricoh_mmc: Use suspend_late/resume_earlyphilipl@overt.org2009-02-02
| | | | | | | | | | | | 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>
* mmci: Add support for ST Micro derivateLinus Walleij2009-02-02
| | | | | | | | | | | | | 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>
* mmc: Add a MX2/MX3 specific SDHC driverSascha Hauer2009-02-02
| | | | | | | | | | | 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>
* [ARM] 5369/1: omap mmc: Add new omap hsmmc controller for 2430 and 34xx, v3Madhusudhan Chikkature2009-01-24
| | | | | | | | | | | | | | | | 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>
* [ARM] 5365/1: s3cmci: Use new include path of dma.hRamax Lo2009-01-24
| | | | | | | | | 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>
* Merge branch 'next' of ↵Linus Torvalds2009-01-09
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ...
| * dmaengine: kill enum dma_state_clientDan Williams2009-01-06
| | | | | | | | | | | | | | | | | | 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>
| * dmaengine: kill struct dma_client and supporting infrastructureDan Williams2009-01-06
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * atmel-mci: convert to dma_request_channel and down-level dma_slaveDan Williams2009-01-06
| | | | | | | | | | | | | | | | | | | | | | 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>
| * dmaengine: up-level reference counting to the module levelDan Williams2009-01-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| |
| \
*-. \ Merge branches 'fixes', 'cleanups' and 'boards'Haavard Skinnemoen2009-01-07
|\ \ \ | |_|/ |/| |
| | * atmel-mci: move atmel-mci.h file to include/linuxNicolas Ferre2009-01-05
| |/ | | | | | | | | | | | | | | 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>
* | Merge branch 'master' of ../mmcPierre Ossman2008-12-31
|\ \
| * | mmc: warn about voltage mismatchesDavid Brownell2008-12-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Get rid of a silent failure mode when the MMC/SD host doesn't support the voltages needed to operate a given card, by adding a warning. A 3.3V host and a 3.0V card, for example, no longer need to mysteriously just not work at all. This isn't the best diagnostic; ideally it would also tell what voltage the card and host support (and not just by dumping the bitmasks). Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * | mmc_spi: Add support for OpenFirmware bindingsAnton Vorontsov2008-12-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | pxamci: fix dma_unmap_sg lengthVernon Sauder2008-12-31
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | mmc_block: ensure all sectors that do not have errors are readAdrian Hunter2008-12-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a card encounters an ECC error while reading a sector it will timeout. Instead of reporting the entire I/O request as having an error, redo the I/O one sector at a time so that all readable sectors are provided to the upper layers. Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * | drivers/mmc: Move a dereference below a NULL testJulia Lawall2008-12-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | sdhci: handle built-in sdhci with modular leds classPierre Ossman2008-12-31
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | mmc: balanc pci_iomap with pci_iounmapRoel Kluin2008-12-31
| | | | | | | | | | | | | | | | | | | | | 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>
| * | mmc_block: print better error messagesAdrian Hunter2008-12-31
| | | | | | | | | | | | | | | | | | | | | | | | Add command response and card status to error messages. Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * | mmc: Add mmc_vddrange_to_ocrmask() helper functionAnton Vorontsov2008-12-31
| | | | | | | | | | | | | | | | | | | | | | | | This function sets the OCR mask bits according to provided voltage ranges. Will be used by the mmc_spi OpenFirmware bindings. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * | ricoh_mmc: Handle newer models of Ricoh controllersphilipl@overt.org2008-12-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | mmc: Add 8-bit bus width supportJarkko Lavinen2008-12-31
| | | | | | | | | | | | | | | Signed-off-by: Jarkko Lavinen <jarkko.lavinen@nokia.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * | sdhci: activate led support also when moduleÉric Piel2008-12-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | mmc: trivial annotation of 'blocks'Harvey Harrison2008-12-31
| | | | | | | | | | | | | | | | | | | | | sg_init_one is reading a be32, annotate as such. Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * | pci: use pci_ioremap_bar() in drivers/mmcArjan van de Ven2008-12-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | Merge branch 'rmk-devel-mxc-pu-v2' of ↵Russell King2008-12-17
| |\ \ | | | | | | | | | | | | git://pasiphae.extern.pengutronix.de/git/imx/linux-2.6 into devel
| | * | imxmmc: use readl/writelMarc Kleine-Budde2008-12-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Use readl/writel instead of direct pointer deref. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| | * | imxmmc: Remove unused variablesMarc Kleine-Budde2008-12-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes clkrt and cmdat from struct imxmci_host, they are unused. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| | * | imxmmc: Checkpatch cleanupMarc Kleine-Budde2008-12-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This cleans up the warnings issued by the checkpatch script and remove the file history from the header Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | Merge branch 'hsmmc-init' of ↵Russell King2008-12-17
| |\ \ \ | | |/ / | |/| | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6 into devel
| | * | omap mmc: Add low-level initialization for hsmmc controllerTony Lindgren2008-12-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add low-level initialization for hsmmc controller. Merged into this patch patch are various improvments and board support by Grazvydas Ignotas and David Brownell. Also change wire4 to be wires, as some newer controllers support 8 data lines. Cc: Pierre Ossman <drzeus-mmc@drzeus.cx> Signed-off-by: Grazvydas Ignotas <notasas@gmail.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Tony Lindgren <tony@atomide.com>
| | * | omap mmc: Add better MMC low-level initTony Lindgren2008-12-10
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will simplify the MMC low-level init, and make it more flexible to add support for a newer MMC controller in the following patches. The patch rearranges platform data and gets rid of slot vs controller confusion in the old data structures. Also fix device id numbering in the clock code. Some code snippets are based on an earlier patch by Russell King <linux@arm.linux.org.uk>. Cc: Pierre Ossman <drzeus-mmc@drzeus.cx> Signed-off-by: Tony Lindgren <tony@atomide.com>
| * | Merge branch 'clks' into develRussell King2008-11-30
| |\ \
| | * | [ARM] amba drivers: don't pass a consumer clock name for devices with unique ↵Russell King2008-11-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | clocks Where devices only have one consumer, passing a consumer clock ID has no real benefit, and it only encourages wrong implementations of the clk API. Remove it. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * | | Merge branch 's3c-moves2' of git://aeryn.fluff.org.uk/bjdooks/linux into develRussell King2008-11-29
| |\ \ \
| | * \ \ Merge branch 'master' of ↵Ben Dooks2008-11-03
| | |\ \ \ | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into s3c-moves2
| | * | | | [ARM] S3C24XX: Move mci.h to arch/arm/plat-s3c24xx/include/platBen Dooks2008-10-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move mci.h to new position in arch/arm/plat-s3c24xx/include/plat ready to clean out old include directories. Signed-off-by: Ben Dooks <ben-linux@fluff.org>
| * | | | | [ARM] Hide ISA DMA API when ISA_DMA_API is unsetRussell King2008-11-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When ISA_DMA_API is unset, we're not implementing the ISA DMA API, so there's no point in publishing the prototypes via asm/dma.h, nor including the machine dependent parts of that API. This allows us to remove a lot of mach/dma.h files which don't contain any useful code. Unfortunately though, some platforms put their own private non-ISA definitions into mach/dma.h, so we leave these behind and fix the appropriate #include statments. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * | | | | [ARM] pxa: avoid polluting the kernel's namespaceRussell King2008-11-28
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid unnecessarily pollution of the kernel's namespace by avoiding mach/hardware.h. Include this header file where necessary. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * | | | [ARM] pxa: don't pass a consumer clock name for devices with unique clocksRussell King2008-11-27
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | Where devices only have one consumer, passing a consumer clock ID has no real benefit. Remove it. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* | | | sdricoh_cs: Add support for Bay Controller devicesSascha Sommer2008-11-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some Ricoh SD card readers seems to advertise themselves slightly differently. This patches the driver to will recognise an additional product id, and it appears to work perfectly. % pccardctl info PRODID_1="RICOH" PRODID_2="Bay Controller" PRODID_3="" PRODID_4="" MANFID=0000,0000 Signed-off-by: Charles Lowe <aquasync@gmail.com> Acked-by: Sascha Sommer <saschasommer@freenet.de> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* | | | mmc: at91_mci: reorder timer setup and mmc_add_host() callNicolas Ferre2008-11-30
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As said in function comment mmc_add_host() requires that: "The host must be prepared to start servicing requests before this function completes." During this function, at91_mci_request() can be invoqued without timer beeing setup leading to a kernel Oops. This has been reported inserting this driver as a module. Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Reported-by: Wu Xuan <wux@landicorp.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* | | mmc: struct device - replace bus_id with dev_name(), dev_set_name()Kay Sievers2008-11-08
| | | | | | | | | | | | | | | | | | Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-Off-By: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* | | mmc: increase SD write timeout for crappy cardsPierre Ossman2008-11-08
| |/ |/| | | | | | | | | | | | | | | | | | | It seems that some cards are slightly out of spec and occasionally will not be able to complete a write in the alloted 250 ms [1]. Incease the timeout slightly to allow even these cards to function properly. [1] http://lkml.org/lkml/2008/9/23/390 Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* | [ARM] 5322/1: Fix fastpath issue in mmci.cLinus Walleij2008-10-27
|/ | | | | | | | | | | | | Fix fastpath issues Since mmci_request() can be called from a non-interrupt context, and does, during kernel init, causing a host of debug messages during boot if you enable spinlock debugging, we need to use the spinlock calls that save IRQ flags and restore them. Signed-off-by: Linus Walleij <triad@df.lth.se> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [PATCH] switch mmcAl Viro2008-10-21
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>