summaryrefslogtreecommitdiff
path: root/drivers/mmc
AgeCommit message (Collapse)Author
2013-12-04mmc: atmel-mci: fix oops in atmci_tasklet_funcRodolfo Giometti
commit fbd986cd420d1deeabf1039ec4e74075a5639db5 upstream. In some cases, a NULL pointer dereference happens because data is NULL when STATE_END_REQUEST case is reached in atmci_tasklet_func. Signed-off-by: Rodolfo Giometti <giometti@enneenne.com> Acked-by: Ludovic Desroches <ludovic.desroches@atmel.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Chris Ball <cjb@laptop.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-04mmc: atmel-mci: abort transfer on timeout errorLudovic Desroches
commit c1fa3426aa5c782724c97394303d52228206eda4 upstream. When a software timeout occurs, the transfer is not stopped. In DMA case, it causes DMA channel to be stuck because the transfer is still active causing following transfers to be queued but not computed. Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com> Reported-by: Alexander Morozov <etesial@gmail.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Chris Ball <cjb@laptop.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-21ARM: shmobile: update SDHI DT compatibility string to the <unit>-<soc> formatGuennadi Liakhovetski
Currently DT compatibility strings of both types can be found in the kernel sources: <unit>-<soc> and <soc>-<unit>, whereas a unique format should be followed and the former one is preferred. This patch converts the SDHI MMC driver and its users to the common standard. This is safe for now, since ATM no real products are using this driver with DT. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com> Acked-by: Chris Ball <cjb@laptop.org> [Removed r8a7740.dtsi portion as it is not applicable] Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-09-13Remove GENERIC_HARDIRQ config optionMartin Schwidefsky
After the last architecture switched to generic hard irqs the config options HAVE_GENERIC_HARDIRQS & GENERIC_HARDIRQS and the related code for !CONFIG_GENERIC_HARDIRQS can be removed. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2013-09-10Merge tag 'mmc-updates-for-3.12-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc Pull MMC updates from Chris Ball: "MMC highlights for 3.12: Core: - Support Allocation Units 8MB-64MB in SD3.0, previous max was 4MB. - The slot-gpio helper can now handle GPIO debouncing card-detect. - Read supported voltages from DT "voltage-ranges" property. Drivers: - dw_mmc: Add support for ARC architecture, and support exynos5420. - mmc_spi: Support CD/RO GPIOs. - sh_mobile_sdhi: Add compatibility for more Renesas SoCs. - sh_mmcif: Add DT support for DMA channels" * tag 'mmc-updates-for-3.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc: (50 commits) Revert "mmc: tmio-mmc: Remove .set_pwr() callback from platform data" mmc: dw_mmc: Add support for ARC mmc: sdhci-s3c: initialize host->quirks2 for using quirks2 mmc: sdhci-s3c: fix the wrong register value, when clock is disabled mmc: esdhc: add support to get voltage from device-tree mmc: sdhci: get voltage from sdhc host mmc: core: parse voltage from device-tree mmc: omap_hsmmc: use the generic config for omap2plus devices mmc: omap_hsmmc: clear status flags before starting a new command mmc: dw_mmc: exynos: Add a new compatible string for exynos5420 mmc: sh_mmcif: revision-specific CLK_CTRL2 handling mmc: sh_mmcif: revision-specific Command Completion Signal handling mmc: sh_mmcif: add support for Device Tree DMA bindings mmc: sh_mmcif: move header include from header into .c mmc: SDHI: add DT compatibility strings for further SoCs mmc: dw_mmc-pci: enable bus-mastering mode mmc: dw_mmc-pci: get resources from a proper BAR mmc: tmio-mmc: Remove .set_pwr() callback from platform data mmc: tmio-mmc: Remove .get_cd() callback from platform data mmc: sh_mobile_sdhi: Remove .set_pwr() callback from platform data ...
2013-09-08Merge tag 'mfd-3.12-1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-next Pull MFD (multi-function device) updates from Samuel Ortiz: "For the 3.12 merge window we have one new driver for the DA9063 PMIC from Dialog Semiconductor. Besides that driver we also have: - Device tree support for the s2mps11 driver - More devm_* conversion for the pm8921, max89xx, menelaus, tps65010, wl1273 and pcf50633-adc drivers. - A conversion to threaded IRQ and IRQ domain for the twl6030 driver. - A fairly big update for the rtsx driver: Better power saving support, better vendor settings handling, and a few fixes. - Support for a couple more boards (COMe-bHL6 and COMe-cTH6) for the Kontron driver. - A conversion to the dev_get_platdata() API for all MFD drivers. - A removal of non-DT (legacy) support for the twl6040 driver. - A few fixes and additions (Mic detect level) to the wm5110 register tables. - Regmap support for the davinci_voicecodec driver. - The usual bunch of minor cleanups and janitorial fixes" * tag 'mfd-3.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-next: (81 commits) mfd: ucb1x00-core: Rewrite ucb1x00_add_dev() mfd: ab8500-debugfs: Apply a check for -ENOMEM after allocating memory for event name mfd: ab8500-debugfs: Apply a check for -ENOMEM after allocating memory for sysfs mfd: timberdale: Use module_pci_driver mfd: timberdale: Remove redundant break mfd: timberdale: Staticize local variables mfd: ab8500-debugfs: Staticize local variables mfd: db8500-prcmu: Staticize clk_mgt mfd: db8500-prcmu: Use ANSI function declaration mfd: omap-usb-host: Staticize usbhs_driver_name mfd: 88pm805: Fix potential NULL pdata dereference mfd: 88pm800: Fix potential NULL pdata dereference mfd: twl6040: Use regmap for register cache mfd: davinci_voicecodec: Provide a regmap for register I/O mfd: davinci_voicecodec: Remove unused read and write functions mmc: memstick: rtsx: Modify copyright comments mmc: rtsx: Clear SD_CLK toggle enable bit if switching voltage fail mfd: mmc: rtsx: Change default tx phase mfd: pcf50633-adc: Use devm_*() functions mfd: rtsx: Copyright modifications ...
2013-09-06Merge tag 'boards-for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC board updates from Olof Johansson: "Board updates for 3.12. Again, a bit of domain overlap with SoC and DT branches, but most of this is around legacy code and board support. We've found that platform maintainers have a hard time separating all of these out and might move towards fewer branches for next release. - Removal of a number of Marvell Kirkwood board files, since contents is now common and mostly configured via DT. - Device-tree updates for Marvell Dove, including irqchip and clocksource setup. - Defconfig updates. Gotta go somewhere. One new one for Renesas Lager. - New backlight drivers for backlights used on Renesas shmobile platforms. - Removal of Renesas leds driver. - Shuffling of some of the new Broadcom platforms to give room for others in the same mach directory. More in 3.13" * tag 'boards-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (67 commits) mmc: sdhci-bcm-kona: Staticize sdhci_bcm_kona_card_event mmc: sdhci-bcm-kona: Remove unneeded version.h inclusion ARM: bcm: Make secure API call optional ARM: DT: binding fixup to align with vendor-prefixes.txt (drivers) ARM: mmc: fix NONREMOVABLE test in sdhci-bcm-kona ARM: bcm: Rename board_bcm mmc: sdhci-bcm-kona: make linker-section warning go away ARM: tegra: defconfig updates ARM: dove: add initial DT file for Globalscale D2Plug ARM: dove: add GPIO IR receiver node to SolidRun CuBox ARM: dove: add common pinmux functions to DT ARM: dove: add cpu device tree node ARM: dove: update dove_defconfig with SI5351, PCI, and xHCI arch/arm/mach-kirkwood: Avoid using ARRAY_AND_SIZE(e) as a function argument ARM: kirkwood: fix DT building and update defconfig ARM: kirkwood: Remove all remaining trace of DNS-320/325 platform code ARM: configs: disable DEBUG_LL in bcm_defconfig ARM: bcm281xx: Board specific reboot code ARM bcm281xx: Turn on socket & network support. ARM: bcm281xx: Turn on L2 cache. ...
2013-09-06Revert "mmc: tmio-mmc: Remove .set_pwr() callback from platform data"Chris Ball
This reverts commit 3af9d15c719017feb63fa99f89ac6009a5a3d467, which causes a build failure: drivers/mfd/asic3.c:724:2: error: unknown field 'set_pwr' specified in initializer
2013-08-30mmc: memstick: rtsx: Modify copyright commentsWei WANG
Update copyright date, and remove author address. Signed-off-by: Wei WANG <wei_wang@realsil.com.cn> Acked-by: Chris Ball <cjb@laptop.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-08-30mmc: rtsx: Clear SD_CLK toggle enable bit if switching voltage failWei WANG
If switching voltage fails, SD_CLK toggle enable bit should been cleared so that SD host can control SD clock automatically. Signed-off-by: Wei WANG <wei_wang@realsil.com.cn> Acked-by: Chris Ball <cjb@laptop.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-08-30mfd: mmc: rtsx: Change default tx phaseWei WANG
The default phase can meet most cards' requirement, but it is not the optimal one. In some extreme situation, the rx phase point produced by the following tuning process will drift quite a distance. Before tuning UHS card, this patch will set a more proper initial tx phase point, which is calculated from statistic data, and can achieve a much better tx signal quality. Signed-off-by: Wei WANG <wei_wang@realsil.com.cn> Acked-by: Lee Jones <lee.jones@linaro.org> Acked-by: Chris Ball <cjb@laptop.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-08-30mmc: dw_mmc: Add support for ARCMischa Jonker
Adapt Kconfig to include ARC in supported architectures Signed-off-by: Mischa Jonker <mjonker@synopsys.com> Acked-by: Seungwon Jeon <tgih.jun@samsung.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2013-08-30mmc: sdhci-s3c: initialize host->quirks2 for using quirks2Jaehoon Chung
In order to use the quirks2, initialized the host->quirks2. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Kyungmin Park <Kyungmin.park@samsung.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2013-08-30mmc: sdhci-s3c: fix the wrong register value, when clock is disabledJaehoon Chung
When use the QUIRK_NONSTANDARD_CLOCK, then never set to 0 at clock control register. This patch fixes this problem. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2013-08-29Merge tag 'bcm-for-3.12-late-soc' of git://github.com/broadcom/bcm11351 into ↵Olof Johansson
next/boards From Christian Daudt, late changes for 3.12 broadcom mmc driver. Small trivial changes so I'll take them through arm-soc. * tag 'bcm-for-3.12-late-soc' of git://github.com/broadcom/bcm11351: mmc: sdhci-bcm-kona: Staticize sdhci_bcm_kona_card_event mmc: sdhci-bcm-kona: Remove unneeded version.h inclusion
2013-08-27mmc: sdhci-bcm-kona: Staticize sdhci_bcm_kona_card_eventSachin Kamat
sdhci_bcm_kona_card_event is referenced only in this file. Make it static. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Acked-by: Christian Daudt <csd@broadcom.com>
2013-08-27mmc: sdhci-bcm-kona: Remove unneeded version.h inclusionSachin Kamat
version.h header inclusion is not necessary as detected by versioncheck. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Acked-by: Christian Daudt <csd@broadcom.com>
2013-08-26mmc: esdhc: add support to get voltage from device-treeHaijun Zhang
Add suppport to get voltage from device-tree node for esdhc host, if voltage-ranges was specified in device-tree node we can get ocr_mask instead of read from host capacity register. If not voltages still can be get from host capacity register. Signed-off-by: Haijun Zhang <haijun.zhang@freescale.com> Acked-by: Anton Vorontsov <anton@enomsg.org> Signed-off-by: Chris Ball <cjb@laptop.org>
2013-08-26mmc: sdhci: get voltage from sdhc hostHaijun Zhang
We use host->ocr_mask to hold the voltage get from device-tree node, In case host->ocr_mask was available, we use host->ocr_mask as the final available voltage can be used by MMC/SD/SDIO card. Signed-off-by: Haijun Zhang <haijun.zhang@freescale.com> Reviewed-by: Anton Vorontsov <anton@enomsg.org> Signed-off-by: Chris Ball <cjb@laptop.org>
2013-08-26mmc: core: parse voltage from device-treeHaijun Zhang
Add function to support getting voltage from device-tree. If voltage-range is specified in device-tree node, this function will parse it and return the available voltage mask. Signed-off-by: Haijun Zhang <haijun.zhang@freescale.com> Acked-by: Anton Vorontsov <anton@enomsg.org> Signed-off-by: Chris Ball <cjb@laptop.org>
2013-08-25mmc: omap_hsmmc: use the generic config for omap2plus devicesAmarinder Bindra
OMAP's hs_mmc driver is used for MMC controller operation on many omap2plus SoCs (OMAP2430, OMAP3, 4, 5 and AM335x). Considering that the device tree entries are already present for these, allow the driver to be built using the config ARCH_OMAP2PLUS rather than individually adding a config for each SoC to enable the support. Use COMPILE_TEST to enable the build for other platforms. Signed-off-by: Amarinder Bindra <a-bindra@ti.com> Cc: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Cc: Nishanth Menon <nm@ti.com> Acked-by: Felipe Balbi <balbi@ti.com> Acked-by: Balaji T K <balajitk@ti.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2013-08-25mmc: omap_hsmmc: clear status flags before starting a new commandFrancesco Lavra
Commit 1f6b9fa40e76fffaaa0b3bd6a0bfdcf1cdc06efa consolidated writes to the STAT register in one location, moving them from omap_hsmmc_do_irq() to omap_hsmmc_irq(). This move has the unwanted side effect that the controller status flags are potentially cleared after a new command has been started as a consequence of reading the previous status flags. This means that if the new command changes the status flags before the IRQ routine returns, those flags may be cleared without handling the event which asserted them, and thus missing the event. Move the writing of the STAT register back in omap_hsmmc_do_irq(), before handling the status flags which generated the interrupt. Signed-off-by: Francesco Lavra <francescolavra.fl@gmail.com> Reviewed-and-Tested-by: Balaji T K <balajitk@ti.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2013-08-25mmc: dw_mmc: exynos: Add a new compatible string for exynos5420Yuvaraj Kumar C D
The Exynos5420 has a DWMMC controller which is different from prior versions.This patch adds a new compatible string for Exynos5420. Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com> Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com> Signed-off-by: Yuvaraj Kumar C D <yuvaraj.cd@samsung.com> Acked-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2013-08-25mmc: sh_mmcif: revision-specific CLK_CTRL2 handlingGuennadi Liakhovetski
Some newer MMCIF IP revisions contain a CE_CLK_CTRL2 register, that has to be set for proper operation. Support for this feature is added in a way to preserve the current behaviour by default, i.e. when it is not enabled in platform data. Patch is based on work by Nobuyuki HIRAI. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2013-08-25mmc: sh_mmcif: revision-specific Command Completion Signal handlingGuennadi Liakhovetski
Some earlier MMCIF IP revisions contained Command Completion Signal support, which has been dropped again in modern versions. Sopport for this feature is added in a way to preserve the current behaviour by default, i.e. when it is not enabled in platform data. Patch is based on work by Nobuyuki HIRAI. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2013-08-25mmc: sh_mmcif: add support for Device Tree DMA bindingsGuennadi Liakhovetski
To use DMA in the Device Tree case the driver has to be modified to use suitable API to obtain DMA channels. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2013-08-25mmc: sh_mmcif: move header include from header into .cGuennadi Liakhovetski
sh_dma.h isn't needed in sh_mmcif.h, move it into sh_mmcif.c. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2013-08-25mmc: SDHI: add DT compatibility strings for further SoCsGuennadi Liakhovetski
Add further OF compatibility strings to the SDHI driver to be able to precisely control driver's behaviour on each of them. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com> Acked-by: Magnus Damm <damm@opensource.se> Acked-by: Simon Horman <horms@verge.net.au> Signed-off-by: Chris Ball <cjb@laptop.org>
2013-08-25mmc: dw_mmc-pci: enable bus-mastering modeAndy Shevchenko
This patch enables bus-mastering mode for MMC controller to allow IDMAC transfers. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Seungwon Jeon <tgih.jun@samsung.com> Tested-by: Prabu Thangamuthu <Prabu.T@synopsys.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2013-08-25mmc: dw_mmc-pci: get resources from a proper BARAndy Shevchenko
There is a typo when the mapped space is from BAR 2, but BAR 0 is used instead. This patch fixes the typo. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Prabu Thangamuthu <Prabu.T@synopsys.com> Acked-by: Seungwon Jeon <tgih.jun@samsung.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2013-08-25mmc: tmio-mmc: Remove .set_pwr() callback from platform dataLaurent Pinchart
The .set_pwr() callback isn't used anymore as all platforms register GPIO-controlled regulators. Remove it. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Chris Ball <cjb@laptop.org>
2013-08-25mmc: tmio-mmc: Remove .get_cd() callback from platform dataLaurent Pinchart
All platforms pass the CD GPIO number to the driver in the .cd_gpio field. The .get_cd() callback isn't used anymore, remove it Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Chris Ball <cjb@laptop.org>
2013-08-25mmc: sh_mobile_sdhi: Remove .set_pwr() callback from platform dataLaurent Pinchart
The .set_pwr() callback isn't used anymore as all platforms register GPIO-controlled regulators. Remove it. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Chris Ball <cjb@laptop.org>
2013-08-25mmc: sh_mobile_sdhi: Remove .get_cd() callback from platform dataLaurent Pinchart
All platforms pass the CD GPIO number to the driver in the .cd_gpio field. The .get_cd() callback isn't used anymore, remove it. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Chris Ball <cjb@laptop.org>
2013-08-25mmc: sh_mmcif: Remove .set_pwr() callback from platform dataLaurent Pinchart
The .set_pwr() callback isn't used anymore as all platforms register GPIO-controlled regulators. Remove it. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Chris Ball <cjb@laptop.org>
2013-08-25mmc: mmc_spi: Remove platform data .get_cd() and .get_ro() callbacksLaurent Pinchart
All platforms now pass the CD and RO GPIOs to the MMC SPI driver, those callbacks are not used anymore. Remove them. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2013-08-25mmc: mmc_spi: Support CD/RO GPIOsLaurent Pinchart
Add support for passing CD/RO GPIO numbers directly to the mmc_spi driver instead of relying solely on board code callbacks to retrieve the CD/RO signals values. The driver will enable debouncing on the card detect GPIO if the cd_debounce field is set to a non-zero value. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2013-08-25mmc: slot-gpio: Add debouncing capability to mmc_gpio_request_cd()Laurent Pinchart
Add a debounce parameter to the mmc_gpio_request_cd() function that enables GPIO debouncing when set to a non-zero value. This can be used by MMC host drivers to enable debouncing on the card detect signal. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2013-08-25mmc: dw_mmc-pltfm: include 'dw_mmc-pltfm.h'Jingoo Han
Include 'dw_mmc-pltfm.h' header file in order to fix the following sparse warnings: drivers/mmc/host/dw_mmc-pltfm.c:36:5: warning: symbol 'dw_mci_pltfm_register' was not declared. Should it be static? drivers/mmc/host/dw_mmc-pltfm.c:94:1: warning: symbol 'dw_mci_pltfm_pmops' was not declared. Should it be static? drivers/mmc/host/dw_mmc-pltfm.c:118:5: warning: symbol 'dw_mci_pltfm_remove' was not declared. Should it be static? Suggested-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Seungwon Jeon <tgih.jun@samsung.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2013-08-25mmc: tmio_mmc_dma: fix PIO fallback on SDHISergei Shtylyov
I'm testing SH-Mobile SDHI driver in DMA mode with a new DMA controller using 'bonnie++' and getting DMA error after which the tmio_mmc_dma.c code falls back to PIO but all commands time out after that. It turned out that the fallback code calls tmio_mmc_enable_dma() with RX/TX channels already freed and pointers to them cleared, so that the function bails out early instead of clearing the DMA bit in the CTL_DMA_ENABLE register. The regression was introduced by commit 162f43e31c5a376ec16336e5d0ac973373d54c89 (mmc: tmio: fix a deadlock). Moving tmio_mmc_enable_dma() calls to the top of the PIO fallback code in tmio_mmc_start_dma_{rx|tx}() helps. Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Cc: stable@vger.kernel.org # 3.1+ Signed-off-by: Chris Ball <cjb@laptop.org>
2013-08-25mmc: dw_mmc: add missing MFD_SYSCON dependency for SOCFPGAJingoo Han
Added missing MFD_SYSCON dependency for SOCFPGA in order to fix the following link error. drivers/mmc/host/dw_mmc-socfpga.c:49: undefined reference to `syscon_regmap_lookup_by_compatible' Signed-off-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Jaehoon Chung <jh80.chung@samsung.com> Acked-by: Seungwon Jeon <tgih.jun@samsung.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2013-08-25mmc: core: Set data timeout for mmc bus test commands (CMD14 and CMD19).Minjian Wu
Signed-off-by: Minjian Wu <minjianwu@micron.com> Acked-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Chris Ball <cjb@laptop.org>
2013-08-25mmc: fix null pointer use in mmc_blk_remove_reqFranck Jullien
A previous commit (fdfa20c1631210d0) reordered the shutdown sequence in mmc_blk_remove_req. However, mmc_cleanup_queue is now called before we get the card pointer, and mmc_cleanup_queue sets mq->card to NULL. This patch moves the card pointer assignment before mmc_cleanup_queue. Signed-off-by: Franck Jullien <franck.jullien@gmail.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2013-08-25mmc: mmc_test: replace strict_strtol() with kstrtol_from_user()Jingoo Han
The usage of strict_strtol() is not preferred, because strict_strtol() is obsolete. Thus, kstrtol() should be used. Also, both kstrtol() and copy_from_user() can be replaced with kstrtol_from_user() to make the code simpler. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2013-08-25mmc: atmel-mci: prepare clk before calling enableBoris BREZILLON
Replace clk_enable/disable with clk_prepare_enable/disable_unprepare to avoid common clk framework warnings. Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com> Acked-by: Ludovic Desroches <ludovic.desroches@atmel.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2013-08-25mmc: sd: fix the maximum au_size for SD3.0Jaehoon Chung
Since SD Physical Layer specification V3.0, AU_SIZE is supported up to 0xf. So If SD-card is supported v3.0, then max_au should be 0xf. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2013-08-25mmc: core: free mmc_card if cmd 3,9,7 fails in mmc_sd_init_cardWei WANG
In function mmc_sd_init_card, if command 3/9/7 got failed, mmc_card allocated just before won't be freed. This would cause memory leak. Signed-off-by: Wei WANG <wei_wang@realsil.com.cn> Signed-off-by: Chris Ball <cjb@laptop.org>
2013-08-25mmc: host: Remove a duplicate line in MakefileWei WANG
Signed-off-by: Wei WANG <wei_wang@realsil.com.cn> Signed-off-by: Chris Ball <cjb@laptop.org>
2013-08-25mmc: omap_hsmmc: fix dependency on indirect header inclusionFelipe Balbi
omap_hsmmc.c depends on <linux/sizes.h> being included indirectly by another header. Once we enable COMPILE_TEST for this driver, we might compile under architectures which won't include <linux/sizes.h> for us. In fact, one such case is x86. In order to prevent compile breakages, let's explicitly include <linux/sizes.h>. Signed-off-by: Felipe Balbi <balbi@ti.com> Acked-by: Balaji T K <balajitk@ti.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2013-08-25mmc: dw_mmc: Handle DW_MCI_QUIRK_IDMAC_DTO properlyDoug Anderson
In (1fb5f68 mmc: dw_mmc: Don't loop when handling an interrupt), the code for handling DW_MCI_QUIRK_IDMAC_DTO became dead code. Move it to where it ought to live. Found by code inspection and compile-tested only--I don't know of any boards that need DW_MCI_QUIRK_IDMAC_DTO. Signed-off-by: Doug Anderson <dianders@chromium.org> Acked-by: Seungwon Jeon <tgih.jun@samsung.com> Signed-off-by: Chris Ball <cjb@laptop.org>