- 30 5月, 2018 2 次提交
-
-
由 Ulf Hansson 提交于
To be consistent with code in other mmc host drivers, convert to check the correct PM config #ifdef in favor of using __maybe_unused. Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Ulf Hansson 提交于
To be consistent with code in other mmc host drivers, convert to check the correct PM config #ifdef in favor of using __maybe_unused. Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
- 29 5月, 2018 8 次提交
-
-
由 Arnd Bergmann 提交于
The highmem conversion caused a build error in some configurations: drivers/mmc/host/mxcmmc.c: In function 'mxcmci_transfer_data': drivers/mmc/host/mxcmmc.c:622:10: error: implicit declaration of function 'kmap_atomic'; did you mean 'in_atomic'? [-Werror=implicit-function-declaration] This includes the correct header file. Fixes: b189e758 ("mmc: mxcmmc: handle highmem pages") Signed-off-by: NArnd Bergmann <arnd@arndb.de> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Arnd Bergmann 提交于
The newly added runtime-pm functions cause a harmless warning when CONFIG_PM is disabled: drivers/mmc/host/sunxi-mmc.c:1452:12: error: 'sunxi_mmc_runtime_suspend' defined but not used [-Werror=unused-function] static int sunxi_mmc_runtime_suspend(struct device *dev) ^~~~~~~~~~~~~~~~~~~~~~~~~ drivers/mmc/host/sunxi-mmc.c:1435:12: error: 'sunxi_mmc_runtime_resume' defined but not used [-Werror=unused-function] static int sunxi_mmc_runtime_resume(struct device *dev) This marks them as __maybe_unused to shut up the warning. Fixes: 9a8e1e8c ("mmc: sunxi: Add runtime_pm support") Signed-off-by: NArnd Bergmann <arnd@arndb.de> Acked-by: NMaxime Ripard <maxime.ripard@bootlin.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Martin Hicks 提交于
This drastically reduces the rate at which the MMC_SEND_STATUS cmd polls for completion of the MMC Erase operation. The patch does this by adding a backoff sleep that starts by sleeping for short intervals (128-256us), and ramps up to sleeping for 32-64ms. Even on very quickly completing erase operations, the loop iterates a few times, so not too much extra latency is added to these commands. For long running discard operarations, like a full-device secure discard, this change drops the interrupt rates on my single-core NXP I.MX6UL from 45000/s to about 20/s, and greatly improves system responsiveness. Signed-off-by: NMartin Hicks <mort@bork.org> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Christoph Hellwig 提交于
Use kmap_atomic to map the scatterlist entry before using it. Signed-off-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Evan Green 提交于
This change uses the appropriate _cansleep or non-sleeping API for reading GPIO card detect state. This allows users with GPIOs that never sleep to avoid a warning when certain quirks are present. The sdhci controller has an SDHCI_QUIRK_NO_CARD_NO_RESET, which indicates that a controller will not reset properly if no card is inserted. With this quirk enabled, mmc_get_cd_gpio is called in several places with a spinlock held and interrupts disabled. gpiod_get_raw_value_cansleep is not happy with this situation, and throws out a warning. For boards that a) use controllers that have this quirk, and b) wire card detect up to a GPIO that doesn't sleep, this is a spurious warning. This change silences that warning, at the cost of pushing this problem down to users that have sleeping GPIOs and controllers with this quirk. Signed-off-by: NEvan Green <evgreen@chromium.org> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Jisheng Zhang 提交于
I noticed below error msg with sdhci-pxav3 on some berlin platforms: [.....] sdhci-pxav3 f7ab0000.sdhci failed to add host It is due to getting related vmmc or vqmmc regulator returns -EPROBE_DEFER. It doesn't matter at all but it's confusing. >From another side, if driver probing fails and the error number isn't -EPROBE_DEFER, the core will tell us something as below: [.....] sdhci-pxav3: probe of f7ab0000.sdhci failed with error -EXX So it's not necessary to emit error msg if sdhci_add_host() fails. And some other sdhci host drivers also have this issue, let's fix them together. Signed-off-by: NJisheng Zhang <Jisheng.Zhang@synaptics.com> Acked-by: NAdrian Hunter <adrian.hunter@intel.com> Acked-by: NViresh Kumar <viresh.kumar@linaro.org> Acked-by: NPatrice Chotard <patrice.chotard@st.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 yinbo.zhu 提交于
Add a new define for the sd default speed 25MHz case Signed-off-by: NYinbo Zhu <yinbo.zhu@nxp.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Ulf Hansson 提交于
Move the calls to ->prepare_hs400_tuning(), from mmc_retune() into mmc_hs400_to_hs200(), as it better belongs there, rather than being generic to all type of cards. Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Reviewed-by: NSimon Horman <horms+renesas@verge.net.au>
-
- 28 5月, 2018 1 次提交
-
-
由 Xie Yisheng 提交于
match_string() returns the index of an array for a matching string, which can be used intead of open coded variant. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Hu Ziji <huziji@marvell.com> Cc: Ulf Hansson <ulf.hansson@linaro.org> Cc: linux-mmc@vger.kernel.org Signed-off-by: NYisheng Xie <xieyisheng1@huawei.com> Acked-by: NAdrian Hunter <adrian.hunter@intel.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
- 21 5月, 2018 18 次提交
-
-
由 Ulf Hansson 提交于
-
由 Christoph Hellwig 提交于
Use sg_copy_{from,to}_buffer to bounce buffer and kmap_atomic to map the scatterlist entry before using it. Signed-off-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Christoph Hellwig 提交于
Pass the scatterlist on to the USB subsystem instead of expecting a kernel virtual address. Signed-off-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Christoph Hellwig 提交于
Use kmap_atomic to map the scatterlist entry before using it. Signed-off-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Christoph Hellwig 提交于
This handles highmem pages, and also cleans up the code. Signed-off-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Christoph Hellwig 提交于
This handles highmem pages, and also cleans up the code. Signed-off-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Shawn Lin 提交于
It's pointless to switch and trace partition type if the current selected device partition is the same with that one. Moreover, cycled claiming host associated with mmc_blk_part_switch() could make mmc_blk_remove() end up waiting for grabbing the context if it's occupied, which lead requests could still hit the low-level drivers, if an asynchronous unbind for host drivers happened, as the card hasn't been set removed in the remove path. So a simple dd in background: dd if=/dev/mmcblk0 of=/dev/null bs=512k count=100000 & and doing unbind then: echo fe320000.dwmmc > /sys/bus/platform/drivers/dwmmc_rockchip/unbind could make the console stuck for quite a while depending on the numbers of requests. Suggested-by: NAdrian Hunter <adrian.hunter@intel.com> Signed-off-by: NShawn Lin <shawn.lin@rock-chips.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Corneliu Doban 提交于
The SDHCI_QUIRK2_HOST_OFF_CARD_ON is needed for the driver to properly reset the host controller (reset all) on initialization after exiting deep sleep. Signed-off-by: NCorneliu Doban <corneliu.doban@broadcom.com> Signed-off-by: NScott Branden <scott.branden@broadcom.com> Reviewed-by: NRay Jui <ray.jui@broadcom.com> Reviewed-by: NSrinath Mannam <srinath.mannam@broadcom.com> Fixes: c833e92b ("mmc: sdhci-iproc: support standard byte register accesses") Cc: stable@vger.kernel.org # v4.10+ Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Corneliu Doban 提交于
When the host controller accepts only 32bit writes, the value of the 16bit TRANSFER_MODE register, that has the same 32bit address as the 16bit COMMAND register, needs to be saved and it will be written in a 32bit write together with the command as this will trigger the host to send the command on the SD interface. When sending the tuning command, TRANSFER_MODE is written and then sdhci_set_transfer_mode reads it back to clear AUTO_CMD12 bit and write it again resulting in wrong value to be written because the initial write value was saved in a shadow and the read-back returned a wrong value, from the register. Fix sdhci_iproc_readw to return the saved value of TRANSFER_MODE when a saved value exist. Same fix for read of BLOCK_SIZE and BLOCK_COUNT registers, that are saved for a different reason, although a scenario that will cause the mentioned problem on this registers is not probable. Fixes: b580c52d ("mmc: sdhci-iproc: add IPROC SDHCI driver") Signed-off-by: NCorneliu Doban <corneliu.doban@broadcom.com> Signed-off-by: NScott Branden <scott.branden@broadcom.com> Cc: stable@vger.kernel.org # v4.1+ Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Srinath Mannam 提交于
Remove hard coded mmc cap 1.8v from platform data as it is board specific. The 1.8v DDR mmc caps can be enabled using DTS property for those boards that support it. Fixes: b17b4ab8 ("mmc: sdhci-iproc: define MMC caps in platform data") Signed-off-by: NSrinath Mannam <srinath.mannam@broadcom.com> Signed-off-by: NScott Branden <scott.branden@broadcom.com> Reviewed-by: NRay Jui <ray.jui@broadcom.com> Cc: stable@vger.kernel.org # v4.8+ Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Mathieu Malaterre 提交于
In commit 97548575 ("mmc: block: Convert RPMB to a character device") a new function `mmc_rpmb_ioctl` was added. The final return is simply returning a value of `0` instead of propagating the correct return code. Discovered during a compilation with W=1, silence the following gcc warning drivers/mmc/core/block.c:2470:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] Signed-off-by: NMathieu Malaterre <malat@debian.org> Reviewed-by: NShawn Lin <shawn.lin@rock-chips.com> Fixes: 97548575 ("mmc: block: Convert RPMB to a character device") Cc: stable@vger.kernel.org # v4.15+ Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Jerome Brunet 提交于
Trigger the reset line of the mmc controller while probing, if available. The reset should be optional for now, at least until all related DT nodes have the reset property. Reviewed-by: NKevin Hilman <khilman@baylibre.com> Signed-off-by: NJerome Brunet <jbrunet@baylibre.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Jerome Brunet 提交于
Add the reset to the documentation of the meson-gx mmc controller bindings. Reviewed-by: NKevin Hilman <khilman@baylibre.com> Signed-off-by: NJerome Brunet <jbrunet@baylibre.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Liming Sun 提交于
This commit adds "mellanox,bluefield-dw-mshc" for dwmmc driver extension on Mellanox BlueField SoC platform. Signed-off-by: NLiming Sun <lsun@mellanox.com> Reviewed-by: NDavid Woods <dwoods@mellanox.com> Reviewed-by: NRob Herring <robh@kernel.org> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Liming Sun 提交于
This commit adds extension to the dw_mmc driver for Mellanox BlueField SoC. It updates the UHS_REG_EXT register to bring up the eMMC card on this SoC. Signed-off-by: NLiming Sun <lsun@mellanox.com> Reviewed-by: NDavid Woods <dwoods@mellanox.com> Reviewed-by: NShawn Lin <shawn.lin@rock-chips.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Shawn Lin 提交于
The hard-coded 10ms delay in mmc_power_up came from commit 79bccc5a ("mmc: increase power up delay"), which said "The TI controller on Toshiba Tecra M5 needs more time to power up or the cards will init incorrectly or not at all." But it's too engineering solution for a special board but force all platforms to wait for that long time, especially painful for mmc_power_up for eMMC when booting. However, it's added since 2009, and we can't tell if other platforms benefit from it. But in practise, the modern hardware are most likely to have a stable power supply with 1ms after setting it for no matter PMIC or discrete power. And more importnatly, most regulators implement the callback of ->set_voltage_time_sel() for regulator core to wait for specific period of time for the power supply to be stable, which means once regulator_set_voltage_* return, the power should reach the the minimum voltage that works for initialization. Of course, if there are some other ways for host to power the card, we should allow them to argue a suitable delay as well. With this patch, we could assign the delay from firmware, or we could assigne it via ->set_ios() callback from host drivers. Signed-off-by: NShawn Lin <shawn.lin@rock-chips.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Shawn Lin 提交于
post-power-on-delay-ms woule be reused to substitute the hard-coded 10ms delay waiting for power supply to be stable, specificed by individual platform/board. Default to 10ms as before, if no available. Signed-off-by: NShawn Lin <shawn.lin@rock-chips.com> Reviewed-by: NRob Herring <robh@kernel.org> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Masaharu Hayakawa 提交于
This patch adds r8a77965 support in SDHI. Signed-off-by: NMasaharu Hayakawa <masaharu.hayakawa.ry@renesas.com> Signed-off-by: NYoshihiro Kaneko <ykaneko0929@gmail.com> Tested-by: NSimon Horman <horms+renesas@verge.net.au> Tested-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
- 08 5月, 2018 10 次提交
-
-
由 Aapo Vienamo 提交于
A redundant return statement is removed from tegra_sdhci_set_uhs_signaling(). The function returns void and the return does not affect the control flow of the function. Signed-off-by: NAapo Vienamo <aapo.vienamo@iki.fi> Acked-by: NThierry Reding <treding@nvidia.com> Acked-by: NAdrian Hunter <adrian.hunter@intel.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Ulf Hansson 提交于
MMC_CORE_TIMEOUT_MS isn't being used no more, let's drop it. Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Ulf Hansson 提交于
Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Tested-by: NMichał Pecio <michal.pecio@gmail.com>
-
由 Ulf Hansson 提交于
Instead of using a fixed 3s timeout for commands with R1B responses, convert to use the per request calculated busy timeout from the mmc core. This is needed to cope with requests that requires longer timeout, for example erase/discard commands. Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Tested-by: NMichał Pecio <michal.pecio@gmail.com>
-
由 Ulf Hansson 提交于
Instead of having to return -EINVAL when requested to send SDIO specific commands, let's set MMC_CAP2_NO_SDIO as it completely prevents them. Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Tested-by: NMichał Pecio <michal.pecio@gmail.com>
-
由 Ulf Hansson 提交于
Let's implement the ->sw_reset() bus ops to allow SDIO func drivers, in particular, to make a SW reset without doing a full power cycle of the SDIO card. Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Tested-by: NQuentin Schulz <quentin.schulz@bootlin.com> Reviewed-by: NShawn Lin <shawn.lin@rock-chips.com>
-
由 Ulf Hansson 提交于
Move the corresponding code for setting the initial signal voltage, from mmc_power_up() into a new function, mmc_set_initial_signal_voltage(). Make the function internally available to the mmc core, as to allow the following changes to make use of it. Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Tested-by: NQuentin Schulz <quentin.schulz@bootlin.com> Reviewed-by: NShawn Lin <shawn.lin@rock-chips.com>
-
由 Ulf Hansson 提交于
It's rather common that a firmware is loaded into an SDIO func device memory, by the corresponding SDIO func driver during ->probe() time. However, to actually start running the new firmware, sometimes a soft reset (no power cycle) and a re-initialization of the card is needed. This is for example the case with the Espressif ESP8089 WiFi chips, when connected to an SDIO interface. To cope with this scenario, let's add a new exported function, mmc_sw_reset(), which may be called when a soft reset and re-initialization of the card are needed. The mmc_sw_reset() is implemented on top of a new bus ops callback, similar to how the mmc_hw_reset() has been implemented. Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Tested-by: NQuentin Schulz <quentin.schulz@bootlin.com> Reviewed-by: NShawn Lin <shawn.lin@rock-chips.com>
-
由 Ulf Hansson 提交于
The bus ops ->reset() executes a full HW reset of the card, as the calling function mmc_hw_reset() also indicates by its name. Let's convert to follow the similar names, for both the bus ops callback and for the corresponding bus ops functions, as to clarify the purpose of code. Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Tested-by: NQuentin Schulz <quentin.schulz@bootlin.com> Reviewed-by: NShawn Lin <shawn.lin@rock-chips.com>
-
由 Ulf Hansson 提交于
The mmc_sdio_init_card() function has a couple of callers. In the re-initialization cases, some additional reset commands are issued before mmc_sdio_init_card() is called. As these additional reset commands are the same, let's move these into a new static function, mmc_sdio_reinit_card() and call mmc_sdio_init_card() from there. In this way we avoid the open coding. Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Tested-by: NQuentin Schulz <quentin.schulz@bootlin.com> Reviewed-by: NShawn Lin <shawn.lin@rock-chips.com>
-
- 03 5月, 2018 1 次提交
-
-
由 Ulf Hansson 提交于
Merge immutable branch for sdhci-omap to add UHS/HS200 mode support. Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-