- 04 2月, 2015 3 次提交
-
-
由 Marek Szyprowski 提交于
This patch provides a simple mmc-pwrseq-emmc driver, which controls single gpio line. It perform standard eMMC hw reset procedure, as descibed by Jedec 4.4 specification. This procedure is performed just after MMC core enabled power to the given mmc host (to fix possible issues if bootloader has left eMMC card in initialized or unknown state), and before performing complete system reboot (also in case of emergency reboot call). The latter is needed on boards, which doesn't have hardware reset logic connected to emmc card and (limited or broken) ROM bootloaders are unable to read second stage from the emmc card if the card is left in unknown or already initialized state. Signed-off-by: NMarek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Arnd Bergmann 提交于
Jonas Jensen wanted to submit a patch for these, but apparently forgot about it. I stumbled over this symptom first: drivers/built-in.o: In function `moxart_probe': :(.text+0x2af128): undefined reference to `of_dma_request_slave_channel' This is because of_dma_request_slave_channel is an internal helper and not exported to loadable module. I'm changing the driver to use dma_request_slave_channel_reason() instead. Further problems from inspection: * The remove function must not call kfree on the host pointer, because it is allocated together with the mmc_host. * The clock is never released * The dma_cap_mask_t is completely unused and can be removed * deferred probing does not work if the dma driver is loaded after the mmc driver. This patch should fix all of the above. Signed-off-by: NArnd Bergmann <arnd@arndb.de> Signed-off-by: NJonas Jensen <jonas.jensen@gmail.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Ulf Hansson 提交于
Host drivers have different ways to sends their "init stream" to the card. Some need to do it as part of a request, some do it from the ->set_ios() callback in the MMC_POWER_ON state and some don't send an "init stream" at all. To be able to use the reset GPIOs from the simple MMC power sequence provider, the card need to be powered and the "init stream" must not have been sent. To cope with these requirements, invoke mmc_pwrseq_post_power_on() prior we change the state to MMC_POWER_ON in mmc_power_up(). Host drivers shall perform power up operations in the MMC_POWER_UP state. Unfortunate three hosts (au1xmmc, cb710-mmc and toshsd) don't conform to this expectation. Instead those ignore the MMC_POWER_UP state and delays their power up operations to the MMC_POWER_ON state. Those hosts needs to change their behavior to enable proper support for the simple MMC power sequence provider. Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Reviewed-by: NJavier Martinez Canillas <javier.martinez@collabora.co.uk> Tested-by: NJavier Martinez Canillas <javier.martinez@collabora.co.uk>
-
- 30 1月, 2015 5 次提交
-
-
由 Javier Martinez Canillas 提交于
Some WLAN chips attached to a SDIO interface, need a reference clock. Since this is very common, extend the prseq_simple driver to support an optional clock that is enabled prior the card power up procedure. Note: the external clock is optional. Thus an error is not returned if the clock is not found. Signed-off-by: NJavier Martinez Canillas <javier.martinez@collabora.co.uk> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Javier Martinez Canillas 提交于
Some WLAN chips attached to a SDIO interface, need an external clock to be operational. Since this is very common, extend the simple MMC power sequence DT binding to support an optional clock. Signed-off-by: NJavier Martinez Canillas <javier.martinez@collabora.co.uk> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Javier Martinez Canillas 提交于
Many WLAN attached to a SDIO/MMC interface, needs more than one pin for their reset sequence. For example, is very common for chips to have two pins: one for reset and one for power enable. This patch adds support for more reset pins to the pwrseq_simple driver and instead hardcoding a fixed number, it uses the of_gpio_named_count() since the MMC power sequence is only built when CONFIG_OF is enabled. Signed-off-by: NJavier Martinez Canillas <javier.martinez@collabora.co.uk> Signed-off-by: NSrinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Javier Martinez Canillas 提交于
Many SDIO/MMC attached WLAN chips need more than one ping for their reset sequence. Extend the pwrseq_simple binding to support more than one pin. Signed-off-by: NJavier Martinez Canillas <javier.martinez@collabora.co.uk> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Jean Delvare 提交于
I seem to understand that the sdhci-pxav3 and sdhci-pxav2 drivers are only needed on the MMP architecture. So add a hardware dependency on ARCH_MMP, so that other users don't get to build useless drivers. Signed-off-by: NJean 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> Acked-by: NHaojian Zhuang <haojian.zhuang@gmail.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
- 29 1月, 2015 8 次提交
-
-
由 Marcin Wojtas 提交于
According to erratum 'FE-2946959' both SDR50 and DDR50 modes require specific clock adjustments in SDIO3 Configuration register. This commit add the support of this register and for SDR50 or DDR50 mode use it as suggested by the erratum: - Set the SDIO3 Clock Inv field in SDIO3 Configuration register to not inverted. - Set the Sample FeedBack Clock field to 0x1 [gregory.clement@free-electrons.com: port from 3.10] Signed-off-by: NGregory CLEMENT <gregory.clement@free-electrons.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Gregory CLEMENT 提交于
The SDHCI unit used on the Armada 38x needs using an extra register to do specific clock adjustments in order to support the SDR50 and DDR50 modes. This patch extends the binding to allow using this register. Signed-off-by: NGregory CLEMENT <gregory.clement@free-electrons.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Marcin Wojtas 提交于
According to erratum 'ERR-7878951' Armada 38x SDHCI controller has different capabilities than the ones shown in its registers: - it doesn't support the voltage switching: it can work either with 3.3V or 1.8V supply - it doesn't support the SDR104 mode - SDR50 mode doesn't need tuning The SDHCI_QUIRK_MISSING_CAPS quirk is used for updating the capabilities accordingly. [gregory.clement@free-electrons.com: port from 3.10] Fixes: 5491ce3f ("mmc: sdhci-pxav3: add support for the Armada 38x SDHCI controller") Cc: <stable@vger.kernel.org> # v3.15+ Signed-off-by: NGregory CLEMENT <gregory.clement@free-electrons.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Gregory CLEMENT 提交于
According to erratum 'FE-2946959' both SDR50 and DDR50 modes require specific clock adjustments in SDIO3 Configuration register. However, this register was not part of the device tree binding. Even if the binding can (and will) be extended we still need handling the case where this register was not available. In this case we use the SDHCI_QUIRK_MISSING_CAPS quirk remove them from the capabilities. This commit is based on the work done by Marcin Wojtas<mw@semihalf.com> Fixes: 5491ce3f ("mmc: sdhci-pxav3: add support for the Armada 38x SDHCI controller") Cc: <stable@vger.kernel.org> # v3.15+ Signed-off-by: NGregory CLEMENT <gregory.clement@free-electrons.com> Signed-off-by: NMarcin Wojtas <mw@semihalf.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Jisheng Zhang 提交于
I observed the Host Control2 register isn't correctly restored after runtime resuming on BG2Q. For example, the register reads as 0x800c before runtime suspend, but it's set as 0x8004 after runtime resuming. This could results in a non working host. The reason is the Host Control2 is incorrectly reset when switching voltage. We fix this by following the same sequence during initialization. Signed-off-by: NJisheng Zhang <jszhang@marvell.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Pavan Kunapuli 提交于
If there is a gap between xfer mode and command register writes, tegra SDMMC controller can sometimes issue a spurious command before the CMD register is written. To avoid this, these two registers need to be written together in a single write operation. This is implemented as an NVQUIRK as it applies to T114, T124 and T132. Signed-off-by: NPavan Kunapuli <pkunapuli@nvidia.com> Signed-off-by: NRhyland Klein <rklein@nvidia.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Alexey Skidanov 提交于
This patch is coming to fix compatibility issue of BKOPS_EN field of EXT_CSD. In eMMC-5.1, BKOPS_EN was changed, and now it has two operational bits: Bit 0 - MANUAL_EN Bit 1 - AUTO_EN In previous eMMC revisions, only Bit 0 was supported. Signed-off-by: NAlexey Skidanov <alexey.skidanov@sandisk.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Jisheng Zhang 提交于
Current code checks "clk_delay_cycles > 0" to know whether the optional "mrvl,clk_delay_cycles" is set or not. But of_property_read_u32() doesn't touch clk_delay_cycles if the property is not set. And type of clk_delay_cycles is u32, so we may always set pdata->clk_delay_cycles as a random value. This patch fix this problem by check the return value of of_property_read_u32() to know whether the optional clk-delay-cycles is set or not. Signed-off-by: NJisheng Zhang <jszhang@marvell.com> Cc: <stable@vger.kernel.org> # v3.6+ Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
- 28 1月, 2015 11 次提交
-
-
由 Dmitry Torokhov 提交于
dw_mci_pltfm_remove() is not (nor should it be) marked as __exit, so we should not be using __exit_p() wrapper with it. Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com> Reviewed-by: NDoug Anderson <dianders@chromium.org> Tested-by: NDoug Anderson <dianders@chromium.org> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Dmitry Torokhov 提交于
dw_mci_pltfm_remove() is not (nor should it be) marked as __exit, so we should not be using __exit_p() wrapper with it. Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com> Reviewed-by: NDoug Anderson <dianders@chromium.org> Tested-by: NDoug Anderson <dianders@chromium.org> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Jean Delvare 提交于
Let MMC_SDHCI_BIG_ENDIAN_32BIT_BYTE_SWAPPER depend on MMC_SDHCI. Not only this is more correct, but this also avoids breaking the alignment of all other MMC_SDHCI_* options in menuconfig. Signed-off-by: NJean Delvare <jdelvare@suse.de> Cc: Chris Ball <chris@printf.net> Cc: Ulf Hansson <ulf.hansson@linaro.org> Cc: Albert Herranz <albert_herranz@yahoo.es> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Jean Delvare 提交于
Config option MMC_RICOH_MMC's help text reads: If unsure, say Y. However the option defaults to N. Set the default to Y to match the recommendation in the help text. Signed-off-by: NJean Delvare <jdelvare@suse.de> Cc: Chris Ball <chris@printf.net> Cc: Ulf Hansson <ulf.hansson@linaro.org> Cc: Philipl Langdale <philipl@overt.org> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Pramod Gurav 提交于
DMA configuration has been removed from function mmci_dma_setup but the local mask variable was not removed. This remains unused hence remove it from the function and operations on it Signed-off-by: NPramod Gurav <pramod.gurav@smartplayin.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Jisheng Zhang 提交于
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: NJisheng Zhang <jszhang@marvell.com> Cc: <stable@vger.kernel.org> # v3.9+ Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Tobias Klauser 提交于
Directly return the result of mmc_blk_alloc_req() instead of assigning and returning the variable md. Signed-off-by: NTobias Klauser <tklauser@distanz.ch> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Ulf Hansson 提交于
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: NUlf Hansson <ulf.hansson@linaro.org> Tested-by: NJavier Martinez Canillas <javier.martinez@collabora.co.uk> Reviewed-by: NJavier Martinez Canillas <javier.martinez@collabora.co.uk>
-
由 Ulf Hansson 提交于
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: NUlf Hansson <ulf.hansson@linaro.org> Tested-by: NJavier Martinez Canillas <javier.martinez@collabora.co.uk> Reviewed-by: NJavier Martinez Canillas <javier.martinez@collabora.co.uk>
-
由 Ulf Hansson 提交于
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: NUlf Hansson <ulf.hansson@linaro.org> Tested-by: NJavier Martinez Canillas <javier.martinez@collabora.co.uk> Reviewed-by: NJavier Martinez Canillas <javier.martinez@collabora.co.uk>
-
由 Ulf Hansson 提交于
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: NUlf Hansson <ulf.hansson@linaro.org> Tested-by: NJavier Martinez Canillas <javier.martinez@collabora.co.uk> Reviewed-by: NJavier Martinez Canillas <javier.martinez@collabora.co.uk>
-
- 21 1月, 2015 6 次提交
-
-
由 Jisheng Zhang 提交于
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: NJisheng Zhang <jszhang@marvell.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Micky Ching 提交于
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: NMicky Ching <micky_ching@realsil.com.cn> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Micky Ching 提交于
Return error-code directly if no card exist, this can make card remove faster. Signed-off-by: NMicky Ching <micky_ching@realsil.com.cn> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Wu Fengguang 提交于
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: NFengguang Wu <fengguang.wu@intel.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Nicholas Mc Guire 提交于
Signed-off-by: NNicholas Mc Guire <der.herr@hofr.at> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Asaf Vertz 提交于
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: NAsaf Vertz <asaf.vertz@tandemg.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
- 20 1月, 2015 7 次提交
-
-
由 Ulf Hansson 提交于
-
由 Kuninori Morimoto 提交于
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: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: NLee Jones <lee.jones@linaro.org> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Kuninori Morimoto 提交于
Now, sh_mobile_sdhi can use 32bit DMA access in R-Cer Gen2. Let's use it. Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Kuninori Morimoto 提交于
tmio_mmc_dma has .enable_dma callback now. let's use it. Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Kuninori Morimoto 提交于
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: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Kuninori Morimoto 提交于
Latest SDHI on Renesas has expand register mapping. update mmc_data->bus_shift for it. Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Kuninori Morimoto 提交于
No one is using .init/.cleanup callback function. Let's remove these. sdhi_ops and .cd_wakeup are also removed Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-