]> 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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Jun 2025 12:40:19 +0000 (14:40 +0200)
commitc4bfea4b611d3c627f49d0ad3163d85901a38692
treea056a5193aad2fdff0f2aa265290190f684dbeca
parent8509fb9dec13ef29a8e4cc5b8cbee9293c716c9e
clk: sunxi-ng: d1: Add missing divider for MMC mod clocks

[ Upstream commit 98e6da673cc6dd46ca9a599802bd2c8f83606710 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/clk/sunxi-ng/ccu-sun20i-d1.c
drivers/clk/sunxi-ng/ccu_mp.h