]> git.dujemihanovic.xyz Git - u-boot.git/commit
mmc: exynos_dw_mmc: Refactor fixed CIU clock divider
authorSam Protsenko <semen.protsenko@linaro.org>
Thu, 8 Aug 2024 03:14:31 +0000 (22:14 -0500)
committerMinkyu Kang <mk7.kang@samsung.com>
Mon, 19 Aug 2024 07:09:06 +0000 (16:09 +0900)
commit56ba9455a5dc2faaf409aa4e403576ec9b85ac6c
treec150837ed5ba1099cc9c5178b70b48c71814a949
parenta95b726e2e4a35de9b9694869293e40d3c82d754
mmc: exynos_dw_mmc: Refactor fixed CIU clock divider

Some chips like Exynos4412 have fixed internal CIU clock divider.
Instead of reading it from non-standard "div" dts property, store its
value in the driver internally, in static chip data associated with
corresponding compatible. This makes it possible to avoid using
host->div for storing it, so the latter can be removed safely. Also
create a helper function called exynos_dwmmc_get_ciu_div() for getting
the current div value: in case the fixed div is provided in the chip
data it will be used, otherwise the current div value is being read from
CLKSEL register.

The insights for this change were taken from dw_mmc-exynos.c driver in
Linux kernel.

No functional change.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
drivers/mmc/ca_dw_mmc.c
drivers/mmc/exynos_dw_mmc.c
include/dwmmc.h