- 17 Apr, 2023 9 commits
-
-
Brad Larson authored
Add support for mmc hardware reset using a reset-controller that would need to be enabled in the device tree with a supporting driver. The default is disabled for all existing designs. Signed-off-by: Brad Larson <blarson@amd.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Link: https://lore.kernel.org/r/20230410184526.15990-15-blarson@amd.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Brad Larson authored
Add support for AMD Pensando Elba SoC which explicitly controls byte-lane enables on writes. Select MMC_SDHCI_IO_ACCESSORS for MMC_SDHCI_CADENCE which allows Elba SoC sdhci_elba_ops to overwrite the SDHCI IO memory accessors Signed-off-by: Brad Larson <blarson@amd.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Link: https://lore.kernel.org/r/20230410184526.15990-14-blarson@amd.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Brad Larson authored
Move struct sdhci_pltfm_data under new struct sdhci_cdns_drv_data. Add an init() into sdhci_cdns_drv_data for platform specific device initialization in the device probe which is not used for existing devices. Signed-off-by: Brad Larson <blarson@amd.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Link: https://lore.kernel.org/r/20230410184526.15990-13-blarson@amd.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Brad Larson authored
SoCs with device specific Cadence implementation, such as setting byte-enables before the write, need to override writel(). Add a callback where the default is writel() for all existing chips. Signed-off-by: Brad Larson <blarson@amd.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Link: https://lore.kernel.org/r/20230410184526.15990-12-blarson@amd.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Brad Larson authored
AMD Pensando Elba ARM 64-bit SoC is integrated with this IP and explicitly controls byte-lane enables. Signed-off-by: Brad Larson <blarson@amd.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20230410184526.15990-3-blarson@amd.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Bean Huo authored
There is no user for macro mmc_req_rel_wr, so delete it. Signed-off-by: Bean Huo <beanhuo@micron.com> Link: https://lore.kernel.org/r/20230403221754.16168-1-beanhuo@iokpp.deSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Sai Krishna Potthuri authored
Clock delay settings are not defined for 400KHz, so add frequency check to skip calling the clock delay settings when frequency is <=400KHz. Signed-off-by: Sai Krishna Potthuri <sai.krishna.potthuri@amd.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Link: https://lore.kernel.org/r/20230403102551.3763054-4-sai.krishna.potthuri@amd.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Swati Agarwal authored
Add support for eMMC5.1 on Xilinx Versal Net platform - Add new compatible string(xlnx,versal-net-emmc). - Add support for PHY which is part of Host Controller register space. - Add DLL and Delay Chain mode support and corresponding tap delays for all eMMC modes. - Add Strobe select tap for HS400 mode. Signed-off-by: Swati Agarwal <swati.agarwal@amd.com> Co-developed-by: Sai Krishna Potthuri <sai.krishna.potthuri@amd.com> Signed-off-by: Sai Krishna Potthuri <sai.krishna.potthuri@amd.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Link: https://lore.kernel.org/r/20230403102551.3763054-3-sai.krishna.potthuri@amd.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Sai Krishna Potthuri authored
Add Xilinx Versal Net compatible to support eMMC 5.1 PHY. Signed-off-by: Sai Krishna Potthuri <sai.krishna.potthuri@amd.com> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20230403102551.3763054-2-sai.krishna.potthuri@amd.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
- 05 Apr, 2023 2 commits
-
-
Ulf Hansson authored
Merge the mmc fixes for v6.3-rc[n] into the next branch, to allow them to get tested together with the new mmc changes that are targeted for v6.4. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Greg Kroah-Hartman authored
When calling dev_set_name() memory is allocated for the name for the struct device. Once that structure device is registered, or attempted to be registerd, with the driver core, the driver core will handle cleaning up that memory when the device is removed from the system. Unfortunatly for the memstick code, there is an error path that causes the struct device to never be registered, and so the memory allocated in dev_set_name will be leaked. Fix that leak by manually freeing it right before the memory for the device is freed. Cc: Maxim Levitsky <maximlevitsky@gmail.com> Cc: Alex Dubov <oakad@yahoo.com> Cc: Ulf Hansson <ulf.hansson@linaro.org> Cc: "Rafael J. Wysocki" <rafael@kernel.org> Cc: Hans de Goede <hdegoede@redhat.com> Cc: Kay Sievers <kay.sievers@vrfy.org> Cc: linux-mmc@vger.kernel.org Fixes: 0252c3b4 ("memstick: struct device - replace bus_id with dev_name(), dev_set_name()") Cc: stable <stable@kernel.org> Co-developed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Co-developed-by: Mirsad Goran Todorovac <mirsad.todorovac@alu.unizg.hr> Signed-off-by: Mirsad Goran Todorovac <mirsad.todorovac@alu.unizg.hr> Link: https://lore.kernel.org/r/20230401200327.16800-1-gregkh@linuxfoundation.orgSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
- 04 Apr, 2023 1 commit
-
-
Aswath Govindraju authored
Add support for suspend/resume and pm_runtime resume/suspend. Signed-off-by: Aswath Govindraju <a-govindraju@ti.com> Signed-off-by: Georgi Vlaev <g-vlaev@ti.com> Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com> Link: https://lore.kernel.org/r/20230331101619.4117312-1-vigneshr@ti.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
- 03 Apr, 2023 2 commits
-
-
Yu Zhe authored
Pointer variables of void * type do not require type cast. Signed-off-by: Yu Zhe <yuzhe@nfschina.com> Link: https://lore.kernel.org/r/20230328031049.22749-1-yuzhe@nfschina.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Peng Fan authored
Since the esdhc controller is sdhci compatible, the fsl-imx-esdhc.yaml should ref sdhci-common.yaml to use 'sdhci-caps-mask' property. Signed-off-by: Peng Fan <peng.fan@nxp.com> Link: https://lore.kernel.org/r/20230328060740.1984239-1-peng.fan@oss.nxp.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
- 24 Mar, 2023 7 commits
-
-
Ulf Hansson authored
Merge the mmc fixes for v6.3-rc[n] into the next branch, to allow them to get tested together with the new mmc changes that are targeted for v6.4. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Georgii Kruglov authored
If spec_reg is equal to 'SDHCI_PRESENT_STATE', esdhc_readl_fixup() fixes up register value and returns it immediately. As a result, the further block (spec_reg == SDHCI_PRESENT_STATE) &&(esdhc->quirk_ignore_data_inhibit == true), is never executed. The patch merges the second block into the first one. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 1f1929f3 ("mmc: sdhci-of-esdhc: add quirk to ignore command inhibit for data") Signed-off-by: Georgii Kruglov <georgy.kruglov@yandex.ru> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Link: https://lore.kernel.org/r/20230321203715.3975-1-georgy.kruglov@yandex.ruSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Marc Gonzalez authored
Failing to detect a non-removable card shouldn't happen. Let's log a message about it to inform that we have problem that ought to be fixed. Signed-off-by: Marc Gonzalez <marc.w.gonzalez@free.fr> Link: https://lore.kernel.org/r/d2444591-c91b-a94d-71e2-9dedc3b6c514@free.frSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Rob Herring authored
Add support for Socionext Synquacer SDHCI. This binding has been in use for some time. The interrupts were not documented. The driver only uses the first interrupt, but the DT and example have 2 interrupts. The 2nd one is unknown. "dma-coherent" was also not documented, but is used on Synquacer. Signed-off-by: Rob Herring <robh@kernel.org> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com> Link: https://lore.kernel.org/r/20230319173006.30455-1-robh@kernel.orgSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Tom Rix authored
clang with W=1 reports drivers/mmc/host/sdricoh_cs.c:104:28: error: unused function 'sdricoh_readw' [-Werror,-Wunused-function] static inline unsigned int sdricoh_readw(struct sdricoh_host *host, ^ This function is not used, so remove it. Signed-off-by: Tom Rix <trix@redhat.com> Link: https://lore.kernel.org/r/20230319164744.1707169-1-trix@redhat.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
A, Rashmi authored
Remove Thunder Bay specific code as the product got cancelled and there are no end customers or users. Signed-off-by: A, Rashmi <rashmi.a@intel.com> Reviewed-by: Hunter, Adrian <adrian.hunter@intel.com> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20230316120549.21486-3-rashmi.a@intel.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
A, Rashmi authored
Remove Thunder Bay specific code as the product got cancelled and there are no end customers or users. Signed-off-by: A, Rashmi <rashmi.a@intel.com> Reviewed-by: Hunter, Adrian <adrian.hunter@intel.com> Link: https://lore.kernel.org/r/20230316120549.21486-2-rashmi.a@intel.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
- 23 Mar, 2023 19 commits
-
-
Bhavya Kapoor authored
Timing Information in Datasheet assumes that HIGH_SPEED_ENA=1 should be set for SDR12 and SDR25 modes. But sdhci_am654 driver clears HIGH_SPEED_ENA register. Thus, Modify sdhci_am654 to not clear HIGH_SPEED_ENA (HOST_CONTROL[2]) bit for SDR12 and SDR25 speed modes. Fixes: e374e875 ("mmc: sdhci_am654: Clear HISPD_ENA in some lower speed modes") Signed-off-by: Bhavya Kapoor <b-kapoor@ti.com> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230317092711.660897-1-b-kapoor@ti.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Yang Li authored
According to commit 890cc39a ("drivers: provide devm_platform_get_and_ioremap_resource()"), convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Link: https://lore.kernel.org/r/20230315055355.66733-1-yang.lee@linux.alibaba.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Yang Li authored
According to commit 890cc39a ("drivers: provide devm_platform_get_and_ioremap_resource()"), convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Link: https://lore.kernel.org/r/20230315055023.61779-1-yang.lee@linux.alibaba.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Yang Li authored
According to commit 890cc39a ("drivers: provide devm_platform_get_and_ioremap_resource()"), convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Reviewed-by: Manivannan Sadhasivam <mani@kernel.org> Link: https://lore.kernel.org/r/20230315054113.48898-1-yang.lee@linux.alibaba.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Yang Li authored
According to commit 890cc39a ("drivers: provide devm_platform_get_and_ioremap_resource()"), convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Link: https://lore.kernel.org/r/20230315053434.38316-1-yang.lee@linux.alibaba.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Yang Li authored
According to commit 890cc39a ("drivers: provide devm_platform_get_and_ioremap_resource()"), convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Link: https://lore.kernel.org/r/20230315053127.33855-1-yang.lee@linux.alibaba.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Yang Li authored
According to commit 890cc39a ("drivers: provide devm_platform_get_and_ioremap_resource()"), convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Link: https://lore.kernel.org/r/20230315052231.21212-1-yang.lee@linux.alibaba.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Krzysztof Kozlowski authored
The sdhci_get_compatibility() uses OF functions which have stubs for !OF case, thus entire CONFIG_OF ifdef can be dropped. This also fixes !CONFIG_OF W=1 warning: drivers/mmc/host/sdhci-pltfm.c:76:6: error: no previous prototype for ‘sdhci_get_compatibility’ [-Werror=missing-prototypes] Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Link: https://lore.kernel.org/r/20230314203901.20803-1-krzysztof.kozlowski@linaro.orgSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Konrad Dybcio authored
Document the SDHCI on QCM2290. Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20230314-topic-2290_compats-v1-4-47e26c3c0365@linaro.orgSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Heiner Kallweit authored
Use new helpers mmc_regulator_enable/disable_vqmmc to simplify the code. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Link: https://lore.kernel.org/r/2ceb62da-07e6-bafc-c29e-13cc1cdde93a@gmail.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Heiner Kallweit authored
There's a number of drivers (e.g. dw_mmc, meson-gx, mmci, sunxi) using the same mechanism and a private flag vqmmc_enabled to deal with enabling/disabling the vqmmc regulator. Move this to the core and create new helpers mmc_regulator_enable_vqmmc and mmc_regulator_disable_vqmmc. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Link: https://lore.kernel.org/r/71586432-360f-9b92-17f6-b05a8a971bc2@gmail.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Heiner Kallweit authored
After 087592395a96 ("mmc: core: Allow invalid regulator in mmc_regulator_set_ocr()") we can remove the checks here. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Link: https://lore.kernel.org/r/858a592b-ebf4-99b4-74fc-21b4ad3382f8@gmail.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Fred authored
Change SDR50 mode clock source from DLL output clock to PLL open clock 1.HS200 and SDR104 mode select DLL output clock 2.SDR50 mode select PLL open clock Signed-off-by: Fred <fred.ai@bayhubtech.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Link: https://lore.kernel.org/r/20230223120450.16858-1-fredaibayhubtech@126.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Rob Herring authored
It is preferred to use typed property access functions (i.e. of_property_read_<type> functions) rather than low-level of_get_property/of_find_property functions for reading properties. Convert reading boolean properties to to of_property_read_bool(). Signed-off-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20230310144715.1543836-1-robh@kernel.orgSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Alexandre Mergnat authored
Add binding description for mediatek,mt8365-mmc Signed-off-by: Alexandre Mergnat <amergnat@baylibre.com> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20230203-evk-board-support-v2-2-6ec7cdb10ccf@baylibre.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Rob Herring authored
It is preferred to use typed property access functions (i.e. of_property_read_<type> functions) rather than low-level of_get_property/of_find_property functions for reading properties. As part of this, convert of_get_property/of_find_property calls to the recently added of_property_present() helper when we just want to test for presence of a property and nothing more. Signed-off-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20230310144714.1543767-1-robh@kernel.orgSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Vasily Khoruzhick authored
Currently .get_max_clock returns the current clock rate for cclk_emmc on rk35xx, thus max clock gets set to whatever bootloader set it to. In case of u-boot, it is intentionally reset to 50 MHz if it boots from eMMC, see mmc_deinit() in u-boot sources. As a result, HS200 and HS400 modes are never selected by Linux, because dwcmshc_rk35xx_postinit clears appropriate caps if host->mmc->f_max is < 52MHz cclk_emmc is not a fixed clock on rk35xx, so using sdhci_pltfm_clk_get_max_clock is not appropriate here. Implement rk35xx_get_max_clock that returns actual max clock for cclk_emmc. Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Link: https://lore.kernel.org/r/20230310010349.509132-1-anarsoul@gmail.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Wolfram Sang authored
R-Car H3 ES1.* was only available to an internal development group and needed a lot of quirks and workarounds. These become a maintenance burden now, so our development group decided to remove upstream support and disable booting for this SoC. Public users only have ES2 onwards. Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Link: https://lore.kernel.org/r/20230307163041.3815-9-wsa+renesas@sang-engineering.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Zheng Wang authored
In r592_probe, dev->detect_timer was bound with r592_detect_timer. In r592_irq function, the timer function will be invoked by mod_timer. If we remove the module which will call hantro_release to make cleanup, there may be a unfinished work. The possible sequence is as follows, which will cause a typical UAF bug. Fix it by canceling the work before cleanup in r592_remove. CPU0 CPU1 |r592_detect_timer r592_remove | memstick_free_host| put_device; | kfree(host); | | | queue_work | &host->media_checker //use Signed-off-by: Zheng Wang <zyytlz.wz@163.com> Link: https://lore.kernel.org/r/20230307164338.1246287-1-zyytlz.wz@163.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-