mmc: sdhci-s3c: Choose sdhci_ops based on variant
authorKrzysztof Kozlowski <krzk@kernel.org>
Sun, 14 Apr 2024 14:07:35 +0000 (16:07 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Fri, 26 Apr 2024 04:47:04 +0000 (06:47 +0200)
commite4c0277902bc16e7096869733d5e96a7fc60454d
tree9da6b60348bde40e9bf156341aedd27bbc9bb43c
parent24922c1a5cc8731bdb126d35efb71c9b4a2f52e7
mmc: sdhci-s3c: Choose sdhci_ops based on variant

The difference between old S3C64xx and newer Exynos4 SDHCI controller
variants is in clock handling (the "no_divider" field in drvdata).
Choose the proper sdhci_ops based on the variant instead of patching
ops in probe, if Exynos4 is used.

This allows making struct sdhci_ops const for code safety and probably
opens further options in the future, as the dynamic pointer ops table is
not anymore that dynamic.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20240414-mmc-const-sdhci-ops-v2-5-262f81faadac@kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci-s3c.c