]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
clk: sunxi-ng: d1: Add missing divider for MMC mod clocks
authorAndre Przywara <andre.przywara@arm.com>
Thu, 1 May 2025 12:06:31 +0000 (13:06 +0100)
committerChen-Yu Tsai <wens@csie.org>
Tue, 13 May 2025 16:40:13 +0000 (00:40 +0800)
commit98e6da673cc6dd46ca9a599802bd2c8f83606710
treea3dc320ead144000f66b3849f40f697e660dc352
parent4a9c3c3215491f25bc66d615faa921c814b1a479
clk: sunxi-ng: d1: Add missing divider for MMC mod clocks

The D1/R528/T113 SoCs have a hidden divider of 2 in the MMC mod clocks,
just as other recent SoCs. So far we did not describe that, which led
to the resulting MMC clock rate to be only half of its intended value.

Use a macro that allows to describe a fixed post-divider, to compensate
for that divisor.

This brings the MMC performance on those SoCs to its expected level,
so about 23 MB/s for SD cards, instead of the 11 MB/s measured so far.

Fixes: 35b97bb94111 ("clk: sunxi-ng: Add support for the D1 SoC clocks")
Reported-by: Kuba SzczodrzyƄski <kuba@szczodrzynski.pl>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Link: https://patch.msgid.link/20250501120631.837186-1-andre.przywara@arm.com
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
drivers/clk/sunxi-ng/ccu-sun20i-d1.c
drivers/clk/sunxi-ng/ccu_mp.h