Commit Graph

6 Commits

Author SHA1 Message Date
Ulf Hansson
7531f57041 mmc: Merge branch fixes into next
Merge the mmc fixes for v6.16-rc[n] into the next branch, to allow them to
get tested together with the new mmc changes that are targeted for v6.17.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-24 12:43:55 +02:00
Binbin Zhou
da94d533ec mmc: sdhci-of-k1: Drop the use of sdhci_pltfm_free()
Since the devm_mmc_alloc_host() helper is already in use,
sdhci_pltfm_free() is no longer needed.

Cc: Yixun Lan <dlan@gentoo.org>
Cc: linux-riscv@lists.infradead.org
Cc: spacemit@lists.linux.dev
Reviewed-by: Yixun Lan <dlan@gentoo.org>
Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
Link: https://lore.kernel.org/r/e98c6383c82a0af2dce6d07645c9fecd53de8767.1749127796.git.zhoubinbin@loongson.cn
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-24 12:43:25 +02:00
Yixun Lan
7613b9b108 mmc: sdhci-of-k1: disable HW busy detection
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-24 12:43:22 +02:00
Yixun Lan
eed50f48d7 mmc: sdhci-of-k1: make register definition vendor specific
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-24 12:43:22 +02:00
Dan Carpenter
3358b836d4 mmc: sdhci-of-k1: Fix error code in probe()
If spacemit_sdhci_get_clocks() fails, then propagate the error code.
Don't return success.

Fixes: e5502d15b0 ("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-09 15:20:01 +02:00
Yixun Lan
e5502d15b0 mmc: sdhci-of-k1: add support for SpacemiT K1 SoC
The SDHCI controller found in SpacemiT K1 SoC features SD,
SDIO, eMMC support, such as:

- Compatible for 4-bit SDIO 3.0 UHS-I protocol, up to SDR104
- Compatible for 4-bit SD 3.0 UHS-I protocol, up to SDR104
- Compatible for 8bit eMMC5.1, up to HS400

Signed-off-by: Yixun Lan <dlan@gentoo.org>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20250509-20-k1-sdhci-v3-2-526c35feaa20@gentoo.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-05-19 13:40:06 +02:00