summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* mmc: dw_mmc: Don't try to enable the CD until we're sure we're not deferringDoug Anderson2015-03-311-3/+3
| | | | | | | | | | | | | | | | | | | If dw_mci_init_slot() returns that we got a probe deferral then it may leave slot->mmc as NULL. That will cause dw_mci_enable_cd() to crash when it calls mmc_gpio_get_cd(). Fix this by moving the call of dw_mci_enable_cd() until we're sure that we're good. Note that if we have more than one slot and one defers (but the others don't) things won't work so well. ...but that's not a new thing and everyone has already agreed that multislot support ought to be removed from dw_mmc eventually anyway since it is unused, untested, and you can see several bugs like this by inspecting the code. Fixes: bcafaf5470f0 ("mmc: dw_mmc: Only enable CD after setup and only if needed") Signed-off-by: Doug Anderson <dianders@chromium.org> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: dw_mmc: Add a timeout for sending CMD11Doug Anderson2015-03-312-0/+28
| | | | | | | | | | | | | In the Designware databook's description of the "Voltage Switch Normal Scenario" it instructs us to set a timer and fail the voltage change if we don't see the voltage change interrupt within 2ms. Let's implement that. Without implementing this I have often been able to reproduce a hang while trying to send CMD11 on an rk3288-based board while constantly ejecting and inserting UHS cards. Signed-off-by: Doug Anderson <dianders@chromium.org> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: dw_mmc: enable card read threshold when mode is HS400Jaehoon Chung2015-03-311-0/+1
| | | | | | | | Enable card-read-threshold, when eMMC mode is HS400. Refer to f1d2736c8156 (mmc: dw_mmc: control card read threshold) Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: core: Enable runtime PM management of host devicesUlf Hansson2015-03-311-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently those host drivers which have deployed runtime PM, deals with the runtime PM reference counting entirely by themselves. Since host drivers don't know when the core will send the next request through some of the host_ops callbacks, they need to handle runtime PM get/put between each an every request. In quite many cases this has some negative effects, since it leads to a high frequency of scheduled runtime PM suspend operations. That due to the runtime PM reference count will normally reach zero in-between every request. We can decrease that frequency, by enabling the core to deal with runtime PM reference counting of the host device. Since the core often knows that it will send a seqeunce of requests, it makes sense for it to keep a runtime PM reference count during these periods. More exactly, let's increase the runtime PM reference count by invoking pm_runtime_get_sync() from __mmc_claim_host(). Restore that action by invoking pm_runtime_mark_last_busy() and pm_runtime_put_autosuspend() in mmc_release_host(). In this way a runtime PM reference count will be kept during the complete cycle of a claim -> release host. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Acked-by: Konstantin Dorfman <kdorfman@codeaurora.org>
* ARM: OMAP2: HSMMC: explicit fields to declare cover/card detect pinAndreas Fenkart2015-03-273-17/+33
| | | | | | | | | | | | | | | | | | | | board-rx51 has no card detect pin in the mmc slot, but can detect that the (cell-phone) cover has been removed and the card is accessible. The semantics between cover/card detect differ, the gpio on the slot informs you after the card has been removed, cover removal does not necessarily mean that the card has been removed. This means different code paths are necessary. To complete this we also want different fields in the platform data for cover and card detect. This separation is not pushed all the way down into struct omap2_hsmmc_info which is used to initialize the platform data. If we did that we had to go over all board files and set the new gpio_cod pin to -EINVAL. If we forget one board or some out-of-tree archicture forgets that the default '0' is used which is a valid pin number. Signed-off-by: Andreas Fenkart <afenkart@gmail.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: core: Remove the ->enable|disable() callbacksNeilBrown2015-03-272-11/+0
| | | | | | | | | These callbacks have been set to deprecated for some time. The last user (omap_hsmmc) has moved away from using them, which thus enables us to completely remove them. Signed-off-by: NeilBrown <neil@brown.name> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: omap_hsmmc: stop using ->enable|disable() callbacksNeilBrown2015-03-271-21/+9
| | | | | | | | | | | | | | The ->enable|disable() callbacks are only used to get and put runtime PM references. Currently omap_hsmmc's ->set_ios() already does this itself. Other host drivers deals with runtime PM without using the ->enable|disable() callbacks and thus do the runtime PM reference counting themselves. Apply that approach for omap_hsmmc as well and then discard the ->enable|disable() callbacks. Signed-off-by: NeilBrown <neil@brown.name> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sdhci-msm: Add support for vendor capabilities registersGeorgi Djakov2015-03-251-1/+28
| | | | | | | | | Some versions of this controller do not advertise their 3.0v and 8bit bus-width support capabilities. It is required to explicitly set these capabilities for the specific controller versions. Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sdhci-esdhc-imx: support voltage-range propertySascha Hauer2015-03-252-1/+9
| | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: mmci: Cascade EPROBE_DEFER from regulators.Bjorn Andersson2015-03-251-1/+4
| | | | | Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* MAINTAINERS: mmc: Add Jaehoon as co-maintainer for SDHCI SAMSUNG DRIVERUlf Hansson2015-03-251-1/+2
| | | | | | | | | | | | Jaehoon has volunteered in maintaining the SDHCI SAMSUNG DRIVER so add him. Since we are updating this section let's also correct file path to cover all files for sdhci-s3c. Cc: Ben Dooks <ben-linux@fluff.org> Cc: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: atmel-mci: use endian agnostic IOBen Dooks2015-03-251-2/+9
| | | | | | | | | Change the __raw IO functions to endian agnostic relaxed ones to allow the driver to function on big endian ARM systems. Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> Acked-by: Ludovic Desroches <ludovic.desroches@atmel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: constify of_device_id arrayFabian Frederick2015-03-232-2/+2
| | | | | | | | of_device_id is always used as const. (See driver.of_match_table and open firmware functions) Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: core: fold mmc_set_bus_width calls into sdio_enable_4bit_bus.NeilBrown2015-03-231-20/+12
| | | | | | | | | | | Every call to sdio_enable_4bit_bus is followed (on success) by a call to mmc_set_bus_width(). To simplify the code, include those calls directly in sdio_enable_4bit_bus(). Signed-off-by: NeilBrown <neil@brown.name> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* MAINTAINERS: mmc: Cleanup MMC/SD/SDIO section and SDHCI driver sectionUlf Hansson2015-03-232-5/+5
| | | | | | | | | | | | | As Chris Ball has moved on to other assignments, he's no longer able to help me maintain MMC. Let's remove him from the MMC sections in MAINTAINERS and add him to CREDIT file. This also affects the SDHCI DRIVER section, since its state now becomes orphan. Cc: Chris Ball <chris@printf.net> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Acked-by: Chris Ball <chris@printf.net>
* MAINTAINERS: mmc: Remove the SDHCI-OF sectionUlf Hansson2015-03-231-7/+0
| | | | | | | | | | | Anton told me that he isn't maintaing the SDHCI-OF parts anymore, so let's remove him from this section to avoid confusion. Morover, since the SDHCI-OF section overlaps with the SDHCI DRIVER section, let's just remove it completely. Cc: Anton Vorontsov <anton@enomsg.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sunxi: add MMC_CAP_SDIO_IRQ capabilityHans de Goede2015-03-231-1/+1
| | | | | | | | | | | | | When the sunxi mmc-controller code was initially merged MMC_CAP_SDIO_IRQ was not added to the host caps because of issues with some sdio wifi modules. It turns out that these issues have nothing to do with using sdio-irq support, they also happen with oob interrupts. Since the hardware supports sdio-irq everywhere, and since the one reason to not claim the capability is gone, add MMC_CAP_SDIO_IRQ to the default host caps. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sdhci-iproc: fix oops in sdhci_iproc_writewDmitry Torokhov2015-03-231-1/+1
| | | | | | | | The driver co-allocates sdhci_iproc_host with sdhci_pltfm_host and so to access it we need to use sdhci_pltfm_priv() and not pltfm_host->priv. Signed-off-by: Dmitry Torokhov <dtor@chromium.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sdhci: fix card presence logic in sdhci_request functionScott Branden2015-03-231-17/+3
| | | | | | | | | | | | | The sdhci_request function should consider a non-removable device always present. Call the correct logic already available in sdhci_do_get_cd function. This fixes some logic paths where MMC requests are being made to non-removable devices that do not have the card detect pin connected on the hardware as it is non-removable. Signed-off-by: Scott Branden <sbranden@broadcom.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sdhci-spear: Remove exported headerUlf Hansson2015-03-232-60/+9
| | | | | | | | | Move the member for card_int_gpio into the struct spear_sdhci. In this way we eliminate the last user of the struct sdhci_plat_data, which enables us to remove the exported header for sdhci-spear. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sdhci-spear: Simplify by adding build dependency to CONFIG_OFUlf Hansson2015-03-232-16/+5
| | | | | | | This driver is used on SoCs which are using CONFIG_OF. By adding a compile dependency in the Kconfig, it enables us to simplify some code. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sdhci: Remove the sdhci exported header fileUlf Hansson2015-03-233-222/+202
| | | | | | | | | | Since there no users of the struct sdhci_host, but the shdci host drivers themselves, let's move the definition of it to the local sdhci header. The exported sdhci header then becomes empty, so let's remove it. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sdhci-pltfm: remove the unneeded check of disabled deviceKevin Hao2015-03-231-28/+26
| | | | | | | | | | | | | | Since commit cd1e65044d44 ("of/device: Don't register disabled devices"), the disabled device will not be registered at all. So we don't need to do the check again in the platform device driver. And the check in the current code is useless even if we really run into a disabled device. In this case, it just doesn't parse the dtb for the infos such as quirks or clock, but it will continue to try to init the disabled device after that check. So just remove it. Signed-off-by: Kevin Hao <haokexin@gmail.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: tegra: Optimize write_w path for tegra114 and laterRhyland Klein2015-03-231-21/+26
| | | | | | | | | | | | Setup a different set of sdhci_ops for tegra114 and later so that the write_w callback is only used on tegra114. This allows us to remove the NVQUIRK_SHADOW_XFER_MODE_REG and simply the logic in tegra_sdhci_writew. Suggested-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Rhyland Klein <rklein@nvidia.com> Acked-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sh_mmcif: Add exclusion between cmd and interruptKouichi Tomita2015-03-231-1/+10
| | | | | | | | | | A command end interrupt should not be processed between command issue and setting of wait_for flag. It expects already the flag to be set. Therefore the exclusive control was added. Signed-off-by: Kouichi Tomita <kouichi.tomita.yn@renesas.com> Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sh_mmcif: Move dev_err() of mmcif_timeout_work()Kouichi Tomita2015-03-231-3/+3
| | | | | | | | | | | If interruption of command already occurred, mrq pointer in dev_err() would refer to NULL, because the host-state is changed to STATE_IDLE and mrq pointer is changed to NULL by interrupt handler. Therefore dev_err is moved after checking STATE_IDLE. Signed-off-by: Kouichi Tomita <kouichi.tomita.yn@renesas.com> Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: Fix hardware dependencies for sdhci-pxav3Jean Delvare2015-03-231-1/+1
| | | | | | | | | | | | | | | | It was brought to my attention that the sdhci-pxav3 driver is needed on a few more ARM machines than I initially thought. Add the missing architectures to the dependency list. Credits to Peter Robinson for noticing my mistake and reporting. Reported-by: Peter Robinson <pbrobinson@gmail.com> Signed-off-by: Jean Delvare <jdelvare@suse.de> Cc: Chris Ball <chris@printf.net> Cc: Ulf Hansson <ulf.hansson@linaro.org> Cc: Eric Miao <eric.y.miao@gmail.com> Cc: Haojian Zhuang <haojian.zhuang@gmail.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: pwrseq: simplify alloc/free hooksAlexandre Courbot2015-03-234-18/+26
| | | | | | | | | | | | | The alloc() and free() hooks required each pwrseq implementation to set host->pwrseq themselves. This is error-prone and could be done at a higher level if alloc() was changed to return a pointer to a struct mmc_pwrseq instead of an error code. This patch performs this change and moves the burden of maintaining host->pwrseq from the power sequence hooks to the pwrseq code. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sunxi: avoid invalid pointer calculationArnd Bergmann2015-03-231-2/+3
| | | | | | | | | | | | | | | | | | The sunxi mmc driver tries to calculate a dma address by using pointer arithmetic, which causes a warning when dma_addr_t is wider than a pointer: drivers/mmc/host/sunxi-mmc.c: In function 'sunxi_mmc_init_idma_des': drivers/mmc/host/sunxi-mmc.c:296:35: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] struct sunxi_idma_des *pdes_pa = (struct sunxi_idma_des *)host->sg_dma; ^ To avoid this warning and to simplify the logic, this changes the code to avoid the cast and calculate the correct address manually. The behavior should be unchanged. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: David Lanzendörfer <david.lanzendoerfer@o2s.ch> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: kconfig: replace PPC_OF with PPCKevin Hao2015-03-231-2/+2
| | | | | | | | | | | The PPC_OF is a ppc specific option which is used to mean that the firmware device tree access functions are available. Since all the ppc platforms have a device tree, it is aways set to 'y' for ppc. So it makes no sense to keep a such option in the current kernel. Replace it with PPC. Signed-off-by: Kevin Hao <haokexin@gmail.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sdhci-iproc: add IPROC SDHCI driverScott Branden2015-03-233-0/+256
| | | | | | | | | Add IPROC SDHCI driver for IPROC family of Broadcom devices. Acked-by: Ray Jui <rjui@broadcom.com> Signed-off-by: Corneliu Doban <cdoban@broadcom.com> Signed-off-by: Scott Branden <sbranden@broadcom.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sdhci-iproc: add device tree bindingsScott Branden2015-03-231-0/+23
| | | | | | | | | Add device tree binding documentation for IPROC SDHCI driver. Acked-by: Ray Jui <rjui@broadcom.com> Signed-off-by: Corneliu Doban <cdoban@broadcom.com> Signed-off-by: Scott Branden <sbranden@broadcom.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sdhci: do not set AUTO_CMD12 for multi-block CMD53Corneliu Doban2015-03-231-1/+3
| | | | | | | | | For CMD53 in block mode, the host does not need to stop the transfer, as it stops when the block count (present in CMD53) is reached. Signed-off-by: Corneliu Doban <cdoban@broadcom.com> Signed-off-by: Scott Branden <sbranden@broadcom.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sdhci: add quirk for ACMD23 brokenScott Branden2015-03-232-1/+4
| | | | | | | | | | | | Add quirk to handle broken auto-CMD23. Some controllers do not respond after the first auto-CMD23 is issued. This allows CMD23 to still work (mandatory for the faster UHS-I mode) rather than disabling CMD23 entirely via SDHCI_QUIRK2_HOST_NO_CMD23. Signed-off by: Corneliu Doban <cdoban@broadcom.com> Signed-off-by: Scott Branden <sbranden@broadcom.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sdhci-esdhc-imx: silence a false curly braces warningDan Carpenter2015-03-231-1/+1
| | | | | | | | | | | | | Static checkers suggest that probably we intended to put curly braces around the writel() to make it part of the else path. But, I think actually the indenting is off and the code works fine as is. The stray tab was introduced in 0322191e6298 ('mmc: sdhci-esdhc-imx: add sd3.0 SDR clock tuning support') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Dong Aisheng <b29396@freescale.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: tmio: Remove bogus un-initialization in tmio_mmc_host_free()Geert Uytterhoeven2015-03-231-2/+0
| | | | | | | | | | | | | | | | | | | | | | | If CONFIG_DEBUG_SLAB=y: sh_mobile_sdhi ee100000.sd: Got CD GPIO sh_mobile_sdhi ee100000.sd: Got WP GPIO platform ee100000.sd: Driver sh_mobile_sdhi requests probe deferral ... Slab corruption (Not tainted): kmalloc-1024 start=ed8b3c00, len=1024 2d0: 00 00 00 00 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b ....kkkkkkkkkkkk Prev obj: start=ed8b3800, len=1024 000: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk 010: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk Struct tmio_mmc_host is embedded inside struct mmc_host, and thus is freed by the call to mmc_free_host(). Hence it must not be written to afterwards, as that will corrupt freed (and perhaps already reused) memory. Fixes: 94b110aff8679b14 ("mmc: tmio: add tmio_mmc_host_alloc/free()") Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: dw_mmc: exynos: dw_mci_exynos_prepare_hs400_tuning() can be staticWu Fengguang2015-03-232-2/+2
| | | | | Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: omap_hsmmc: add hibernation supportRuss Dill2015-03-231-7/+2
| | | | | | | | | | | | | | Setting a dev_pm_ops suspend/resume pair but not a set of hibernation functions means those pm functions will not be called upon hibernation. Fix this by using SET_SYSTEM_SLEEP_PM_OPS, which appropriately assigns the suspend and hibernation handlers and move omap_hsmmc_x callbacks under CONFIG_PM_SLEEP to avoid build warnings. Signed-off-by: Russ Dill <Russ.Dill@ti.com> [Grygorii.Strashko@linaro.org: rebased on top of K4.0] Signed-off-by: Grygorii Strashko <grygorii.strashko@linaro.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: omap_hsmmc: use distinctive code paths for cover / card detect logicAndreas Fenkart2015-03-231-18/+38
| | | | | | | | | | | | | | | | | | Mobile phones (some) have no card detect pin, but can detect if the cover is removed. The purpose is the same; detect if card is being added/removed, but the details differ. When the cover is removed, it does not mean the card is gone. But it might, since it is accessible now. It's like a warning. All the driver does is to limit write access to the card, see protect_card flag. In contrast, card detect notifies us after the fact, e.g. card is gone, card is inserted. We can't take precautions, but we can rely on those events, -- the card is really gone, or do scan the card. To summarize there is not much code sharing between cover and card detect, it only increases confusion. By splitting, both will be simplified in a followup patch. Signed-off-by: Andreas Fenkart <afenkart@gmail.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: omap_hsmmc: use slot-gpio functions to manage read-only pin directlyAndreas Fenkart2015-03-231-22/+1
| | | | | | | | | | | The indirection via omap_hsmmc_get_ro and omap_hsmmc_get_wp is redundant. Also dropped setting gpio_wp to EINVAL since platform date is read-only Untested: no device with ro pin was available, but change is fairly simple Signed-off-by: Andreas Fenkart <afenkart@gmail.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: omap_hsmmc: remove unused fields from struct omap_hsmmc_hostAndreas Fenkart2015-03-231-4/+0
| | | | | | | | addon to: 09108968b7b72b6083a3bfc8f8259a74ed57255e mmc: omap_hsmmc: remove prepare/complete system suspend support Signed-off-by: Andreas Fenkart <afenkart@gmail.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sunxi: Use devm_reset_control_get_optional() for reset controlChen-Yu Tsai2015-03-231-1/+3
| | | | | | | | | | | | | | | | | The reset control for the sunxi mmc controller is optional. Some newer platforms (sun6i, sun8i, sun9i) have it, while older ones (sun4i, sun5i, sun7i) don't. Use the properly stubbed _optional version so the driver does not fail to compile when RESET_CONTROLLER=n. This patch also adds a check for deferred probing on the reset control. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Cc: <stable@vger.kernel.org> # 3.16+ Acked-by: David Lanzendörfer <david.lanzendoerfer@o2s.ch> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sdhci: set the .remove to sdhci_pltfm_unregister()Kevin Hao2015-03-239-56/+9
| | | | | | | | | In these drivers, the driver specific .remove function just a simple wrapper of function sdhci_pltfm_unregister(). So remove these wrappers and just set .remove to sdhci_pltfm_unregister(). Signed-off-by: Kevin Hao <haokexin@gmail.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sdhci: disable the clock in sdhci_pltfm_unregister()Kevin Hao2015-03-237-39/+6
| | | | | | | | So we can avoid to sprinkle the clk_disable_unprepare() in many drivers. Signed-off-by: Kevin Hao <haokexin@gmail.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sdhci-bcm-kona: kill the "external_clk" member in driver private structKevin Hao2015-03-231-33/+13
| | | | | | | | | | Actually we can use the "clk" in the struct sdhci_pltfm_host. Also change the "external clock" to "core clock" and kill two redundant private functions in this driver as suggested by Ray Jui. Signed-off-by: Kevin Hao <haokexin@gmail.com> Reviewed-by: Ray Jui <rjui@broadcom.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sdhci-sirf: kill the "clk" member in driver private structKevin Hao2015-03-231-19/+7
| | | | | | | | | Actually we can use the "clk" in the struct sdhci_pltfm_host. With this change we can also kill the private function for get max clock in this driver. Signed-off-by: Kevin Hao <haokexin@gmail.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: tegra: use devm help functions to get the clk and gpioKevin Hao2015-03-231-10/+3
| | | | | | | | Simplify the error and remove path. Signed-off-by: Kevin Hao <haokexin@gmail.com> Acked-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sdhci-dove: kill the driver specific private structKevin Hao2015-03-231-21/+5
| | | | | | | | | There is only one "clk" member in this driver specific private struct. Actually we can use the "clk" member in the struct sdhci_pltfm_host, and then kill this struct completely. Signed-off-by: Kevin Hao <haokexin@gmail.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sdhci-dove: remove the unneeded error checkKevin Hao2015-03-231-4/+2
| | | | | | | | The function clk_disable_unprepare() already take care of either error or null cases. Signed-off-by: Kevin Hao <haokexin@gmail.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sirf: update sdhci_sirf_execute_tuning procedureweijun yang2015-03-231-3/+3
| | | | | | | | | | | | | | | | For the original tuning code, delay value is set to SD Bus Clock Delay Register (SD_CLK_DELAY_SETTING) as (val | (Val << 7) | (val << 16)), which means CLK_DELAY_IN1, CLK_DELAY_IN2 and CLK_DELAY_OUT are the same and with 128 steps. This is doubtful. In CSR design specification documents CS-304575-DR-3H, this issue is clarified, the delay[13:0] in SD_CLK_DELAY_SETTING is simplied to the concatenation of {CLK_DELAY_IN2, CLK_DELAY_IN1}. Besides, for CMD19 tuning, no need to set CLK_DELAY_OUT([22,16] of SD_CLK_DELAY_SETTING). Signed-off-by: weijun yang <york.yang@csr.com> Signed-off-by: Barry Song <baohua.song@csr.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
OpenPOWER on IntegriCloud