aboutsummaryrefslogtreecommitdiff
path: root/drivers/mmc
AgeCommit message (Collapse)AuthorFilesLines
2026-03-09mmc: renesas_sdhi_sys_dmac: Convert to DEFINE_RUNTIME_DEV_PM_OPS()Geert Uytterhoeven1-8/+4
Convert the Renesas SDHI SD/SDIO controller driver using SYS-DMAC from an open-coded dev_pm_ops structure to DEFINE_RUNTIME_DEV_PM_OPS() and pm_ptr(). This simplifies the code, and reduces kernel size in case CONFIG_PM is disabled. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-03-09mmc: loongson2: Add Loongson-2K0300 SD/SDIO/eMMC controller driverBinbin Zhou1-0/+27
This patch describes the two MMC controllers of the Loongson-2K0300 SoC, one providing an eMMC interface and the other exporting an SD/SDIO interface. Its hardware design is similar to that of the Loongson-2K2000, but it suffers from hardware defects such as missing CMD48 interrupts. Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn> Reviewed-by: Huacai Chen <chenhuacai@loongson.cn> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-03-09mmc: loongson2: Gathering all SoCs private data togetherBinbin Zhou1-16/+16
More Loongson SoCs will be added, gathering all SoC private data (`loongson2_mmc_pdata`) together to make the code clearer. No functional change intended. Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn> Reviewed-by: Huacai Chen <chenhuacai@loongson.cn> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-03-09mmc: sdhci-of-bst: Fix memory leak in sdhci_bst_alloc_bounce_buffer()Felix Gu1-1/+3
In sdhci_bst_alloc_bounce_buffer(), if dma_alloc_coherent() fails, the function immediately returns -ENOMEM without releasing the reserved memory, which results in a memory leak. Add the missing of_reserved_mem_device_release() call before returning -ENOMEM to properly clean up the reserved memory. Fixes: 695824f45629 ("mmc: sdhci: add Black Sesame Technologies BST C1200 controller driver") Signed-off-by: Felix Gu <ustc.gu@gmail.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-03-09mmc: Merge the immutable mux branch into nextUlf Hansson1-0/+6
The mux branch contains updates to the mux core along with some corresponding changes for a couple of consumer drivers, including an mmc driver. Let's merge it into the next branch to get it tested and queued for the next release. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-03-09mmc: host: renesas_sdhi_core: support selecting an optional muxJosua Mayer1-0/+6
Some hardware designs route data or control signals through a mux to support multiple devices on a single sdhi controller. In particular SolidRun RZ/G2L/G2LC/V2L System on Module use a mux for switching between soldered eMMC and an optional microSD on a carrier board, e.g. for development or provisioning. SD/SDIO/eMMC are not well suited for runtime switching between different cards, however boot-time selection is possible and useful - in particular considering dt overlays. Add support for an optional SD/SDIO/eMMC mux defined in dt, and select it during probe. Similar functionality already exists in other places, e.g. i2c-omap. Signed-off-by: Josua Mayer <josua@solid-run.com> Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-03-04mmc: Merge branch fixes into nextUlf Hansson1-0/+9
Merge the mmc fixes for v7.0-rc[n] into the next branch, to allow them to get tested together with the mmc changes that are targeted for the next release. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-03-04mmc: sdhci-pci-gli: fix GL9750 DMA write corruptionMatthew Schwartz1-0/+9
The GL9750 SD host controller has intermittent data corruption during DMA write operations. The GM_BURST register's R_OSRC_Lmt field (bits 17:16), which limits outstanding DMA read requests from system memory, is not being cleared during initialization. The Windows driver sets R_OSRC_Lmt to zero, limiting requests to the smallest unit. Clear R_OSRC_Lmt to match the Windows driver behavior. This eliminates write corruption verified with f3write/f3read tests while maintaining DMA performance. Cc: stable@vger.kernel.org Fixes: e51df6ce668a ("mmc: host: sdhci-pci: Add Genesys Logic GL975x support") Closes: https://lore.kernel.org/linux-mmc/33d12807-5c72-41ce-8679-57aa11831fad@linux.dev/ Acked-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Matthew Schwartz <matthew.schwartz@linux.dev> Reviewed-by: Ben Chuang <ben.chuang@genesyslogic.com.tw> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-03-04mmc: rtsx_pci_sdmmc: simplify voltage switch handling after card_busy()Ricky Wu1-82/+6
Now that the Realtek PCIe SDMMC host implements the card_busy() callback, the MMC core performs the required DAT[3:0] validation during the signal voltage switch sequence. As a result, the driver-side voltage stabilization helpers sd_wait_voltage_stable_1() and sd_wait_voltage_stable_2() become redundant. These helpers duplicate DAT line checks that are now handled centrally by the MMC core via card_busy(). Remove the two stabilization helpers and simplify sdmmc_switch_voltage() accordingly, keeping only the minimal clock control needed around the voltage switch. No functional changes and intended. Signed-off-by: Ricky Wu <ricky_wu@realtek.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-02-24mmc: sdhci-pic32: allow driver to be compiled with COMPILE_TESTBrian Masney1-1/+1
This driver currently only supports builds against a PIC32 target. Now that commit d6618d277c1a ("mmc: sdhci-pic32: update include to use pic32.h from platform_data") is merged, it's possible to compile this driver on other architectures. To avoid future breakage of this driver in the future, let's update the Kconfig so that it can be built with COMPILE_TEST enabled on all architectures. Signed-off-by: Brian Masney <bmasney@redhat.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-02-24mmc: sdhci-pic32: add SPDX license identifierBrian Masney1-4/+1
Add the missing SPDX license identifier to the top of the file, and drop the boiler plate license text. Signed-off-by: Brian Masney <bmasney@redhat.com> Cc: linux-spdx@vger.kernel.org Acked-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-02-24mmc: dw_mmc: Rename dw_mci_pltfm_pmops to dw_mci_pmopsShawn Lin6-7/+7
Since it's moved to dw_mmc core and resued by others variant host drivers, so drop the pltfm notation. Suggested-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-02-24mmc: sdhci-of-arasan: add support on Axiado AX3000 SoCSriNavmani A1-0/+15
Axiado AX3000 SoC eMMC controller is based on Arasan eMMC 5.1 host controller IP. Signed-off-by: SriNavmani A <srinavmani@axiado.com> Signed-off-by: Tzu-Hao Wei <twei@axiado.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-02-24mmc: host: Remove unnecessary module_init/exit functionsEthan Nelson-Moore3-38/+1
Three MMC drivers have unnecessary module_init and module_exit functions that are empty or just print a message. Remove them. Note that if a module_init function exists, a module_exit function must also exist; otherwise, the module cannot be unloaded. Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com> Acked-by: Shawn Lin <shawn.lin@rock-chips.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-02-23mmc: core: Optimize time for secure erase/trim for some Kingston eMMCsLuke Wang3-2/+21
Kingston eMMC IY2964 and IB2932 takes a fixed ~2 seconds for each secure erase/trim operation regardless of size - that is, a single secure erase/trim operation of 1MB takes the same time as 1GB. With default calculated 3.5MB max discard size, secure erase 1GB requires ~300 separate operations taking ~10 minutes total. Add a card quirk, MMC_QUIRK_FIXED_SECURE_ERASE_TRIM_TIME, to set maximum secure erase size for those devices. This allows 1GB secure erase to complete in a single operation, reducing time from 10 minutes to just 2 seconds. Signed-off-by: Luke Wang <ziniu.wang_1@nxp.com> Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-02-23mmc: dw_mmc: move pmops into core driverArnd Bergmann2-9/+6
Since the platform power management structure is now shared with the PCI front-end, there is a link failure if only the PCI variant is enabled: arm-linux-gnueabi/bin/arm-linux-gnueabi-ld: drivers/mmc/host/dw_mmc-pci.o:(.data+0x74): undefined reference to `dw_mci_pltfm_pmops' This could be fixed by selecting the platform driver from the PCI one in Kconfig, or by reverting the change to the PCI driver, but since this is now used by all dw_mmc variants, just move the structure into the core code as well. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-02-23mmc: loongson2-mmc: drop redundant memset after dma_alloc_coherent()Andre Korol1-1/+0
dma_alloc_coherent() returns zeroed memory, so the memset() immediately after allocation is redundant. Signed-off-by: Andre Korol <andre.korol.dev@gmail.com> Reviewed-by: Binbin Zhou <zhoubinbin@loongson.cn> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-02-23mmc: dw_mmc: Remove mshc alias supportShawn Lin1-6/+3
Remove the long-deprecated mshc alias support, as the mmc core already provides alias functionality through the standard mmc alias. This eliminates the redundant dual-alias system. The driver now obtains the controller ID from struct mmc_host::index(supplied by mmc alias) instead of the legacy mshc alias. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-02-23mmc: dw_mmc-k3: Remove mshc alias supportShawn Lin1-15/+8
Remove the long-deprecated mshc alias support, as the mmc core already provides alias functionality through the standard mmc alias. This eliminates the redundant dual-alias system. The driver now obtains the controller ID from struct mmc_host::index(supplied by mmc alias) instead of the legacy mshc alias. dw_mci_hi6220_parse_dt() which parse mshc alias is used for hi6220, hi3660 and hi3670. Given hi6220 never assigned mshc alias on the DTS files, and hi3360 and hi3670 share the same code, so with it removed, add a return value to dw_mci_hs_set_timing() and let dw_mci_hi3660_init() check if index exceeds TIMING_MODE in the firs place to bail out early, the same as before. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-02-23mmc: sdhci: add Black Sesame Technologies BST C1200 controller driverAlbert Yang3-0/+536
Add SDHCI controller driver for Black Sesame Technologies C1200 SoC. This driver supports the DWCMSHC SDHCI controller with BST-specific enhancements including: - Custom clock management and tuning - Power management support - BST-specific register configurations - Support for eMMC and SD card interfaces - Hardware limitation workaround for 32-bit DMA addressing The driver addresses specific hardware constraints where: - System memory uses 64-bit bus, eMMC controller uses 32-bit bus - eMMC controller cannot access memory through SMMU due to hardware bug - All system DRAM is configured outside 4GB boundary (ZONE_DMA32) - Uses SRAM-based bounce buffer within 32-bit address space Signed-off-by: Ge Gordon <gordon.ge@bst.ai> Signed-off-by: Albert Yang <yangzh0906@thundersoft.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-02-23mmc: sdhci: allow drivers to pre-allocate bounce bufferAlbert Yang1-0/+7
Allow platform drivers to pre-allocate bounce buffer by checking if host->bounce_buffer is already set before attempting allocation. This enables platforms with specific DMA constraints (such as 32-bit DMA on controllers that cannot access high memory) to use their own reserved memory regions for the bounce buffer. Suggested-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Albert Yang <yangzh0906@thundersoft.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-02-23mmc: sdhci-of-k1: spacemit: Add support for K3 SoCYixun Lan1-2/+17
The SDHCI controller found on SpacemiT K3 SoC share the same IP with K1 generation and introduce a compatible data to denote the change that broken 64BIT DMA issue has been fixed. Signed-off-by: Yixun Lan <dlan@kernel.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-02-23mmc: sdhci: Stop advertising the driver in dmesgLinus Walleij1-16/+0
As much as we have grown used to seeing this message on every kernel boot, it does not add any technical value. Drop all messages from sdhci_drv_init(), and drop the module_init() and module_exit() calls as well since they now become empty. The modules becomes a pure library module, meaning it will get pulled in by modprobe() when the symbols inside it are needed, or compiled in if any users are compiled in. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-02-23mmc: dw_mmc-pltfm: use modern PM macrosShawn Lin6-22/+6
Use the modern PM macros for the suspend and resume functions to be automatically dropped by the compiler when CONFIG_PM or CONFIG_PM_SLEEP are disabled, without having to use #ifdef guards. When this's done, remove all variant drivers' local pm definition and replace it with dw_mci_pltfm_pmops. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> [Ulf: Fixed conflict by dropping changes for dw_mmc-rockchip] Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-02-23mmc: dw_mmc-pci: Use BAR_2 and pcim_iomap_region()Shawn Lin1-6/+4
PCIe endpoint framework defines standard BAR enum for EP drivers to use, so remove PCI_BAR_NO here. Then, pcim_iomap_regions has been deprecated for a long time, replace it with pcim_iomap_region(); Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-02-23mmc: dw_mmc: Remove unused register access macrosShawn Lin1-26/+1
The mci_readw/mci_writew/mci_readq/mci_writeq macros were added to provide 16-bit and 64-bit register access operations, but they have remained unused since their introduction. Remove these dead code. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-02-23mmc: dw_mmc: Improve dw_mci_get_cd()Shawn Lin2-35/+18
The current dw_mci_get_cd() implementation maintains a DW_MMC_CARD_PRESENT flag primarily for logging purposes, which adds unnecessary complexity. Additionally, the if-else-elif control flow does not align with the Linux kernel coding style. This commit simplifies the function by: - Removing the redundant card presence flag - Replacing the conditional chain with a cleaner implementation - Improving code readability while maintaining functionality The change reduces code complexity without affecting the actual card detection behavior. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-02-23mmc: dw_mmc: Remove DW_MCI_SEND_STATUS and DW_MCI_RECV_STATUS macrosShawn Lin1-12/+10
Use MMC_DATA_READ and MMC_DATA_WRITE defined by MMC core instead. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-02-23mmc: dw_mmc: Remove redundant struct mmc_data forward declarationShawn Lin1-2/+0
The header file linux/mmc/core.h, which is already included in dw_mmc.h, contains the forward declaration of struct mmc_data. There's no need to redeclare it here. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-02-23mmc: dw_mmc: Remove struct dw_mci_boardShawn Lin3-41/+17
The only user of dw_mci_board is dw_pci-pci, now we can provide the caps from dw_mci_drv_data, so we could let dw_pci-pci use dw_mci_drv_data and remove caps from struct dw_mci_board. With that, struct dw_mci_board is no longer needed, we can remove it. Then we should check all settings in dw_mci_parse_dt in order not to overwrite them if provided from variant drivers. Also, without CONFIG_OF support, dw_mmc doesn' work as host->pdata is always ERR_PTR(-EINVAL), we could remove it together. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-02-23mmc: dw_mmc: Remove bus_hz from struct dw_mci_boardShawn Lin3-9/+5
struct dw_mci already keeps one, reuse it. Now, as dw_mmc-pci still provide struct dw_mci_board, so host->bus_hz will not be overwritten. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-02-23mmc: dw_mmc: Move detect_delay_ms from struct dw_mci_board to struct dw_mciShawn Lin3-6/+5
Now, as dw_mmc-pci still provide struct dw_mci_board, so host->detect_delay_ms will not be overwritten. So it's fine to move it. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-02-23mmc: dw_mmc: Remove fifo_depth from struct dw_mci_boardShawn Lin3-10/+4
struct dw_mci already keeps one, so remove it from struct dw_mci_board. Now, as dw_mmc-pci still provide struct dw_mci_board, so host->fifo_depth will not be overwritten. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-02-23mmc: dw_mmc: Move rstc from struct dw_mci_board to struct dw_mciShawn Lin2-10/+12
Nobody using dw_mci_board passes in rstc, move it to the common struct dw_mci needed by all users. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-02-23mmc: dw_mmc: Remove caps2 and pm_caps from struct dw_mci_boardShawn Lin2-8/+0
Nobody uses them. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-02-23mmc: dw_mmc: Remove assignment of pdata in dw_mci_pltfm_register()Shawn Lin1-1/+0
No one using dw_mci_pltfm_register() passes in platform_data when searching host and arch directories, remove it. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-02-23mmc: dw_mmc: Remove SDMMC_INT_ERRORShawn Lin1-1/+0
SDMMC_INT_ERROR is defined as 0xbfc2, which looks like a magic number and it's never used, so remove it. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-02-23mmc: dw_mmc: Remove dma_ops from struct dw_mci_boardShawn Lin2-3/+1
It does take dma_ops from struct dw_mci_board, but we immediately re-assign it from either dw_mci_idmac_ops or dw_mci_edmac_ops in dw_mci_init_dma(). That means it's never used now, or has been broken for a long time without noticed. It seems no drivers need it, so remove it now. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-02-23mmc: dw_mmc: Check return value of dma_ops->init() in resumeShawn Lin1-2/+5
dma_ops->init() may fail, should check the return value. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-02-23mmc: sdhci-of-aspeed: Simplify with scoped for each OF child loopKrzysztof Kozlowski1-3/+2
Use scoped for-each loop when iterating over device nodes to make code a bit simpler. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-02-23mmc: jz4740: Fix Wvoid-pointer-to-enum-cast warningKrzysztof Kozlowski1-1/+1
"jz4740" is an enum, thus cast of pointer on 64-bit compile test with clang W=1 causes: jz4740_mmc.c:1055:18: error: cast to smaller integer type 'enum jz4740_mmc_version' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Reviewed-by: Paul Cercueil <paul@crapouillou.net> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-02-23mmc: cavium-octeon: Simplify with scoped for each OF child loopKrzysztof Kozlowski1-3/+2
Use scoped for-each loop when iterating over device nodes to make code a bit simpler. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-02-23mmc: atmel-mci: Simplify with scoped for each OF child loopKrzysztof Kozlowski1-9/+3
Use scoped for-each loop when iterating over device nodes to make code a bit simpler. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Reviewed-by: Nicolas Ferre <nicolas.ferre@microchip.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-02-23mmc: cavium: Use clamp to simplify cvm_mmc_set_clockThorsten Blum1-3/+1
Use clamp() to simplify cvm_mmc_set_clock() and improve its readability. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-02-23mmc: sdhci-of-k1: add reset supportYixun Lan1-0/+20
The SDHCI controller of SpacemiT K1 SoC requires two resets, add support to explicitly request the reset line and deassert during initialization phase. Still using devm_xx_get_optional() API to make the request optional. Signed-off-by: Yixun Lan <dlan@gentoo.org> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-02-23mmc: dw_mmc: Remove struct dw_mci_slotShawn Lin4-157/+103
Use dw_mci_alloc_host() helper to allocate struct dw_mci for dw_mmc-pci.c and dw_mmc-pltfm.c. With that, we could get rid of struct dw_mci_slot and remove it everywhere. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Tested-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-02-23mmc: dw_mmc: Introduce dw_mci_alloc_host()Shawn Lin2-0/+18
This helper is used for variant drivers to allocate struct dw_mci and set struct dw_mci as private data of struct mmc_host. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Tested-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-02-23mmc: dw_mmc: Remove queue from dw_mciShawn Lin2-26/+6
It's pointless to use a queue if only one slot is supported. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-02-23mmc: dw_mmc: Remove mrq from struct dw_mci_slotShawn Lin2-9/+6
struct dw_mci has already kept mrq, so removing keeping mrq again from struct dw_mci_slot. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-02-23mmc: dw_mmc: Move clock rate stuff from struct dw_mci_slot to struct dw_mciShawn Lin2-9/+8
Except for moving them, this patch also renames __clk_old to clk_old. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>