aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-07-13mmc: Merge branch fixes into nextUlf Hansson1-6/+8
Merge the mmc fixes for v5.19rc[n] into the next branch, to allow them to get tested together with the new mmc changes that are targeted for v5.20. Signed-off-by: Ulf Hansson <[email protected]>
2022-07-13mmc: mxcmmc: Use mmc_card_sdio macroSeunghui Lee1-1/+1
Use mmc_card_sdio macro to simplify code. Signed-off-by: Seunghui Lee <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-07-13mmc: core: Use mmc_card_* macro and add a new for the sd_combo typeSeunghui Lee5-13/+14
Add mmc_card_sd_combo() macro for sd combo type card and use the mmc_card_* macro to simplify code instead of comparing card->type. Signed-off-by: Seunghui Lee <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-07-13dt-bindings: mmc: sdhci-msm: constrain reg-names per variantsKrzysztof Kozlowski1-23/+38
The entries in arrays must have fixed order, so the bindings and Linux driver expecting various combinations of 'reg' addresses was never actually conforming to guidelines. The 'core' reg entry is valid only for SDCC v4 and lower, so disallow it in SDCC v5. SDCC v4 supports CQE and ICE, so allow them, even though the qcom,sdhci-msm-v4 compatible is used also for earlier SoCs with SDCC v2 or v3, so it is not entirely accurate. Signed-off-by: Krzysztof Kozlowski <[email protected]> Reviewed-by: Douglas Anderson <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-07-13dt-bindings: mmc: sdhci-msm: fix reg-names entriesKrzysztof Kozlowski1-12/+12
Bindings before conversion to DT schema expected reg-names without "_mem" suffix. This was used by older DTS files and by the MSM SDHCI driver. Reported-by: Douglas Anderson <[email protected]> Fixes: edfbf8c307ff ("dt-bindings: mmc: sdhci-msm: Fix issues in yaml bindings") Signed-off-by: Krzysztof Kozlowski <[email protected]> Reviewed-by: Douglas Anderson <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-07-13mmc: sdhci-omap: Fix a lockdep warning for PM runtime initTony Lindgren1-6/+8
We need runtime PM enabled early in probe before sdhci_setup_host() for sdhci_omap_set_capabilities(). But on the first runtime resume we must not call sdhci_runtime_resume_host() as sdhci_setup_host() has not been called yet. Let's check for an initialized controller like we already do for context restore to fix a lockdep warning. Fixes: f433e8aac6b9 ("mmc: sdhci-omap: Implement PM runtime functions") Reported-by: Yegor Yefremov <[email protected]> Suggested-by: Arnd Bergmann <[email protected]> Signed-off-by: Tony Lindgren <[email protected]> Acked-by: Adrian Hunter <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-07-12dt-bindings: mmc: Add compatible for MediaTek MT8188Johnson Wang1-7/+5
This commit adds dt-binding documentation of mmc for MediaTek MT8188 SoC platform. Signed-off-by: Johnson Wang <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Acked-by: Rob Herring <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-07-12dt-bindings: mmc: sdhci-msm: document resetsRobert Marko1-0/+3
Commit "mmc: sdhci-msm: Reset GCC_SDCC_BCR register for SDHC" added support for utilizing a hardware reset and parsing it from DT, however the bindings were not updated along with it. So, document the usage of "resets" property with the limit of only one item. Signed-off-by: Robert Marko <[email protected]> Acked-by: Krzysztof Kozlowski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-07-12mmc: sdhci-of-at91: fix set_uhs_signaling rewriting of MC1REugen Hristev1-2/+7
In set_uhs_signaling, the DDR bit is being set by fully writing the MC1R register. This can lead to accidental erase of certain bits in this register. Avoid this by doing a read-modify-write operation. Fixes: d0918764c17b ("mmc: sdhci-of-at91: fix MMC_DDR_52 timing selection") Signed-off-by: Eugen Hristev <[email protected]> Tested-by: Karl Olsen <[email protected]> Acked-by: Adrian Hunter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-07-12mmc: core: Replace with already defined values for readabilityChanWoo Lee1-1/+1
SD_ROCR_S18A is already defined and is used to check the rocr value, so let's replace with already defined values for readability. Signed-off-by: ChanWoo Lee <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-07-12dt-bindings: mmc: samsung,s3c6410-sdhci: convert to dtschemaKrzysztof Kozlowski2-32/+81
Convert the Samsung SoC SDHCI Controller bindings to DT schema. The original bindings were quite old and incomplete, so add during conversion typical (already used) properties like reg, clocks, interrupts. The bindings were not precising the clocks, although the upstream DTS and Linux driver were expecting bus clocks in certain patterns in any order. Document the status quo even though it is not a proper approach for bindings. Signed-off-by: Krzysztof Kozlowski <[email protected]> Reviewed-by: Rob Herring <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-07-12mmc: tmio: avoid glitches when resettingWolfram Sang4-23/+42
If we reset because of an error, we need to preserve values for the clock frequency. Otherwise, glitches may be seen on the bus. To achieve that, we introduce a 'preserve' parameter to the reset function and the IP core specific reset callbacks to handle everything accordingly. Reported-by: Yoshihiro Shimoda <[email protected]> Signed-off-by: Wolfram Sang <[email protected]> Tested-by: Yoshihiro Shimoda <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-07-12memstick/ms_block: Use the bitmap API when applicableChristophe JAILLET1-2/+2
Use bitmap_equal() instead of hand writing it. It improves semantic and avoids some explicit computation to convert a number of bits to a number of bytes. Signed-off-by: Christophe JAILLET <[email protected]> Link: https://lore.kernel.org/r/b216df8798f765ab14bce65739c220643320f376.1656155715.git.christophe.jaillet@wanadoo.fr Signed-off-by: Ulf Hansson <[email protected]>
2022-07-12memstick/ms_block: Fix a memory leakChristophe JAILLET1-0/+1
'erased_blocks_bitmap' is never freed. As it is allocated at the same time as 'used_blocks_bitmap', it is likely that it should be freed also at the same time. Add the corresponding bitmap_free() in msb_data_clear(). Fixes: 0ab30494bc4f ("memstick: add support for legacy memorysticks") Signed-off-by: Christophe JAILLET <[email protected]> Link: https://lore.kernel.org/r/b3b78926569445962ea5c3b6e9102418a9effb88.1656155715.git.christophe.jaillet@wanadoo.fr Signed-off-by: Ulf Hansson <[email protected]>
2022-07-12memstick/ms_block: Fix some incorrect memory allocationChristophe JAILLET1-5/+5
Some functions of the bitmap API take advantage of the fact that a bitmap is an array of long. So, to make sure this assertion is correct, allocate bitmaps with bitmap_zalloc() instead of kzalloc()+hand-computed number of bytes. While at it, also use bitmap_free() instead of kfree() to keep the semantic. Fixes: 0ab30494bc4f ("memstick: add support for legacy memorysticks") Signed-off-by: Christophe JAILLET <[email protected]> Link: https://lore.kernel.org/r/dbf633c48c24ae6d95f852557e8d8b3bbdef65fe.1656155715.git.christophe.jaillet@wanadoo.fr Signed-off-by: Ulf Hansson <[email protected]>
2022-07-12mmc: renesas_sdhi: Fix typo'sLad Prabhakar1-2/+2
Fix typo's, * difference -> different * alignment -> aligned While at it updated the comment to make it clear that Renesas SDHI DMAC needs buffers to be 128-byte aligned. Reported-by: Pavel Machek <[email protected]> Signed-off-by: Lad Prabhakar <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Reviewed-by: Wolfram Sang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-07-12mmc: renesas_sdhi: Get the reset handle early in the probeLad Prabhakar1-4/+4
In case of devm_reset_control_get_optional_exclusive() failure we returned directly instead of jumping to the error path to roll back initialization. This patch moves devm_reset_control_get_optional_exclusive() early in the probe so that we have the reset handle prior to initialization of the hardware. Fixes: b4d86f37eacb7 ("mmc: renesas_sdhi: do hard reset if possible") Reported-by: Pavel Machek <[email protected]> Signed-off-by: Lad Prabhakar <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Reviewed-by: Wolfram Sang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-07-12mmc: sdhci-of-esdhc: Fixup use of of_find_compatible_node()Liang He1-2/+4
Callers of of_find_compatible_node() should drop the reference count accordingly, so let's do that. Signed-off-by: Liang He <[email protected]> Acked-by: Adrian Hunter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-07-12mmc: sdhci-pci-gli: Fix build error unused-functionRen Zhijie1-25/+25
If CONFIG_PM is not set. make ARCH=x86_64 CROSS_COMPILE=x86_64-linux-gnu-, will be failed, like this: drivers/mmc/host/sdhci-pci-gli.c:834:13: error: ‘gl9763e_set_low_power_negotiation’ defined but not used [-Werror=unused-function] static void gl9763e_set_low_power_negotiation(struct sdhci_pci_slot *slot, bool enable) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors make[3]: *** [drivers/mmc/host/sdhci-pci-gli.o] Error 1 To fix building warning, wrap all related code with CONFIG_PM. Reported-by: Hulk Robot <[email protected]> Signed-off-by: Ren Zhijie <[email protected]> Acked-by: Adrian Hunter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-07-12mmc: core: Do not evaluate HS400 capabilities if bus has no MMC capabilityAlexander Stein1-1/+1
If 'no-mmc' is set but 'no-mmc-hs400' is not, this warning is raised. Specifying 'no-mmc' should be enough though. Signed-off-by: Alexander Stein <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-07-12mmc: host: Improve I/O read/write performance for GL9763EJason Lai1-0/+34
Due to flaws in hardware design, GL9763E takes long time to exit from L1 state. The I/O performance will suffer severe impact if it often enter and exit L1 state during I/O requests. To improve I/O read/write performance and take battery life into account, let's turn on GL9763E L1 negotiation before entering runtime suspend and turn off GL9763E L1 negotiation while executing runtime resume. That is to say, GL9763E will not enter L1 state when executing I/O requests and enter L1 state when PCIe bus idle. Signed-off-by: Renius Chen <[email protected]> Signed-off-by: Jason Lai <[email protected]> Link: https://lore.kernel.org/r/[email protected] [Ulf: Improved the commit message a bit] Signed-off-by: Ulf Hansson <[email protected]>
2022-07-12mmc: sdhci-st: Obviously always return success in remove callbackUwe Kleine-König1-3/+2
sdhci_pltfm_unregister() returns 0 unconditionally and returning an error in a platform remove callback isn't very sensible. (The only effect of the latter is that the device core emits a generic warning and then removes the device anyhow.) So return 0 unconditionally to make it obvious there is no error forwarded to the upper layers. This is a preparation for making platform remove callbacks return void. Signed-off-by: Uwe Kleine-König <[email protected]> Acked-by: Adrian Hunter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-07-12mmc: sdhci-of-arasan: Obviously always return success in remove callbackUwe Kleine-König1-3/+2
sdhci_pltfm_unregister() returns 0 unconditionally and returning an error in a platform remove callback isn't very sensible. (The only effect of the latter is that the device core emits a generic warning and then removes the device anyhow.) So return 0 unconditionally to make it obvious there is no error forwarded to the upper layers. This is a preparation for making platform remove callbacks return void. Signed-off-by: Uwe Kleine-König <[email protected]> Acked-by: Adrian Hunter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-07-12mmc: dw_mmc: rockchip: Obviously always return success in remove callbackUwe Kleine-König1-1/+3
dw_mci_pltfm_remove() returns 0 unconditionally and returning an error in a platform remove callback isn't very sensible. (The only effect of the latter is that the device core emits a generic warning and then removes the device anyhow.) So return 0 unconditionally to make it obvious there is no error forwarded to the upper layers. This is a preparation for making platform remove callbacks return void. Signed-off-by: Uwe Kleine-König <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-07-12mmc: dw_mmc: hi3789cv200: Obviously always return success in remove callbackUwe Kleine-König1-1/+3
dw_mci_pltfm_remove() returns 0 unconditionally and returning an error in a platform remove callback isn't very sensible. (The only effect of the latter is that the device core emits a generic warning and then removes the device anyhow.) So return 0 unconditionally to make it obvious there is no error forwarded to the upper layers. This is a preparation for making platform remove callbacks return void. Signed-off-by: Uwe Kleine-König <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-07-12mmc: dw_mmc: exynos: Obviously always return success in remove callbackUwe Kleine-König1-1/+3
dw_mci_pltfm_remove() returns 0 unconditionally and returning an error in a platform remove callback isn't very sensible. (The only effect of the latter is that the device core emits a generic warning and then removes the device anyhow.) So return 0 unconditionally to make it obvious there is no error forwarded to the upper layers. This is a preparation for making platform remove callbacks return void. Signed-off-by: Uwe Kleine-König <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-07-12mmc: sdhci-brcmstb: Initialize base_clk to NULL in sdhci_brcmstb_probe()Nathan Chancellor1-1/+1
Clang warns a few times along the lines of: drivers/mmc/host/sdhci-brcmstb.c:302:6: warning: variable 'base_clk' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] if (res) ^~~ drivers/mmc/host/sdhci-brcmstb.c:376:24: note: uninitialized use occurs here clk_disable_unprepare(base_clk); ^~~~~~~~ base_clk is used in the error path before it is initialized. Initialize it to NULL, as clk_disable_unprepare() calls clk_disable() and clk_unprepare(), which both handle NULL pointers gracefully. Link: https://github.com/ClangBuiltLinux/linux/issues/1650 Reported-by: kernel test robot <[email protected]> Signed-off-by: Nathan Chancellor <[email protected]> Acked-by: Florian Fainelli <[email protected]> Acked-by: Adrian Hunter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-07-12mmc: mmci: Fix typo in commentXiang wangx1-1/+1
Delete the redundant word 'is'. Signed-off-by: Xiang wangx <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-07-12dt-bindings: mmc: renesas,sdhi: Add R-Car Gen4 clock requirementsWolfram Sang1-0/+1
The patch enabling generic Gen4 support forgot to add the clock requirements which are the same as for Gen3. Update the binding. Reported-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Wolfram Sang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-07-12dt-bindings: mmc: renesas,sdhi: R-Car V3U is R-Car Gen4Wolfram Sang1-1/+1
Despite the name, R-Car V3U is the first member of the R-Car Gen4 family. Hence move its compatible value to the R-Car Gen4 section. Signed-off-by: Wolfram Sang <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-07-12mmc: debugfs: Fix file release memory leakWei Yongjun1-0/+1
When using single_open() for opening, single_release() should be used instead of seq_release(), otherwise there is a memory leak. Reported-by: Hulk Robot <[email protected]> Signed-off-by: Wei Yongjun <[email protected]> Acked-by: Adrian Hunter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-07-12dt-bindings: mmc: renesas,sdhi: Document R-Car S4-8 and generic Gen4 supportWolfram Sang1-0/+4
Signed-off-by: Wolfram Sang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-07-12mmc: renesas_sdhi: add R-Car Gen4 fallback compatibility stringWolfram Sang1-0/+1
For now, Gen4 is treated the same as Gen3. But we still want a seperate fallback just in case. Signed-off-by: Wolfram Sang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-07-12dt-bindings: mmc: convert mmc-spi-slot to yamlConor Dooley2-29/+77
Convert the mmc-spi-slot text based binding doc to yaml, with the side effect of cleaning up some of the riscv dtbs_check warnings. Reviewed-by: Rob Herring <[email protected]> Signed-off-by: Conor Dooley <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-07-12dt-bindings: mmc: samsung,exynos-dw-mshc: document Exynos5420 SMUKrzysztof Kozlowski1-0/+1
Document the compatible for Samsung Exynos5420 SoC Synopsys Designware MSHC with SMU, already used in DTS and driver. Signed-off-by: Krzysztof Kozlowski <[email protected]> Reviewed-by: Rob Herring <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-07-12dt-bindings: mmc: samsung,exynos-dw-mshc: convert to dtschemaKrzysztof Kozlowski2-94/+159
Convert the Samsung Exynos SoC specific extensions to the Synopsys Designware Mobile Storage Host Controller to DT schema. Signed-off-by: Krzysztof Kozlowski <[email protected]> Reviewed-by: Rob Herring <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-07-12mmc: cqhci: Capture eMMC and SD card errorsShaik Sajida Bhanu1-1/+8
Add changes to capture eMMC and SD card errors. This is useful for debug and testing. Signed-off-by: Liangliang Lu <[email protected]> Signed-off-by: Sayali Lokhande <[email protected]> Signed-off-by: Bao D. Nguyen <[email protected]> Signed-off-by: Ram Prakash Gupta <[email protected]> Signed-off-by: Shaik Sajida Bhanu <[email protected]> Acked-by: Adrian Hunter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-07-12mmc: debugfs: Add debug fs error state entry for mmc driverShaik Sajida Bhanu1-0/+23
Add debug fs entry error state to query eMMC and SD card errors statistics. If any errors occurred in eMMC and SD card driver level then err_state value will be set to 1. Signed-off-by: Liangliang Lu <[email protected]> Signed-off-by: Sayali Lokhande <[email protected]> Signed-off-by: Bao D. Nguyen <[email protected]> Signed-off-by: Shaik Sajida Bhanu <[email protected]> Acked-by: Adrian Hunter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-07-12mmc: debugfs: Add debug fs entry for mmc driverShaik Sajida Bhanu1-0/+56
Add debug fs entry to query eMMC and SD card errors statistics Signed-off-by: Liangliang Lu <[email protected]> Signed-off-by: Sayali Lokhande <[email protected]> Signed-off-by: Bao D. Nguyen <[email protected]> Signed-off-by: Shaik Sajida Bhanu <[email protected]> Acked-by: Adrian Hunter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-07-12mmc: sdhci: Capture eMMC and SD card errorsShaik Sajida Bhanu3-15/+53
Add changes to capture eMMC and SD card errors. This is useful for debug and testing. Signed-off-by: Liangliang Lu <[email protected]> Signed-off-by: Sayali Lokhande <[email protected]> Signed-off-by: Bao D. Nguyen <[email protected]> Signed-off-by: Shaik Sajida Bhanu <[email protected]> Acked-by: Adrian Hunter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-07-12mmc: core: Capture eMMC and SD card errorsShaik Sajida Bhanu2-1/+35
Add changes to capture eMMC and SD card errors. This is useful for debug and testing. Signed-off-by: Liangliang Lu <[email protected]> Signed-off-by: Sayali Lokhande <[email protected]> Signed-off-by: Bao D. Nguyen <[email protected]> Signed-off-by: Ram Prakash Gupta <[email protected]> Signed-off-by: Shaik Sajida Bhanu <[email protected]> Acked-by: Adrian Hunter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-07-12mmc: mtk-sd: fix typoFabien Parent1-1/+1
Fix a typo: Fianl -> Final. Signed-off-by: Fabien Parent <[email protected]> Reviewed-by: Miles Chen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-07-12mmc: mxcmmc: Silence a clang warningFabio Estevam1-1/+1
Change the of_device_get_match_data() cast to (uintptr_t) to silence the following clang warning: drivers/mmc/host/mxcmmc.c:1028:18: warning: cast to smaller integer type 'enum mxcmci_type' from 'const void *' [-Wvoid-pointer-to-enum-cast] Reported-by: kernel test robot <[email protected]> Fixes: 8223e885e74b ("mmc: mxc: Convert the driver to DT-only") Signed-off-by: Fabio Estevam <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-07-12mmc: sdhci-of-esdhc: Fix refcount leak in esdhc_signal_voltage_switchMiaoqian Lin1-0/+1
of_find_matching_node() returns a node pointer with refcount incremented, we should use of_node_put() on it when not need anymore. Add missing of_node_put() to avoid refcount leak. of_node_put() checks null pointer. Fixes: ea35645a3c66 ("mmc: sdhci-of-esdhc: add support for signal voltage switch") Signed-off-by: Miaoqian Lin <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-07-12mmc: sdhci-brcmstb: Add ability to increase max clock rate for 72116b0Kamal Dasu1-1/+68
The 72116B0 has improved SDIO controllers that allow the max clock rate to be increased from a max of 100MHz to a max of 150MHz. The driver will need to get the clock and increase it's default rate and override the caps register, that still indicates a max of 100MHz. The new clock will be named "sdio_freq" in the DT node's "clock-names" list. The driver will use a DT property, "clock-frequency", to enable this functionality and will get the actual rate in MHz from the property to allow various speeds to be requested. Signed-off-by: Al Cooper <[email protected]> Signed-off-by: Kamal Dasu <[email protected]> Acked-by: Florian Fainelli <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-07-12dt-bindings: mmc: Add Broadcom optional sdio_freq clockKamal Dasu1-6/+26
The 72116B0 has improved SDIO controllers that allow the max clock rate to be increased from a max of 100MHz to a max of 150MHz. Optional "sdio_freq" clock is used to drive the bus clock if present optional property "clock-frequency" specifies a base clock frequency in Hz that overrides the base clock frequency in the CAPS registers. Signed-off-by: Kamal Dasu <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Acked-by: Florian Fainelli <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-07-12dt-bindings: mmc: sdhci-msm: Fix issues in yaml bindingsBhupesh Sharma1-8/+44
Rob pointed some remaining issues in the sdhci-msm yaml bindings (via [1]). Fix the same by first using the 'mmc-controller.yaml' as 'ref' and thereafter also fix the issues reported by 'make dtbs_check' check. [1]. https://lore.kernel.org/linux-arm-msm/[email protected]/ Fixes: a45537723f4b ("dt-bindings: mmc: sdhci-msm: Convert bindings to yaml") Cc: Bjorn Andersson <[email protected]> Cc: Rob Herring <[email protected]> Cc: Ulf Hansson <[email protected]> Signed-off-by: Bhupesh Sharma <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-07-12mmc: sdhci-of-dwcmshc: add support for rk3588Yifeng Zhao1-18/+103
Add support for RK3588's DWCMSHC controller, which is used for providing the rootfs on the RK3588 evaluation board. Signed-off-by: Yifeng Zhao <[email protected]> [port from vendor BSP] Acked-by: Adrian Hunter <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-07-12mmc: sdhci-of-dwcmshc: rename rk3568 to rk35xxSebastian Reichel1-23/+23
Prepare driver for rk3588 support by renaming the internal data structures. Acked-by: Adrian Hunter <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-07-12mmc: sdhci-of-dwcmshc: add reset call back for rockchip SocsYifeng Zhao1-1/+25
The reset function build in the SDHCI will not reset the logic circuit related to the tuning function, which may cause data reading errors. Resetting the complete SDHCI controller through the reset controller fixes the issue. Signed-off-by: Yifeng Zhao <[email protected]> [rebase, use optional variant of reset getter] Acked-by: Adrian Hunter <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>