aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2018-05-30mmc: mxmmc: Use ifdef rather than __maybe_unusedUlf Hansson1-2/+4
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: Ulf Hansson <[email protected]>
2018-05-29mmc: mxmmc: include linux/highmem.hArnd Bergmann1-0/+1
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: b189e7589f6d ("mmc: mxcmmc: handle highmem pages") Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2018-05-29mmc: sunxi: mark PM functions as __maybe_unusedArnd Bergmann1-2/+2
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: 9a8e1e8cc2c0 ("mmc: sunxi: Add runtime_pm support") Signed-off-by: Arnd Bergmann <[email protected]> Acked-by: Maxime Ripard <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2018-05-29mmc: Throttle calls to MMC_SEND_STATUS during mmc_do_erase()Martin Hicks1-2/+9
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: Martin Hicks <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2018-05-29mmc: au1xmmc: handle highmem pagesChristoph Hellwig1-4/+8
Use kmap_atomic to map the scatterlist entry before using it. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2018-05-29mmc: Allow non-sleeping GPIO cdEvan Green1-4/+11
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: Evan Green <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2018-05-29mmc: sdhci-*: Don't emit error msg if sdhci_add_host() failsJisheng Zhang7-21/+7
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: Jisheng Zhang <[email protected]> Acked-by: Adrian Hunter <[email protected]> Acked-by: Viresh Kumar <[email protected]> Acked-by: Patrice Chotard <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2018-05-29mmc: sd: Define name for default speed dtryinbo.zhu1-0/+1
Add a new define for the sd default speed 25MHz case Signed-off-by: Yinbo Zhu <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2018-05-29mmc: core: Move calls to ->prepare_hs400_tuning() closer to mmc codeUlf Hansson2-3/+4
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: Ulf Hansson <[email protected]> Reviewed-by: Simon Horman <[email protected]>
2018-05-28mmc: sdhci-xenon: use match_string() helperXie Yisheng1-8/+3
match_string() returns the index of an array for a matching string, which can be used intead of open coded variant. Cc: Adrian Hunter <[email protected]> Cc: Hu Ziji <[email protected]> Cc: Ulf Hansson <[email protected]> Cc: [email protected] Signed-off-by: Yisheng Xie <[email protected]> Acked-by: Adrian Hunter <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2018-05-21Merge branch 'fixes' into nextUlf Hansson2-8/+27
2018-05-21mmc: wbsd: handle highmem pagesChristoph Hellwig1-38/+30
Use sg_copy_{from,to}_buffer to bounce buffer and kmap_atomic to map the scatterlist entry before using it. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2018-05-21mmc: ushc: handle highmem pagesChristoph Hellwig1-1/+3
Pass the scatterlist on to the USB subsystem instead of expecting a kernel virtual address. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2018-05-21mmc: mxcmmc: handle highmem pagesChristoph Hellwig1-4/+11
Use kmap_atomic to map the scatterlist entry before using it. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2018-05-21mmc: atmel-mci: use sg_copy_{from,to}_bufferChristoph Hellwig1-12/+9
This handles highmem pages, and also cleans up the code. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2018-05-21mmc: android-goldfish: use sg_copy_{from,to}_bufferChristoph Hellwig1-4/+4
This handles highmem pages, and also cleans up the code. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2018-05-21mmc: block: Don't switch to the same partition type in mmc_blk_remove()Shawn Lin1-3/+5
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: Adrian Hunter <[email protected]> Signed-off-by: Shawn Lin <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2018-05-21mmc: sdhci-iproc: add SDHCI_QUIRK2_HOST_OFF_CARD_ON for cygnusCorneliu Doban1-1/+1
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: Corneliu Doban <[email protected]> Signed-off-by: Scott Branden <[email protected]> Reviewed-by: Ray Jui <[email protected]> Reviewed-by: Srinath Mannam <[email protected]> Fixes: c833e92bbb60 ("mmc: sdhci-iproc: support standard byte register accesses") Cc: [email protected] # v4.10+ Signed-off-by: Ulf Hansson <[email protected]>
2018-05-21mmc: sdhci-iproc: fix 32bit writes for TRANSFER_MODE registerCorneliu Doban1-5/+25
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: b580c52d58d9 ("mmc: sdhci-iproc: add IPROC SDHCI driver") Signed-off-by: Corneliu Doban <[email protected]> Signed-off-by: Scott Branden <[email protected]> Cc: [email protected] # v4.1+ Signed-off-by: Ulf Hansson <[email protected]>
2018-05-21mmc: sdhci-iproc: remove hard coded mmc cap 1.8vSrinath Mannam1-1/+0
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: b17b4ab8ce38 ("mmc: sdhci-iproc: define MMC caps in platform data") Signed-off-by: Srinath Mannam <[email protected]> Signed-off-by: Scott Branden <[email protected]> Reviewed-by: Ray Jui <[email protected]> Cc: [email protected] # v4.8+ Signed-off-by: Ulf Hansson <[email protected]>
2018-05-21mmc: block: propagate correct returned value in mmc_rpmb_ioctlMathieu Malaterre1-1/+1
In commit 97548575bef3 ("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: Mathieu Malaterre <[email protected]> Reviewed-by: Shawn Lin <[email protected]> Fixes: 97548575bef3 ("mmc: block: Convert RPMB to a character device") Cc: [email protected] # v4.15+ Signed-off-by: Ulf Hansson <[email protected]>
2018-05-21mmc: meson-gx: add device resetJerome Brunet1-0/+9
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: Kevin Hilman <[email protected]> Signed-off-by: Jerome Brunet <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2018-05-21dt-bindings: mmc: meson-gx: add resetJerome Brunet1-0/+2
Add the reset to the documentation of the meson-gx mmc controller bindings. Reviewed-by: Kevin Hilman <[email protected]> Signed-off-by: Jerome Brunet <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2018-05-21dt-bindings: mmc: Add binding for BlueField SoCLiming Sun1-0/+29
This commit adds "mellanox,bluefield-dw-mshc" for dwmmc driver extension on Mellanox BlueField SoC platform. Signed-off-by: Liming Sun <[email protected]> Reviewed-by: David Woods <[email protected]> Reviewed-by: Rob Herring <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2018-05-21mmc: dw_mmc-bluefield: Add driver extensionLiming Sun3-0/+91
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: Liming Sun <[email protected]> Reviewed-by: David Woods <[email protected]> Reviewed-by: Shawn Lin <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2018-05-21mmc: core: add tunable delay waiting for power to be stableShawn Lin3-2/+7
The hard-coded 10ms delay in mmc_power_up came from commit 79bccc5aefb4 ("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: Shawn Lin <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2018-05-21Documentation: mmc: addtional description for post-power-on-delay-msShawn Lin1-0/+4
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: Shawn Lin <[email protected]> Reviewed-by: Rob Herring <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2018-05-21mmc: renesas_sdhi: Add r8a77965 supportMasaharu Hayakawa2-0/+2
This patch adds r8a77965 support in SDHI. Signed-off-by: Masaharu Hayakawa <[email protected]> Signed-off-by: Yoshihiro Kaneko <[email protected]> Tested-by: Simon Horman <[email protected]> Tested-by: Wolfram Sang <[email protected]> Reviewed-by: Wolfram Sang <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2018-05-08mmc: tegra: remove redundant return statementAapo Vienamo1-1/+1
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: Aapo Vienamo <[email protected]> Acked-by: Thierry Reding <[email protected]> Acked-by: Adrian Hunter <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2018-05-08mmc: core: Drop unused define for timeoutUlf Hansson1-3/+0
MMC_CORE_TIMEOUT_MS isn't being used no more, let's drop it. Signed-off-by: Ulf Hansson <[email protected]>
2018-05-08mmc: rtsx_usb: Enable MMC_CAP_ERASE to allow erase/discard/trim requestsUlf Hansson1-1/+1
Signed-off-by: Ulf Hansson <[email protected]> Tested-by: Michał Pecio <[email protected]>
2018-05-08mmc: rtsx_usb: Use the provided busy timeout from the mmc coreUlf Hansson1-1/+1
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: Ulf Hansson <[email protected]> Tested-by: Michał Pecio <[email protected]>
2018-05-08mmc: rtsx_usb: Use MMC_CAP2_NO_SDIOUlf Hansson1-13/+2
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: Ulf Hansson <[email protected]> Tested-by: Michał Pecio <[email protected]>
2018-05-08mmc: core: Implement ->sw_reset bus ops for SDIOUlf Hansson1-0/+13
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: Ulf Hansson <[email protected]> Tested-by: Quentin Schulz <[email protected]> Reviewed-by: Shawn Lin <[email protected]>
2018-05-08mmc: core: Share internal function to set initial signal voltageUlf Hansson2-7/+13
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: Ulf Hansson <[email protected]> Tested-by: Quentin Schulz <[email protected]> Reviewed-by: Shawn Lin <[email protected]>
2018-05-08mmc: core: Export a function mmc_sw_reset() to allow soft reset of cardsUlf Hansson3-0/+26
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: Ulf Hansson <[email protected]> Tested-by: Quentin Schulz <[email protected]> Reviewed-by: Shawn Lin <[email protected]>
2018-05-08mmc: core: Rename ->reset() bus ops to ->hw_reset()Ulf Hansson5-10/+10
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: Ulf Hansson <[email protected]> Tested-by: Quentin Schulz <[email protected]> Reviewed-by: Shawn Lin <[email protected]>
2018-05-08mmc: core: Re-factor some code for SDIO re-initializationUlf Hansson1-20/+19
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: Ulf Hansson <[email protected]> Tested-by: Quentin Schulz <[email protected]> Reviewed-by: Shawn Lin <[email protected]>
2018-05-03Merge branch 'sdhci_omap' into nextUlf Hansson5-40/+226
Merge immutable branch for sdhci-omap to add UHS/HS200 mode support. Signed-off-by: Ulf Hansson <[email protected]>
2018-05-03mmc: core: Add tunable delay before detecting card after card is insertedShawn Lin2-4/+12
Allow to use tunable delay before detecting card after card is inserted, which either comes from firmware node, or comes from debounce value passed on to mmc_gpiod_request_cd(). If the platform doesn't support debounce, then we fall back to use the debounce period as the delay, otherwise, it behaves the same as before that a HW debounce(if set) plus a 200ms hardcode delay before detecting the card. Signed-off-by: Shawn Lin <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2018-05-03mmc: dt-bindings: Add optional cd-debounce-delay-msShawn Lin1-0/+2
cd-gpios uses a fixed delay, 200ms, before detecting card after the card is inserted. 200ms doesn't work for some platforms, so some host drivers added their own properties for parsing that from DT, for instance, dw_mmc and pxamci. That being said, it should also be tunable when using cd-gpios. Signed-off-by: Shawn Lin <[email protected]> Reviewed-by: Rob Herring <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2018-05-03mmc: sdhci-omap: Get IODelay values for 3.3v DDR modeKishon Vijay Abraham I1-1/+8
commit 8d20b2eae6c47b095523 ("mmc: sdhci_omap: Add support to set IODELAY values") stored IODelay values for all MM/SD modes in pinctrl_state structure member of sdhci_omap_host. However for DDR mode it gets IODelay values only for 1.8v DDR mode. Since some of the platforms which uses sdhci-omap has IO lines connected to 3.3v, get IODelay values for 3.3v DDR mode. Signed-off-by: Kishon Vijay Abraham I <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2018-05-03dt-bindings: sdhci-omap: Add pinctrl bindingsKishon Vijay Abraham I1-0/+5
Add pinctrl binding rquired to get the mux mode and IODelay values from devicetree. Signed-off-by: Kishon Vijay Abraham I <[email protected]> Reviewed-by: Rob Herring <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2018-05-03mmc: sdhci-omap: Add sdhci_omap specific ops for enable_sdio_irqKishon Vijay Abraham I1-0/+19
Add sdhci_omap_enable_sdio_irq to set CTPL and CLKEXTFREE bits in MMCHS_CON register required to detect asynchronous card interrupt on DAT[1]. Signed-off-by: Kishon Vijay Abraham I <[email protected]> Acked-by: Adrian Hunter <[email protected]> Acked-by: Tony Lindgren <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2018-05-03mmc: sdhci-omap: Add support for MMC/SD controller in k2g SoCKishon Vijay Abraham I1-0/+5
Add support for the new compatible added specifically to support k2g's MMC/SD controller. Signed-off-by: Kishon Vijay Abraham I <[email protected]> Acked-by: Adrian Hunter <[email protected]> Acked-by: Tony Lindgren <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2018-05-03dt-bindings: sdhci-omap: Add K2G specific bindingKishon Vijay Abraham I1-0/+2
Add binding for the TI's sdhci-omap controller present in K2G. Signed-off-by: Kishon Vijay Abraham I <[email protected]> Reviewed-by: Rob Herring <[email protected]> Acked-by: Tony Lindgren <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2018-05-03mmc: sdhci-omap: Workaround for Errata i834Kishon Vijay Abraham I1-1/+2
Errata i834 in AM572x Sitara Processors Silicon Revision 2.0, 1.1 (SPRZ429K July 2014–Revised March 2017 [1]) mentions the maximum obtainable timeout through MMC host controller is 700ms. And for commands taking longer than 700ms, hardware timeout should be disabled and software timeout should be used. The workaround for Errata i834 can be achieved by adding SDHCI_QUIRK2_DISABLE_HW_TIMEOUT quirk in sdhci-omap. [1] -> http://www.ti.com/lit/er/sprz429k/sprz429k.pdf Signed-off-by: Kishon Vijay Abraham I <[email protected]> Acked-by: Tony Lindgren <[email protected]> Acked-by: Adrian Hunter <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2018-05-03mmc: sdhci: Program a relatively accurate SW timeout valueKishon Vijay Abraham I2-7/+55
sdhci has a 10 second timeout to catch devices that stop responding. In the case of quirk SDHCI_QUIRK2_DISABLE_HW_TIMEOUT, instead of programming 10 second arbitrary value, calculate the total time it would take for the entire transfer to happen and program the timeout value accordingly. Signed-off-by: Kishon Vijay Abraham I <[email protected]> Signed-off-by: Adrian Hunter <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2018-05-03mmc: sdhci: Factor out target_timeout calculationAdrian Hunter1-18/+30
Factor out the target_timeout calculation so it can be re-used. Signed-off-by: Adrian Hunter <[email protected]> Signed-off-by: Kishon Vijay Abraham I <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2018-05-03mmc: sdhci: Add quirk to disable HW timeoutAdrian Hunter2-4/+39
Add quirk to disable HW timeout if the requested timeout is more than the maximum obtainable timeout. Also, if the quirk is set and ->get_max_timeout_count() is not implemented, max_busy_timeout is set to zero. Based-on-patch-by: Kishon Vijay Abraham I <[email protected]> Signed-off-by: Adrian Hunter <[email protected]> Signed-off-by: Kishon Vijay Abraham I <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>