summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-12-06mmc: omap_hsmmc: Enable HSPE bit for high speed cardsHebbar, Gururaja3-1/+31
HSMMC IP on AM33xx need a special setting to handle High-speed cards. Other platforms like TI81xx, OMAP4 may need this as-well. This depends on the HSMMC IP timing closure done for the high speed cards. From AM335x TRM (SPRUH73F - 18.3.12 Output Signals Generation): The MMC/SD/SDIO output signals can be driven on either falling edge or rising edge depending on the SD_HCTL[2] HSPE bit. This feature allows to reach better timing performance, and thus to increase data transfer frequency. There are few pre-requisites for enabling the HSPE bit - Controller should support High-Speed-Enable Bit and - Controller should not be using DDR Mode and - Controller should advertise that it supports High Speed in capabilities register and - MMC/SD clock coming out of controller > 25MHz Signed-off-by: Hebbar, Gururaja <gururaja.hebbar@ti.com> Signed-off-by: Venkatraman S <svenkatr@ti.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: omap_hsmmc: Update error code for response_busy cmdBalaji T K1-2/+2
Update error code to cmd->error for commands with response_busy and no data. Signed-off-by: Balaji T K <balajitk@ti.com> Reviewed-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Venkatraman S <svenkatr@ti.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: omap_hsmmc: No reset of cmd state machine for DCRCBalaji T K1-1/+1
Avoid soft reset of command internal state machine on data errors. Signed-off-by: Balaji T K <balajitk@ti.com> Reviewed-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Venkatraman S <svenkatr@ti.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: omap_hsmmc: Fix Oops in case of data errorsBalaji T K1-6/+12
ae4bf788ee9 ("mmc: omap_hsmmc: consolidate error report handling of HSMMC IRQ") sets both end_cmd and end_trans to 1. Setting end_cmd to 1 for Data Timeout/CRC leads to NULL pointer dereference of host->cmd as the command complete has previously been handled. Set end_cmd only in case of command Timeout/CRC. Moreover host->cmd->error should not be updated on data error case, only host->data->error needs to be updated. Signed-off-by: Balaji T K <balajitk@ti.com> Reviewed-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Venkatraman S <svenkatr@ti.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: dw_mmc: Add sdio power bindingsAbhilash Kesavan2-3/+18
Add dt-based retrieval of host sdio pm capabilities. Based on the dt based discovery do a bus init in the resume function. Signed-off-by: Olof Johansson <olofj@chromium.org> Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: sdhci-pltfm: Support optional pm propertiesAbhilash Kesavan1-0/+6
Add support for optional pm capabilities such as MMC_PM_KEEP_POWER and MMC_PM_WAKE_SDIO_IRQ. Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: dt: Add optional pm properties to core bindingAbhilash Kesavan1-0/+6
Add documentation for pm capabilties such as MMC_PM_KEEP_POWER and MMC_PM_WAKE_SDIO_IRQ. Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: dt: Fix typo in filenameAbhilash Kesavan1-0/+0
Fix typo in the synopsis dwmmc controller dt binding filename. Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: sdhci-pxav3: add quirks2Kevin Liu2-0/+4
Acked-by: Zhangfei Gao <zhangfei.gao@marvell.com> Signed-off-by: Kevin Liu <kliu5@marvell.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: sdhci: Use regulator min/max voltage range according to specKevin Liu1-10/+8
For regulator vmmc/vmmcq, use voltage range as below 3.3v/3.0v: (2.7v, 3.6v) 1.8v: (1.7v, 1.95v) Original code uses the precise value which may fail in regulator driver if it does NOT support the precise voltage. Signed-off-by: Jialing Fu <jlfu@marvell.com> Signed-off-by: Kevin Liu <kliu5@marvell.com> Tested-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: SD/MMC Host Controller for Wondermedia WM8505/WM8650Tony Prisk5-0/+1065
This patch adds support for the SD/MMC host controller found on Wondermedia 8xxx series SoCs, currently supported under arm/arch-vt8500. A binding document is also included, based on mmc.txt with additional properties. Signed-off-by: Tony Prisk <linux@prisktech.co.nz> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: card: Add RPMB support in IOCTL interfaceLoic Pallardy1-0/+64
RPMB partition is accessing though /dev/block/mmcXrpmb device User callers can read and write entire data frame(s) as defined by JEDEC Standard JESD84-A441, using standard IOCTL interface. Signed-off-by: Alex Macro <alex.macro@stericsson.com> Signed-off-by: Loic Pallardy <loic.pallardy@stericsson.com> Reviewed-by: Namjae Jeon <linkinjeon@gmail.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Krishna Konda <kkonda@codeaurora.org> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: core: Add mmc_set_blockcount featureLoic Pallardy2-0/+16
Provide support for automatically sending Set Block Count (CMD23) messages. Used at least for RPMB support. Signed-off-by: Alex Macro <alex.macro@stericsson.com> Signed-off-by: Loic Pallardy <loic.pallardy@stericsson.com> Reviewed-by: Namjae Jeon <linkinjeon@gmail.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Johan Rudholm <johan.rudholm@stericsson.com> Acked-by: Krishna Konda <kkonda@codeaurora.org> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: core: Extend sysfs to ext_csd parameters for RPMB supportLoic Pallardy2-0/+11
Extend current sysfs access to ext_csd rpmb parameters (RPMB partition size) and rel_sector information. Signed-off-by: Loic Pallardy <loic.pallardy@stericsson.com> Reviewed-by: Namjae Jeon <linkinjeon@gmail.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Johan Rudholm <johan.rudholm@stericsson.com> Acked-by: Krishna Konda <kkonda@codeaurora.org> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: card: Do not scan RPMB partitionsLoic Pallardy1-0/+2
Do not scan rpmb partitions for "soft" partitions, since the rpmb partition contains protected data. Silences the following message during boot: mmcblkXRPMB: unknown partition table Signed-off-by: Johan Rudholm <johan.rudholm@stericsson.com> Reviewed-by: Namjae Jeon <linkinjeon@gmail.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Krishna Konda <kkonda@codeaurora.org> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: core: Expose access to RPMB partitionLoic Pallardy3-0/+15
Following JEDEC standard, if the mmc supports RPMB partition, a new interface is created and exposed via /dev/block. Users will be able to access RPMB partition using standard mmc IOCTL commands. Signed-off-by: Alex Macro <alex.macro@stericsson.com> Signed-off-by: Loic Pallardy <loic.pallardy@stericsson.com> Reviewed-by: Namjae Jeon <linkinjeon@gmail.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Johan Rudholm <johan.rudholm@stericsson.com> Acked-by: Krishna Konda <kkonda@codeaurora.org> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: host: Make UHS timing values fully uniqueKevin Liu1-6/+6
Both of MMC_TIMING_LEGACY and MMC_TIMING_UHS_SDR12 are defined to 0. And ios->timing is set to MMC_TIMING_LEGACY during power up. But set_ios can't distinguish these two timing if host support spec 3.0. Just adjust timing values to be different can resolve this issue without any other impact. Reviewed-by: Girish K S <girish.shivananjappa@linaro.org> Acked-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Kevin Liu <kliu5@marvell.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: sdhci-pxav3: Add base clock quirkKevin Liu1-1/+10
Enable the quirk SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN since SD_CAPABILITIES_1[15:8](BASE_FREQ) can't get correct base clock value. It returns a fixed pre-set value like 200 on some sdhci-pxav3 based platforms like MMP3 while return 0 on the other sdhci-pxav3 based platforms. So we enable the quirk and get the base clock via function get_max_clock. Also add get_max_clock. Reported-by: Philip Rakity <prakity@marvell.com> Reviewed-by: Philip Rakity <prakity@Marvell.com> Acked-by: Zhangfei Gao <zhangfei.gao@marvell.com> Signed-off-by: Kevin Liu <kliu5@marvell.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: Standardise capability typeLee Jones5-9/+9
There are discrepancies with regards to how MMC capabilities are carried throughout the subsystem. Let's standardise them to eliminate any confusion. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: mxs-mmc: Remove platform dataFabio Estevam2-40/+10
All MXS users have been converted to device tree and the board files have been removed. No need to keep platform data in the driver. Also move bus_width declaration in the beggining of mxs_mmc_probe() to avoid: 'warning: ISO C90 forbids mixed declarations and code'. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: Marek Vasut <marex@denx.de> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: sdio: Use multiple scatter/gather listKyoungil Kim2-11/+31
Before this patch, we always used only single sg entry for SDIO transfer. This patch switches to using multiple sg entries. In the case of dwmci, it supports only up to 4KB size per single sg entry. So if we want to transfer more than 4KB, we should send more than 1 command. When we tested before applying this patch, it took around 335 us for 5K(5120) bytes transfer with dwmci controller. After applying this patch, it takes 242 us for 5K bytes. So this patch makes around 38% performance improvement for 5K bytes transfer. If the transfer size is bigger, then the performance improvement ratio will be increased. Signed-off-by: Kyoungil Kim <ki0351.kim@samsung.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: core: Fix some driver hangs when dealing with broken devicesTrey Ramsay3-1/+43
There are infinite loops in the mmc code that can be caused by bad hardware. The code will loop forever if the device never comes back from program mode, R1_STATE_PRG, and it is not ready for data, R1_READY_FOR_DATA. A long timeout is added to prevent the code from looping forever. The timeout will occur if the device never comes back from program state or the device never becomes ready for data. It's not clear whether the timeout will do more than log a pr_err() and then start a fresh hang all over again. We may need to extend this patch later to perform some kind of reset of the device (is that possible?) or rejection of new I/O to the device. Signed-off-by: Trey Ramsay <tramsay@linux.vnet.ibm.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: dw_mmc: fix more const pointer warningsArnd Bergmann1-5/+5
The patch "dw_mmc: fix multiple drv_data NULL dereferences" has unfortunately clashed with my "mmc: dw_mmc: constify dw_mci_idmac_ops in exynos back-end" patch, causing new warnings to appear. This should hopefully fix the issue for good. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: at91-mci: remove obsolete driverLudovic Desroches6-1374/+1
The at91-mci driver is not needed anymore since the atmel-mci driver now supports all Atmel devices. Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: omap_hsmmc: remove warning message for debounce clockBalaji T K1-1/+0
MMC debounce clock is applicable only for omap2430, warning message gets printed when enable fails for debounce clock. Remove the get debounce clock failure message as it is noisy for other platforms. Signed-off-by: Balaji T K <balajitk@ti.com> Reported-by: Russell King <rmk+kernel@arm.linux.org.uk> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: omap_hsmmc: add DT property for max bus frequencyDaniel Mack1-1/+4
Maximum bus frequency can be limited by external circuitry like level shifters etc. Allow passing this value from DT. Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Venkatraman S <svenkatr@ti.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: omap_hsmmc: claim pinctrl at probe timeDaniel Mack1-0/+7
This allows DT-driven board to set up the pin mux only when the driver is in use. Signed-off-by: Daniel Mack <zonque@gmail.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Venkatraman S <svenkatr@ti.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: mxcmmc: fix SD cards not being detected sometimes.Javier Martin1-1/+1
When a SD card is initialized some data transfers of 64 and 8 bytes are issued. It seems the DMA has some problems dealing with these kind of "short" transfers, leading sometimes to the SD card not being detected. In order to solve this problem, do not use DMA for transfer sizes lower than the sector size. Signed-off-by: Javier Martin <javier.martin@vista-silicon.com> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: dw_mmc: use helper macro module_platform_driver()Andy Shevchenko1-12/+2
Since v3.2 we have nice macro to define the platform driver's init and exit calls. This patch simplifies the dw_mmc platform driver by using that macro. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Girish K S <girish.shivanajappa@linaro.org> Acked-by: Will Newton <will.newton@imgtec.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: dw_mmc: use __devexit_p macro for .remove()Andy Shevchenko2-2/+2
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Girish K S <girish.shivananjappa@linaro.org> Acked-by: Will Newton <will.newton@imgtec.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: queue: amend buffer swap for non-blocking transferSeungwon Jeon1-7/+10
In case both 'req' and 'mq->mqrq_prev->req' are null, there is no request to be processed. That means there is no need to switch buffer. Switching buffer is required only after finishing 'issue_fn'. Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com> Reviewed-by: Per Forlin <per.forlin@stericsson.com> Tested-by: Johan Rudholm <johan.rudholm@stericsson.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: core: debugfs: Add signal_voltage to ios dumpJohan Rudholm1-0/+16
Signed-off-by: Johan Rudholm <johan.rudholm@stericsson.com> Reviewed-by: Philip Rakity <prakity@nvidia.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: sdhci: Balance vmmc regulator_enable(), and always enable vqmmcKevin Liu1-7/+8
The vmmc regulator enable in sdhci_add_host is NOT necessary since it can be enabled during mmc_power_up by function mmc_regulator_set_ocr. And this extra enable will make regulator_enable/regulator_disable unbalanced. Consequently, vmmc can't be disabled during mmc_power_off. Also, if the vqmmc regulator exists, it should be enabled regardless it support 1.8v or not. Signed-off-by: Kevin Liu <kliu5@marvell.com> Signed-off-by: Philip Rakity <prakity@marvell.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: sh-mmcif: avoid oops on spurious interrupts (second try)Guennadi Liakhovetski1-2/+2
On some systems, e.g., kzm9g, MMCIF interfaces can produce spurious interrupts without any active request. To prevent the Oops, that results in such cases, don't dereference the mmc request pointer until we make sure, that we are indeed processing such a request. Reported-by: Tetsuyuki Kobayashi <koba@kmckk.co.jp> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Tested-by: Tetsuyuki Kobayashi <koba@kmckk.co.jp> Cc: stable@vger.kernel.org Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06Revert misapplied "mmc: sh-mmcif: avoid oops on spurious interrupts"Chris Ball1-4/+0
This reverts commit 8464dd52d3198dd05, which was a misapplied debugging version of the patch, not the final patch itself. Signed-off-by: Chris Ball <cjb@laptop.org> Cc: stable@vger.kernel.org
2012-12-06mmc: sdhci-s3c: fix missing clock for gpio card-detectHeiko Stübner1-0/+7
2abeb5c5ded2 ("Add clk_(enable/disable) in runtime suspend/resume") added the capability to stop the clocks when the device is runtime suspended, but forgot to handle the case of the card-detect using an external gpio. Therefore in the case that runtime-pm is enabled, start the io-clock when a card is inserted and stop it again once it is removed. Signed-off-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-11-07mmc: sdhci-s3c: fix the card detection in runtime-pmSeungwon Jeon1-2/+4
If host clock is disabled, host cannot detect a card in case of using CD internal for detection. Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-11-07mmc: sdhci-s3c: use clk_prepare_enable and clk_disable_unprepareThomas Abraham1-14/+14
Convert clk_enable/clk_disable to clk_prepare_enable/clk_disable_unprepare calls as required by common clock framework. Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-11-07mmc: dw_mmc: constify dw_mci_idmac_ops in exynos back-endArnd Bergmann5-8/+8
The of_device_id match data is now marked as const and must not be modified. This changes the dw_mmc to mark all pointers passing the dw_mci_drv_data or dw_mci_dma_ops structures as const, and also marks the static definitions as const. drivers/mmc/host/dw_mmc-exynos.c: In function 'dw_mci_exynos_probe': drivers/mmc/host/dw_mmc-exynos.c:234:11: warning: assignment discards 'const' qualifier from pointer target type [enabled by default] Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Thomas Abraham <thomas.abraham@linaro.org> Cc: Will Newton <will.newton@imgtec.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-11-07mmc: dw_mmc: fix modular build for exynos back-endArnd Bergmann1-1/+1
The MODULE_DEVICE_TABLE entry for dw_mci_exynos_match was incorrectly copied from the platform back-end, which causes this error when building the driver as a loadable module: drivers/mmc/host/dw_mmc-exynos.c: At top level: drivers/mmc/host/dw_mmc-exynos.c:226:34: error: '__mod_of_device_table' aliased to undefined symbol 'dw_mci_pltfm_match' This patch fixes the problem by just using the correct string. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Thomas Abraham <thomas.abraham@linaro.org> Cc: Will Newton <will.newton@imgtec.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-11-07mmc: sdhci: fix NULL dereference in sdhci_request() tuningChris Ball1-10/+13
Commit 473b095a72a9 ("mmc: sdhci: fix incorrect command used in tuning") introduced a NULL dereference at resume-time if an SD 3.0 host controller raises the SDHCI_NEEDS_TUNING flag while no card is inserted. Seen on an OLPC XO-4 with sdhci-pxav3, but presumably affects other controllers too. Signed-off-by: Chris Ball <cjb@laptop.org> Cc: stable <stable@vger.kernel.org> [3.3+]
2012-11-07mmc: sdhci: fix IS_ERR() checking of regulator_get()Kevin Liu1-6/+12
There are two problems here: The check for vmmc was printing an unnecessary pr_info() when host->vmmc is NULL. The intent of the check for vqmmc was to only remove UHS if we have a regulator that doesn't support the required voltage, but since IS_ERR() doesn't catch NULL, we were actually removing UHS modes if vqmmc isn't present at all -- since it isn't present for most users, this breaks UHS for them. This patch fixes that UHS regression in 3.7-rc1. Signed-off-by: Kevin Liu <kliu5@marvell.com> Signed-off-by: Bin Wang <binw@marvell.com> Reviewed-by: Philip Rakity <prakity@marvell.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-11-07mmc: fix sdhci-dove probe/removalRussell King - ARM Linux1-18/+20
1. Never ever publish a device in the system before it has been setup to a usable state. 2. Unregister the device _BEFORE_ taking away any resources it may be using. 3. Don't check clks against NULL. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-11-07mmc: sh_mmcif: fix use after freeGuennadi Liakhovetski1-1/+1
A recent commit "mmc: sh_mmcif: fix clock management" has introduced a use after free bug in sh_mmcif.c: in sh_mmcif_remove() the call to mmc_free_host() frees private driver data, therefore using it afterwards is a bug. Revert that hunk. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Cc: stable@vger.kernel.org [3.6] Signed-off-by: Chris Ball <cjb@laptop.org>
2012-11-07mmc: sdhci-pci: fix 'Invalid iomem size' error message conditionAdrian Hunter1-1/+1
The SDHCI standard defines a 256 byte register set but a device that specifies a larger iomem region is not an error. Alter the message condition accordingly. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-11-07mmc: mxcmmc: Fix MODULE_ALIASFabio Estevam1-1/+1
The correct name for the driver is "mxc-mmc". Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-11-07mmc: omap_hsmmc: fix NULL pointer dereference for dt bootBalaji T K1-6/+11
dev->platform_data is NULL in case of device tree boot, instead use the saved version in struct omap_hsmmc_host. Signed-off-by: Balaji T K <balajitk@ti.com> Signed-off-by: Venkatraman S <svenkatr@ti.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-11-07mmc: omap_hsmmc: fix host reference after mmc_free_hostBalaji T K1-1/+1
struct omap_hsmmc_host *host should not be accessed after mmc_free_host(). Reorder mmc_free_host() after iounmap(host->base). Signed-off-by: Balaji T K <balajitk@ti.com> Signed-off-by: Venkatraman S <svenkatr@ti.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-11-07mmc: dw_mmc: fix multiple drv_data NULL dereferencesJames Hogan2-14/+19
800d78bfccb3d ("mmc: dw_mmc: add support for implementation specific callbacks") -- merged in v3.7-rc1 -- introduced multiple NULL pointer dereferences when the default dw_mci_pltfm_probe() is used, as it sets host->drv_data to NULL, and that's only checked against NULL in 1 out of the 7 cases where it is dereferenced. Signed-off-by: James Hogan <james.hogan@imgtec.com> Acked-by: Jaehoon Chung <jh80.chung@samsung.com> Acked-by: Will Newton <will.newton@imgtec.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-11-07mmc: dw_mmc: enable controller interrupt before calling mmc_start_hostYuvaraj CD1-14/+15
As mmc_start_host is getting called before enabling the dw_mmc controller interrupt, there is a problem of missing the SDMMC_INT_CMD_DONE for the very first command sent by the sdio_reset. This problem occurs only when we disable MMC debugging i.e, MMC_DEBUG=n. This patch enables the dw_mmc controller interrupt before mmc_start_host. Signed-off-by: Yuvaraj CD <yuvaraj.cd@samsung.com> Reviewed-by: Girish K S <girish.shivananjappa@linaro.org> Acked-by: Will Newton <will.newton@imgtec.com> Signed-off-by: Chris Ball <cjb@laptop.org>