Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mmc: sdhci-of-k1: spacemit: Add support for K3 SoC

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>

authored by

Yixun Lan and committed by
Ulf Hansson
1e9f43a1 b4206966

+17 -2
+17 -2
drivers/mmc/host/sdhci-of-k1.c
··· 259 259 SDHCI_QUIRK2_PRESET_VALUE_BROKEN, 260 260 }; 261 261 262 + static const struct sdhci_pltfm_data spacemit_sdhci_k3_pdata = { 263 + .ops = &spacemit_sdhci_ops, 264 + .quirks = SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK | 265 + SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC | 266 + SDHCI_QUIRK_32BIT_ADMA_SIZE | 267 + SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN | 268 + SDHCI_QUIRK_BROKEN_CARD_DETECTION | 269 + SDHCI_QUIRK_BROKEN_TIMEOUT_VAL, 270 + .quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN, 271 + }; 272 + 262 273 static const struct of_device_id spacemit_sdhci_of_match[] = { 263 - { .compatible = "spacemit,k1-sdhci" }, 274 + { .compatible = "spacemit,k1-sdhci", .data = &spacemit_sdhci_k1_pdata }, 275 + { .compatible = "spacemit,k3-sdhci", .data = &spacemit_sdhci_k3_pdata }, 264 276 { /* sentinel */ } 265 277 }; 266 278 MODULE_DEVICE_TABLE(of, spacemit_sdhci_of_match); ··· 283 271 struct spacemit_sdhci_host *sdhst; 284 272 struct sdhci_pltfm_host *pltfm_host; 285 273 struct sdhci_host *host; 274 + const struct sdhci_pltfm_data *data; 286 275 struct mmc_host_ops *mops; 287 276 int ret; 288 277 289 - host = sdhci_pltfm_init(pdev, &spacemit_sdhci_k1_pdata, sizeof(*sdhst)); 278 + data = of_device_get_match_data(&pdev->dev); 279 + 280 + host = sdhci_pltfm_init(pdev, data, sizeof(*sdhst)); 290 281 if (IS_ERR(host)) 291 282 return PTR_ERR(host); 292 283