- Jan 28, 2015
-
-
Jisheng Zhang authored
This patch is to fix a race condition that may cause an unhandled irq, which results in big sdhci interrupt numbers and endless "mmc1: got irq while runtime suspended" msgs before v3.15. Consider following scenario: CPU0 CPU1 sdhci_pxav3_runtime_suspend() spin_lock_irqsave(&host->lock, flags); sdhci_irq() spining on the &host->lock host->runtime_suspended = true; spin_unlock_irqrestore(&host->lock, flags); get the &host->lock runtime_suspended is true now return IRQ_NONE; Fix this race by using the core sdhci.c supplied sdhci_runtime_suspend_host() in runtime suspend hook which will disable card interrupts. We also use the sdhci_runtime_resume_host() in the runtime resume hook accordingly. Signed-off-by:
Jisheng Zhang <jszhang@marvell.com> Cc: <stable@vger.kernel.org> # v3.9+ Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org>
-
Tobias Klauser authored
Directly return the result of mmc_blk_alloc_req() instead of assigning and returning the variable md. Signed-off-by:
Tobias Klauser <tklauser@distanz.ch> Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org>
-
Ulf Hansson authored
The need for reset GPIOs has several times been pointed out from erlier posted patchsets. Especially some WLAN chips which are attached to an SDIO interface may use a GPIO reset. The reset GPIO is asserted at initialization and prior we start the power up procedure. The GPIO will be de-asserted right after the power has been provided to the card, from the ->post_power_on() callback. Note, the reset GPIO is optional. Thus we don't return an error even if we can't find a GPIO for the consumer. Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org> Tested-by:
Javier Martinez Canillas <javier.martinez@collabora.co.uk> Reviewed-by:
Javier Martinez Canillas <javier.martinez@collabora.co.uk>
-
Ulf Hansson authored
To add the core part for the MMC power sequence, let's start by adding initial support for the simple MMC power sequence provider. In this initial step, the MMC power sequence node are fetched and the compatible string for the simple MMC power sequence provider are verified. At this point we don't parse the node for any properties, but instead that will be handled from following patches. Since there are no properties supported yet, let's just implement the ->alloc() and the ->free() callbacks. Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org> Tested-by:
Javier Martinez Canillas <javier.martinez@collabora.co.uk> Reviewed-by:
Javier Martinez Canillas <javier.martinez@collabora.co.uk>
-
Ulf Hansson authored
To support SOCs which specifies specific MMC power sequences, document some MMC DT bindings to be able to describe these hardwares. Let's also document bindings for a simple MMC power sequence provider, which purpose is to support a set of common properties between various SOCs. In this initial step, let's also document a top level description of the MMC power sequence and describe the compatible string used for the simple MMC power sequence provider. The simple MMC power sequence provider will initially support a reset GPIO. From several earlier posted patches, it's clear that such hardware exists. Especially some WLAN chips which are attached to an SDIO interface may use a GPIO reset. Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org> Tested-by:
Javier Martinez Canillas <javier.martinez@collabora.co.uk> Reviewed-by:
Javier Martinez Canillas <javier.martinez@collabora.co.uk>
-
Ulf Hansson authored
System on chip designs may specify a specific MMC power sequence. To successfully detect an (e)MMC/SD/SDIO card, that power sequence must be followed while initializing the card. To be able to handle these SOC specific power sequences, let's add a MMC power sequence interface. It provides the following functions to help the mmc core to deal with these power sequences. mmc_pwrseq_alloc() - Invoked from mmc_of_parse(), to initialize data. mmc_pwrseq_pre_power_on()- Invoked in the beginning of mmc_power_up(). mmc_pwrseq_post_power_on()- Invoked at the end in mmc_power_up(). mmc_pwrseq_power_off()- Invoked from mmc_power_off(). mmc_pwrseq_free() - Invoked from mmc_free_host(), to free data. Each MMC power sequence provider will be responsible to implement a set of callbacks. These callbacks mirrors the functions above. This patch adds the skeleton, following patches will extend the core of the MMC power sequence and add support for a specific simple MMC power sequence. Do note, since the mmc_pwrseq_alloc() is invoked from mmc_of_parse(), host drivers needs to make use of this API to enable the support for MMC power sequences. Moreover the MMC power sequence support depends on CONFIG_OF. Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org> Tested-by:
Javier Martinez Canillas <javier.martinez@collabora.co.uk> Reviewed-by:
Javier Martinez Canillas <javier.martinez@collabora.co.uk>
-
- Jan 21, 2015
-
-
Jisheng Zhang authored
Commit 63589e92 ("clk: Ignore error and NULL pointers passed to clk_{unprepare, disable}()") allows NULL or error pointer to be passed unconditionally. This patch is to simplify probe error and remove code paths. However, we reserve the core clock checks in runtime suspend/resume code because we want a little smaller latency. Signed-off-by:
Jisheng Zhang <jszhang@marvell.com> Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org>
-
Micky Ching authored
Check sg_count before sending long data xfer. Because dma_map_sg() return int, and sg_count may be negative, so using int instead of unsigned. Signed-off-by:
Micky Ching <micky_ching@realsil.com.cn> Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org>
-
Micky Ching authored
Return error-code directly if no card exist, this can make card remove faster. Signed-off-by:
Micky Ching <micky_ching@realsil.com.cn> Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org>
-
Wu Fengguang authored
drivers/mmc/host/sdhci_f_sdh30.c:143:5-11: inconsistent IS_ERR and PTR_ERR, PTR_ERR on line 144 PTR_ERR should access the value just tested by IS_ERR Semantic patch information: There can be false positives in the patch case, where it is the call IS_ERR that is wrong. Generated by: scripts/coccinelle/tests/odd_ptr_err.cocci CC: Vincent Yang <vincent.yang.fujitsu@gmail.com> Signed-off-by:
Fengguang Wu <fengguang.wu@intel.com> Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org>
-
Nicholas Mc Guire authored
Signed-off-by:
Nicholas Mc Guire <der.herr@hofr.at> Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org>
-
Asaf Vertz authored
Fixed the following warning (reported by cppcheck): [drivers/mmc/card/block.c:2149]: (warning) %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. Signed-off-by:
Asaf Vertz <asaf.vertz@tandemg.com> Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org>
-
- Jan 20, 2015
-
-
Ulf Hansson authored
-
Kuninori Morimoto authored
tmio_mmc_host has .enable_dma callback now. We don't need TMIO_MMC_HAVE_CTL_DMA_REG anymore. Let's remove it Signed-off-by:
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by:
Lee Jones <lee.jones@linaro.org> Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org>
-
Kuninori Morimoto authored
Now, sh_mobile_sdhi can use 32bit DMA access in R-Cer Gen2. Let's use it. Signed-off-by:
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org>
-
Kuninori Morimoto authored
tmio_mmc_dma has .enable_dma callback now. let's use it. Signed-off-by:
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org>
-
Kuninori Morimoto authored
getting struct sh_mobile_sdhi from struct mmc_host needs to use complex container_of(). This patch adds new host_to_priv macro to get it easily. Signed-off-by:
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org>
-
Kuninori Morimoto authored
Latest SDHI on Renesas has expand register mapping. update mmc_data->bus_shift for it. Signed-off-by:
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org>
-
Kuninori Morimoto authored
No one is using .init/.cleanup callback function. Let's remove these. sdhi_ops and .cd_wakeup are also removed Signed-off-by:
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org>
-
Kuninori Morimoto authored
Renesas SDHI which is based on TMIO driver has 2 type SoC. 1st one is used as SH-Mobile series, and 2nd is R-Car series. R-Car series SoC has DMA buswidth setting register which enables 32bit access. This patch adds .dma_buswidth and enables it. Signed-off-by:
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org>
-
Kuninori Morimoto authored
Some controllers need DMA special register/setting. This patch adds new .enable_dma callback for it. Signed-off-by:
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org>
-
Kuninori Morimoto authored
Current .dma_rx_offset is implemented under tmio_mmc_dma. It goes to tmio_mmc_data by this patch. Signed-off-by:
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by:
Lee Jones <lee.jones@linaro.org> Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org>
-
Kuninori Morimoto authored
Current .alignment_shift is implemented under tmio_mmc_dma. It goes to tmio_mmc_data by this patch. Signed-off-by:
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by:
Lee Jones <lee.jones@linaro.org> Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org>
-
Kuninori Morimoto authored
Current .bus_shift is implemented under tmio_mmc_data. It goes to tmio_mmc_host by this patch. Signed-off-by:
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by:
Lee Jones <lee.jones@linaro.org> Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org>
-
Kuninori Morimoto authored
Current .multi_io_quirk is implemented under tmio_mmc_data. It goes to tmio_mmc_host by this patch. Signed-off-by:
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by:
Lee Jones <lee.jones@linaro.org> Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org>
-
Kuninori Morimoto authored
Current .clk_disable is implemented under tmio_mmc_data. It goes to tmio_mmc_host by this patch. Signed-off-by:
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by:
Lee Jones <lee.jones@linaro.org> Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org>
-
Kuninori Morimoto authored
Current .clk_enable is implemented under tmio_mmc_data. It goes to tmio_mmc_host by this patch. Signed-off-by:
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by:
Lee Jones <lee.jones@linaro.org> Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org>
-
Kuninori Morimoto authored
Current .write16_hook is implemented under tmio_mmc_data. It goes to tmio_mmc_host by this patch. Signed-off-by:
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by:
Lee Jones <lee.jones@linaro.org> Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org>
-
Kuninori Morimoto authored
Current .dma is implemented under tmio_mmc_data. It goes to tmio_mmc_host by this patch. Signed-off-by:
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by:
Lee Jones <lee.jones@linaro.org> Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org>
-
Kuninori Morimoto authored
Current tmio_mmc driver is using tmio_mmc_data for driver/platform specific data/callback, and it is needed for tmio_mmc_host_probe() function. Because of this style, include/linux/mfd/tmio.h header has tmio driver/framework specific data which is not needed from platform. This patch adds new tmio_mmc_host_alloc/free() as cleanup preparation. tmio driver specific data/callback will be implemented in tmio_mmc_host, and platform specific data/callback will be implemented in tmio_mmc_data in this cleanup. Signed-off-by:
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by:
Lee Jones <lee.jones@linaro.org> Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org>
-
Vincent Yang authored
This patch adds new host controller driver for Fujitsu SDHCI controller f_sdh30. Signed-off-by:
Vincent Yang <Vincent.Yang@tw.fujitsu.com> Signed-off-by:
Andy Green <andy.green@linaro.org> Signed-off-by:
Tetsuya Takinishi <t.takinishi@jp.fujitsu.com> Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org>
-
Vincent Yang authored
This patch defines a quirk to disable the block count for single block transactions. It is a preparation and will be used by Fujitsu SDHCI controller f_sdh30 driver. Signed-off-by:
Vincent Yang <Vincent.Yang@tw.fujitsu.com> Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org>
-
Vincent Yang authored
This patch defines a quirk for tuning work around for some sdhci host controller. It sets both SDHCI_CTRL_EXEC_TUNING and SDHCI_CTRL_TUNED_CLK for tuning. It is a preparation and will be used by Fujitsu SDHCI controller f_sdh30 driver. Signed-off-by:
Vincent Yang <Vincent.Yang@tw.fujitsu.com> Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org>
-
Vincent Yang authored
This patch adds a callback function to do controller-specific actions when switching voltages. It is a preparation and will be used by Fujitsu SDHCI controller f_sdh30 driver. Signed-off-by:
Vincent Yang <Vincent.Yang@tw.fujitsu.com> Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org>
-
- Jan 19, 2015
-
-
Doug Anderson authored
If we power up vqmmc in MMC_POWER_ON then we end up turning it on before mmc_power_up() sets the signal voltage. That's not so great since we might be powering it up at the wrong voltage. Note that this is how Yuvaraj originally coded things up in <https://patchwork.kernel.org/patch/4401231/> but he changed it on my suggestion. Apparently I was wrong. Reported-by:
Alexandru M Stan <amstan@chromium.org> Signed-off-by:
Doug Anderson <dianders@chromium.org> Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org>
-
Mohammad Jamal authored
This patch solves the coding style issue by adding a space before ( Signed-off-by:
Mohammad Jamal <md.jamalmohiuddin@gmail.com> Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org>
-
Jisheng Zhang authored
This patch calls pm_runtime_put_noidle() to restore the device's usage counter in the ->remove() implementation. Signed-off-by:
Jisheng Zhang <jszhang@marvell.com> Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org>
-
Jisheng Zhang authored
Commit 0dcaa249 ("sdhci-pxav3: Fix runtime PM initialization") tries to fix one hang issue caused by calling sdhci_add_host() on a suspended device. The fix enables the clock twice, once by clk_prepare_enable() and another by pm_runtime_get_sync(), meaning that the clock will never be gated at runtime PM suspend. I observed the power consumption regression on Marvell BG2Q SoCs. In fact, the fix is not correct. There still be a very small window during which a runtime suspend might somehow occur after pm_runtime_enable() but before pm_runtime_get_sync(). This patch fixes all of the two problems by just incrementing the usage counter before pm_runtime_enable(). It also adjust the order of disabling runtime pm and storing the usage count in the error path to handle clock gating properly. Signed-off-by:
Jisheng Zhang <jszhang@marvell.com> Cc: <stable@vger.kernel.org> # v3.11+ Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org>
-
Adrian Hunter authored
There is no point making the initialization of buf_ready_int conditional on host version. Simplify by just doing it always. Note that the other conditional initializations will be removed when the new way of doing re-tuning is taken into use. Signed-off-by:
Adrian Hunter <adrian.hunter@intel.com> Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org>
-
Adrian Hunter authored
Both callers of mmc_start_request() call mmc_card_removed() so move that call into mmc_start_request(). This patch is preparation for adding re-tuning support. Signed-off-by:
Adrian Hunter <adrian.hunter@intel.com> Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org>
-