summaryrefslogtreecommitdiff
path: root/drivers/mmc
AgeCommit message (Collapse)Author
2025-06-24mmc: mmc_spi: Use devm_mmc_alloc_host() helperBinbin Zhou
Use new function devm_mmc_alloc_host() to simplify the code. Reviewed-by: Huacai Chen <chenhuacai@loongson.cn> Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn> Link: https://lore.kernel.org/r/3f1127f02ffd7f1cc09122fd0d3c71473a030a53.1748933789.git.zhoubinbin@loongson.cn Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-24mmc: sunxi: Use devm_mmc_alloc_host() helperBinbin Zhou
Use new function devm_mmc_alloc_host() to simplify the code. Cc: Chen-Yu Tsai <wens@csie.org> Cc: Jernej Skrabec <jernej.skrabec@gmail.com> Cc: Samuel Holland <samuel@sholland.org> Cc: linux-sunxi@lists.linux.dev Reviewed-by: Huacai Chen <chenhuacai@loongson.cn> Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn> Link: https://lore.kernel.org/r/ee7726b1ea37084258a5d8cec67cad12473152c2.1748933789.git.zhoubinbin@loongson.cn Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-24mmc: tmio: Use devm_mmc_alloc_host() helperBinbin Zhou
Use new function devm_mmc_alloc_host() to simplify the code. Cc: Wolfram Sang <wsa+renesas@sang-engineering.com> Cc: Kunihiko Hayashi <hayashi.kunihiko@socionext.com> Cc: Masami Hiramatsu <mhiramat@kernel.org> Reviewed-by: Huacai Chen <chenhuacai@loongson.cn> Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn> Link: https://lore.kernel.org/r/d7d9120fc1ca2eb014cda4e481af5add05be0bf6.1748933789.git.zhoubinbin@loongson.cn Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-24mmc: wmt-sdmmc: Use devm_mmc_alloc_host() helperBinbin Zhou
Use new function devm_mmc_alloc_host() to simplify the code. Cc: Alexey Charkov <alchark@gmail.com> Acked-by: Alexey Charkov <alchark@gmail.com> Reviewed-by: Huacai Chen <chenhuacai@loongson.cn> Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn> Link: https://lore.kernel.org/r/81a288603ffc77b39678ef9f5bea7284670e6b60.1748933789.git.zhoubinbin@loongson.cn Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-24mmc: wbsd: Use devm_mmc_alloc_host() helperBinbin Zhou
Use new function devm_mmc_alloc_host() to simplify the code. Cc: Pierre Ossman <pierre@ossman.eu> Reviewed-by: Huacai Chen <chenhuacai@loongson.cn> Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn> Link: https://lore.kernel.org/r/1d1d31ac2d6aff5325748693cb1551d7ae21de30.1748933789.git.zhoubinbin@loongson.cn Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-24mmc: vub300: Use devm_mmc_alloc_host() helperBinbin Zhou
Use new function devm_mmc_alloc_host() to simplify the code. Reviewed-by: Huacai Chen <chenhuacai@loongson.cn> Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn> Link: https://lore.kernel.org/r/f023d2caa02fab405f089c5170b686529857fb70.1748933789.git.zhoubinbin@loongson.cn Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-24mmc: via-sdmmc: Use devm_mmc_alloc_host() helperBinbin Zhou
Use new function devm_mmc_alloc_host() to simplify the code. Reviewed-by: Huacai Chen <chenhuacai@loongson.cn> Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn> Link: https://lore.kernel.org/r/32781a61d729cefcaf15e62df809ce924c504390.1748933789.git.zhoubinbin@loongson.cn Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-24mmc: ushc: Use devm_mmc_alloc_host() helperBinbin Zhou
Use new function devm_mmc_alloc_host() to simplify the code. Reviewed-by: Huacai Chen <chenhuacai@loongson.cn> Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn> Link: https://lore.kernel.org/r/dde4d49481fe0cc6bd3289e9bd4b33433eb27cea.1748933789.git.zhoubinbin@loongson.cn Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-24mmc: usdhi6ro10: Use devm_mmc_alloc_host() helperBinbin Zhou
Use new function devm_mmc_alloc_host() to simplify the code. Cc: Jesper Nilsson <jesper.nilsson@axis.com> Cc: Lars Persson <lars.persson@axis.com> Reviewed-by: Huacai Chen <chenhuacai@loongson.cn> Acked-by: Jesper Nilsson <jesper.nilsson@axis.com> Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn> Link: https://lore.kernel.org/r/e236d2ee9cd6bb9450e3500577eda17c8fb53c1c.1748933789.git.zhoubinbin@loongson.cn Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-24mmc: toshsd: Use devm_mmc_alloc_host() helperBinbin Zhou
Use new function devm_mmc_alloc_host() to simplify the code. Reviewed-by: Huacai Chen <chenhuacai@loongson.cn> Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn> Link: https://lore.kernel.org/r/23c80160c93c868353d2444100a592e8ba5d2f90.1748933789.git.zhoubinbin@loongson.cn Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-24mmc: tifm_sd: Use devm_mmc_alloc_host() helperBinbin Zhou
Use new function devm_mmc_alloc_host() to simplify the code. Cc: Alex Dubov <oakad@yahoo.com> Reviewed-by: Huacai Chen <chenhuacai@loongson.cn> Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn> Link: https://lore.kernel.org/r/84a31172bb4c26e3ef41f99ebb4c37fa101bfaac.1748933789.git.zhoubinbin@loongson.cn Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-24mmc: sh_mmicf: Use devm_mmc_alloc_host() helperBinbin Zhou
Use new function devm_mmc_alloc_host() to simplify the code. Reviewed-by: Huacai Chen <chenhuacai@loongson.cn> Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn> Link: https://lore.kernel.org/r/af6b34130eb98cb60aa7c5f289e2392089faae66.1748933789.git.zhoubinbin@loongson.cn Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-24mmc: sdricoh_cs: Use devm_mmc_alloc_host() helperBinbin Zhou
Use new function devm_mmc_alloc_host() to simplify the code. Reviewed-by: Huacai Chen <chenhuacai@loongson.cn> Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn> Link: https://lore.kernel.org/r/ce16815710f97e853586a0496c315729bd11fb3f.1748933789.git.zhoubinbin@loongson.cn Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-24mmc: rtsx_usb_sdmmc: Use devm_mmc_alloc_host() helperBinbin Zhou
Use new function devm_mmc_alloc_host() to simplify the code. Reviewed-by: Huacai Chen <chenhuacai@loongson.cn> Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn> Link: https://lore.kernel.org/r/c7a39ca44f3b07acdfe8cd7e5250c1cbed8e37ca.1748933789.git.zhoubinbin@loongson.cn Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-24mmc: rtsx_pci: Use devm_mmc_alloc_host() helperBinbin Zhou
Use new function devm_mmc_alloc_host() to simplify the code. Reviewed-by: Huacai Chen <chenhuacai@loongson.cn> Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn> Link: https://lore.kernel.org/r/f18424d5bf8b3055de7d8bcf3918868707086e85.1748933789.git.zhoubinbin@loongson.cn Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-24mmc: pxamci: Use devm_mmc_alloc_host() helperBinbin Zhou
Use new function devm_mmc_alloc_host() to simplify the code. Reviewed-by: Huacai Chen <chenhuacai@loongson.cn> Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn> Link: https://lore.kernel.org/r/3d8a815f898b977f76c7ed07f56185990a34abac.1748933789.git.zhoubinbin@loongson.cn Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-24mmc: owl-mmc: Use devm_mmc_alloc_host() helperBinbin Zhou
Use new function devm_mmc_alloc_host() to simplify the code. Cc: Andreas Färber <afaerber@suse.de> Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Reviewed-by: Huacai Chen <chenhuacai@loongson.cn> Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn> Link: https://lore.kernel.org/r/1b1b9e17c8512d4bdda584e577a69cd6caf2632a.1748933789.git.zhoubinbin@loongson.cn Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-24mmc: omap_hsmmc: Use devm_mmc_alloc_host() helperBinbin Zhou
Use new function devm_mmc_alloc_host() to simplify the code. Reviewed-by: Huacai Chen <chenhuacai@loongson.cn> Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn> Link: https://lore.kernel.org/r/bd5dd68556d8530295bb61dc44ac68b619130d1f.1748933789.git.zhoubinbin@loongson.cn Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-24mmc: omap: Use devm_mmc_alloc_host() helperBinbin Zhou
Use new function devm_mmc_alloc_host() to simplify the code. Cc: Aaro Koskinen <aaro.koskinen@iki.fi> Cc: Allen Pais <allen.lkml@gmail.com> Reviewed-by: Huacai Chen <chenhuacai@loongson.cn> Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn> Link: https://lore.kernel.org/r/f172097638a161d622dcbfbc1ede6d4bb8aeea0c.1748933789.git.zhoubinbin@loongson.cn Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-24mmc: mxs-mmc: Use devm_mmc_alloc_host() helperBinbin Zhou
Use new function devm_mmc_alloc_host() to simplify the code. Cc: Shawn Guo <shawnguo@kernel.org> Cc: Sascha Hauer <s.hauer@pengutronix.de> Cc: Fabio Estevam <festevam@gmail.com> Reviewed-by: Huacai Chen <chenhuacai@loongson.cn> Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn> Link: https://lore.kernel.org/r/8ace670e06536fb5c9e28003d487cde870ee8c47.1748933789.git.zhoubinbin@loongson.cn Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-24mmc: mxcmmc: Use devm_mmc_alloc_host() helperBinbin Zhou
Use new function devm_mmc_alloc_host() to simplify the code. Cc: Shawn Guo <shawnguo@kernel.org> Cc: Sascha Hauer <s.hauer@pengutronix.de> Cc: Fabio Estevam <festevam@gmail.com> Reviewed-by: Huacai Chen <chenhuacai@loongson.cn> Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn> Link: https://lore.kernel.org/r/eb21038ebc81bd0ba9dab4843dce57e4f431fac0.1748933789.git.zhoubinbin@loongson.cn Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-24mmc: mvsdio: Use devm_mmc_alloc_host() helperBinbin Zhou
Use new function devm_mmc_alloc_host() to simplify the code. Cc: Nicolas Pitre <nico@fluxnic.net> Reviewed-by: Huacai Chen <chenhuacai@loongson.cn> Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn> Link: https://lore.kernel.org/r/ec8a37f8007391fb0835ab239f838517632611ad.1748933789.git.zhoubinbin@loongson.cn Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-24mmc: moxart-mmc: Use devm_mmc_alloc_host() helperBinbin Zhou
Use new function devm_mmc_alloc_host() to simplify the code. Reviewed-by: Huacai Chen <chenhuacai@loongson.cn> Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn> Link: https://lore.kernel.org/r/c2bdcea3720b81660b3226180640e32fffefc464.1748933789.git.zhoubinbin@loongson.cn Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-24mmc: mmci: Use devm_mmc_alloc_host() helperBinbin Zhou
Use new function devm_mmc_alloc_host() to simplify the code. Cc: Russell King <linux@armlinux.org.uk> Reviewed-by: Huacai Chen <chenhuacai@loongson.cn> Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn> Link: https://lore.kernel.org/r/f2da882c5c41c25372d82b769506a7dd60fd0d4d.1748933789.git.zhoubinbin@loongson.cn Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-24mmc: meson-mx-sdhc: Use devm_mmc_alloc_host() helperBinbin Zhou
Use new function devm_mmc_alloc_host() to simplify the code. Cc: Neil Armstrong <neil.armstrong@linaro.org> Cc: Kevin Hilman <khilman@baylibre.com> Cc: Jerome Brunet <jbrunet@baylibre.com> Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Cc: linux-amlogic@lists.infradead.org Reviewed-by: Huacai Chen <chenhuacai@loongson.cn> Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn> Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Link: https://lore.kernel.org/r/592c6674a83a80558e55b143c483e29dcbfef1fd.1748933789.git.zhoubinbin@loongson.cn Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-24mmc: litex_mmc: Use devm_mmc_alloc_host() helperBinbin Zhou
Use new function devm_mmc_alloc_host() to simplify the code. Cc: Karol Gugala <kgugala@antmicro.com> Cc: Mateusz Holenko <mholenko@antmicro.com> Cc: Gabriel Somlo <gsomlo@gmail.com> Cc: Joel Stanley <joel@jms.id.au> Reviewed-by: Huacai Chen <chenhuacai@loongson.cn> Acked-by: Gabriel Somlo <gsomlo@gmail.com> Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn> Link: https://lore.kernel.org/r/8eea32bf0fb1ac95497355ccd5ea732ce619238c.1748933789.git.zhoubinbin@loongson.cn Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-24mmc: jz4740: Use devm_mmc_alloc_host() helperBinbin Zhou
Use new function devm_mmc_alloc_host() to simplify the code. Cc: Paul Cercueil <paul@crapouillou.net> Reviewed-by: Huacai Chen <chenhuacai@loongson.cn> Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn> Link: https://lore.kernel.org/r/243cf4d1515028725f08401a55d2a02c15d6c662.1748933789.git.zhoubinbin@loongson.cn Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-24mmc: dw_mmc: Use devm_mmc_alloc_host() helperBinbin Zhou
Use new function devm_mmc_alloc_host() to simplify the code. Cc: Jaehoon Chung <jh80.chung@samsung.com> Reviewed-by: Huacai Chen <chenhuacai@loongson.cn> Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn> Link: https://lore.kernel.org/r/5179b0e39cf2cabbb41ed2de51190913628a7da0.1748933789.git.zhoubinbin@loongson.cn Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-24mmc: davinci_mmc: Use devm_mmc_alloc_host() helperBinbin Zhou
Use new function devm_mmc_alloc_host() to simplify the code. Cc: Bastien Curutchet <bastien.curutchet@bootlin.com> Cc: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Reviewed-by: Huacai Chen <chenhuacai@loongson.cn> Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn> Link: https://lore.kernel.org/r/bbdbdbe746fd227384d562e78bde98fba13f43e7.1748933789.git.zhoubinbin@loongson.cn Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-24mmc: cb710: Use devm_mmc_alloc_host() helperBinbin Zhou
Use new function devm_mmc_alloc_host() to simplify the code. Cc: Michał Mirosław <mirq-linux@rere.qmqm.pl> Acked-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Reviewed-by: Huacai Chen <chenhuacai@loongson.cn> Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn> Link: https://lore.kernel.org/r/4ef97a91053fe8819c651f7968fb56209faa36d8.1748933789.git.zhoubinbin@loongson.cn Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-24mmc: cavium: Use devm_mmc_alloc_host() helperBinbin Zhou
Use new function devm_mmc_alloc_host() to simplify the code. Cc: Robert Richter <rric@kernel.org> Reviewed-by: Huacai Chen <chenhuacai@loongson.cn> Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn> Link: https://lore.kernel.org/r/9a7715ac3045d925cf2e88e23dca7acb17376468.1748933789.git.zhoubinbin@loongson.cn Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-24mmc: bcm2835: Use devm_mmc_alloc_host() helperBinbin Zhou
Use new function devm_mmc_alloc_host() to simplify the code. Cc: Florian Fainelli <florian.fainelli@broadcom.com> Cc: Ray Jui <rjui@broadcom.com> Cc: Scott Branden <sbranden@broadcom.com> Reviewed-by: Huacai Chen <chenhuacai@loongson.cn> Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn> Link: https://lore.kernel.org/r/37a95baec1889f906134deb2dc761a98e950dcd1.1748933789.git.zhoubinbin@loongson.cn Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-24mmc: au1xmmc: Use devm_mmc_alloc_host() helperBinbin Zhou
Use new function devm_mmc_alloc_host() to simplify the code. Cc: Manuel Lauss <manuel.lauss@gmail.com> Reviewed-by: Huacai Chen <chenhuacai@loongson.cn> Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn> Link: https://lore.kernel.org/r/7da94643484f7184be40fa517a8a74ce3cdefe19.1748933789.git.zhoubinbin@loongson.cn Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-24mmc: atmel: Use devm_mmc_alloc_host() helperBinbin Zhou
Use new function devm_mmc_alloc_host() to simplify the code. Cc: Aubin Constans <aubin.constans@microchip.com> Cc: Nicolas Ferre <nicolas.ferre@microchip.com> Cc: Alexandre Belloni <alexandre.belloni@bootlin.com> Cc: Claudiu Beznea <claudiu.beznea@tuxon.dev> Reviewed-by: Huacai Chen <chenhuacai@loongson.cn> Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn> Acked-by: Aubin Constans <aubin.constans@microchip.com> Link: https://lore.kernel.org/r/0688b77b93d27bd2f2e155fca6f53a1766fc3a80.1748933789.git.zhoubinbin@loongson.cn Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-24mmc: alcor: Use devm_mmc_alloc_host() helperBinbin Zhou
Use new function devm_mmc_alloc_host() to simplify the code. Cc: Feng Wei <feng.wei8@zte.com.cn> Cc: Shao Mingyin <shao.mingyin@zte.com.cn> Reviewed-by: Huacai Chen <chenhuacai@loongson.cn> Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn> Link: https://lore.kernel.org/r/fcb69bf45d8ad4c2653c9e5e912ea8aed77fc3a2.1748933789.git.zhoubinbin@loongson.cn Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-24mmc: sdhci: Return void from sdhci_runtime_suspend|resume_host()Adrian Hunter
It does not seem like these functions will ever need the return value, which is presently always zero. Simplify the usage by making the return type 'void' instead. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Link: https://lore.kernel.org/r/20250530165643.141295-1-adrian.hunter@intel.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-24mmc: sdhci-of-k1: disable HW busy detectionYixun Lan
It doesn't make sense to enable HW busy detection in pre_select_hs400(), while disable it later in post_select_hs400(). And the reason behind this isn't clear. Therefore, let's disable it for now. Signed-off-by: Yixun Lan <dlan@gentoo.org> Link: https://lore.kernel.org/r/20250523-21-k1-sdhci-v1-2-9f293116a7e7@gentoo.org Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-24mmc: sdhci-of-k1: make register definition vendor specificYixun Lan
Making register definition less generic which will potentially have less collision with other files. Add SpacemiT vendor prefix to K1 SoC SDHC register definitions, also improve the BIT definitions to reflect them more SDHC specific. Note, there should be no functional changes introduced in this commit. Signed-off-by: Yixun Lan <dlan@gentoo.org> Link: https://lore.kernel.org/r/20250523-21-k1-sdhci-v1-1-9f293116a7e7@gentoo.org Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-24mmc: sdhci-esdhc-imx: optimize clock loopback selection with dummy pad supportLuke Wang
For legacy platforms without dummy pad: When clock <= 100MHz: Set ESDHC_MIX_CTRL_FBCLK_SEL to 0 (external clock pad loopback) for better bus clock proximity. When clock > 100MHz: Set ESDHC_MIX_CTRL_FBCLK_SEL to 1 (internal clock loopback) to avoid signal reflection noise at high frequency. For i.MX94/95 with dummy pad support: Keep ESDHC_MIX_CTRL_FBCLK_SEL at 0 for all speed mode. Hardware automatically substitutes clock pad loopback with dummy pad loopback when available, eliminating signal reflections while preserving better bus clock proximity. Signed-off-by: Luke Wang <ziniu.wang_1@nxp.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Link: https://lore.kernel.org/r/20250521025502.112030-2-ziniu.wang_1@nxp.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-24mmc: sdhci-esdhc-imx: refactor clock loopback selection logicLuke Wang
i.MX reference manual specifies that internal clock loopback should be used for SDR104/HS200/HS400 modes. Move ESDHC_MIX_CTRL_FBCLK_SEL configuration into the timing selection function to: 1. Explicitly set internal loopback path for SDR104/HS200/HS400 modes 2. Avoid redundant bit manipulation across multiple functions Preserve ESDHC_MIX_CTRL_FBCLK_SEL during system resume for SDIO devices with MMC_PM_KEEP_POWER and MMC_PM_WAKE_SDIO_IRQ flag, as the controller might lose register state during suspend while skipping card re-initialization. Signed-off-by: Luke Wang <ziniu.wang_1@nxp.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Link: https://lore.kernel.org/r/20250521025502.112030-1-ziniu.wang_1@nxp.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-24mmc: sdhci-esdhc-imx: Don't change pinctrl in suspend if wakeup sourceHaibo Chen
The pinctrl sleep state may config the pin mux to certain function to save power in system suspend. Unfortunately this doesn't work if usdhc is used as a wakeup source, like waking up on SDIO irqs or card-detect irqs. In these cases, we need pin mux to be configured to usdhc function pad. The issue is found on imx93-11x11-evk board, where WiFI over SDIO with in-band irqs fails to wakeup the system, because the DATA[1] pin has been set to GPIO function. To fix the problem, don't change the pinctrl state in suspend if there is a system wakeup enabled. Signed-off-by: Haibo Chen <haibo.chen@nxp.com> Signed-off-by: Luke Wang <ziniu.wang_1@nxp.com> Link: https://lore.kernel.org/r/20250521033134.112671-1-ziniu.wang_1@nxp.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-24mmc: sdhci-uhs2: Adjust some error messages and register dump for SD UHS-II cardVictor Shih
Adjust some error messages to debug mode and register dump to dynamic debug mode to avoid causing misunderstanding it is an error. Signed-off-by: Victor Shih <victor.shih@genesyslogic.com.tw> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20250606110121.96314-4-victorshihgli@gmail.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-24mmc: sdhci: Add a helper function for dump register in dynamic debug modeVictor Shih
Add a helper function for dump register in dynamic debug mode. Signed-off-by: Victor Shih <victor.shih@genesyslogic.com.tw> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20250606110121.96314-3-victorshihgli@gmail.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-24mmc: core: Adjust some error messages for SD UHS-II cardsVictor Shih
Adjust some error messages to debug mode to avoid causing misunderstanding it is an error. Signed-off-by: Victor Shih <victor.shih@genesyslogic.com.tw> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Fixes: 9a9f7e13952b ("mmc: core: Support UHS-II card control and access") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20250606110121.96314-2-victorshihgli@gmail.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-19mtk-sd: Prevent memory corruption from DMA map failureMasami Hiramatsu (Google)
If msdc_prepare_data() fails to map the DMA region, the request is not prepared for data receiving, but msdc_start_data() proceeds the DMA with previous setting. Since this will lead a memory corruption, we have to stop the request operation soon after the msdc_prepare_data() fails to prepare it. Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Fixes: 208489032bdd ("mmc: mediatek: Add Mediatek MMC driver") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/174972756982.3337526.6755001617701603082.stgit@mhiramat.tok.corp.google.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-09mtk-sd: Fix a pagefault in dma_unmap_sg() for not prepared dataMasami Hiramatsu (Google)
When swiotlb buffer is full, the dma_map_sg() returns 0 to msdc_prepare_data(), but it does not check it and sets the MSDC_PREPARE_FLAG. swiotlb_tbl_map_single() /* prints "swiotlb buffer is full" */ <-swiotlb_map() <-dma_direct_map_page() <-dma_direct_map_sg() <-__dma_map_sg_attrs() <-dma_map_sg_attrs() <-dma_map_sg() /* returns 0 (pages mapped) */ <-msdc_prepare_data() Then, the msdc_unprepare_data() checks MSDC_PREPARE_FLAG and calls dma_unmap_sg() with unmapped pages. It causes a page fault. To fix this problem, Do not set MSDC_PREPARE_FLAG if dma_map_sg() fails because this is not prepared. Fixes: 208489032bdd ("mmc: mediatek: Add Mediatek MMC driver") Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Tested-by: Sergey Senozhatsky <senozhatsky@chromium.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/174908565814.4056588.769599127120955383.stgit@mhiramat.tok.corp.google.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-09mmc: sdhci-of-k1: Fix error code in probe()Dan Carpenter
If spacemit_sdhci_get_clocks() fails, then propagate the error code. Don't return success. Fixes: e5502d15b0f3 ("mmc: sdhci-of-k1: add support for SpacemiT K1 SoC") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Yixun Lan <dlan@gentoo.org> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Link: https://lore.kernel.org/r/aDVTtQdXVtRhxOrb@stanley.mountain Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-09mmc: core: sd: Apply BROKEN_SD_DISCARD quirk earlierAvri Altman
Move the BROKEN_SD_DISCARD quirk for certain SanDisk SD cards from the `mmc_blk_fixups[]` to `mmc_sd_fixups[]`. This ensures the quirk is applied earlier in the device initialization process, aligning with the reasoning in [1]. Applying the quirk sooner prevents the kernel from incorrectly enabling discard support on affected cards during initial setup. [1] https://lore.kernel.org/all/20240820230631.GA436523@sony.com Fixes: 07d2872bf4c8 ("mmc: core: Add SD card quirk for broken discard") Signed-off-by: Avri Altman <avri.altman@sandisk.com> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20250526114445.675548-1-avri.altman@sandisk.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-08treewide, timers: Rename from_timer() to timer_container_of()Ingo Molnar
Move this API to the canonical timer_*() namespace. [ tglx: Redone against pre rc1 ] Signed-off-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/all/aB2X0jCKQO56WdMt@gmail.com
2025-05-29Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsiLinus Torvalds
Pull SCSI updates from James Bottomley: "Updates to the usual drivers (smartpqi, ufs, lpfc, scsi_debug, target, hisi_sas) with the only substantive core change being the removal of the stream_status member from the scsi_stream_status_header (to get rid of flex array members)" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (77 commits) scsi: target: core: Constify struct target_opcode_descriptor scsi: target: core: Constify enabled() in struct target_opcode_descriptor scsi: hisi_sas: Fix warning detected by sparse scsi: mpt3sas: Fix _ctl_get_mpt_mctp_passthru_adapter() to return IOC pointer scsi: sg: Remove unnecessary NULL check before unregister_sysctl_table() scsi: ufs: mcq: Delete ufshcd_release_scsi_cmd() in ufshcd_mcq_abort() scsi: ufs: qcom: dt-bindings: Document the SM8750 UFS Controller scsi: mvsas: Fix typos in SAS/SATA VSP register comments scsi: fnic: Replace memset() with eth_zero_addr() scsi: ufs: core: Support updating device command timeout scsi: ufs: core: Change hwq_id type and value scsi: ufs: core: Increase the UIC command timeout further scsi: zfcp: Simplify workqueue allocation scsi: ufs: core: Print error value as hex format in ufshcd_err_handler() scsi: sd: Remove the stream_status member from scsi_stream_status_header scsi: docs: Clean up some style in scsi_mid_low_api scsi: core: Remove unused scsi_dev_info_list_del_keyed() scsi: isci: Remove unused sci_remote_device_reset() scsi: scsi_debug: Reduce DEF_ATOMIC_WR_MAX_LENGTH scsi: smartpqi: Delete a stray tab in pqi_is_parity_write_stream() ...