From: Andre Przywara <andre.przywara@arm.com>
To: Peng Fan <peng.fan@nxp.com>,
Jaehoon Chung <jh80.chung@samsung.com>,
Tom Rini <trini@konsulko.com>
Cc: "Simon Glass" <sjg@chromium.org>,
"Kuba Szczodrzyński" <kuba@szczodrzynski.pl>,
"Jernej Skrabec" <jernej.skrabec@gmail.com>,
"Icenowy Zheng" <icenowy@aosc.io>,
u-boot@lists.denx.de, linux-sunxi@lists.linux.dev
Subject: [PATCH 0/2] sunxi: clk/mmc: Fix T113-s3 MMC performance
Date: Wed, 26 Feb 2025 11:37:10 +0000 [thread overview]
Message-ID: <20250226113712.1257061-1-andre.przywara@arm.com> (raw)
Hi,
as Kuba reported, the MMC performance of the Allwinner T113-s3 chips in
mainline Linux is only half of what's expected. Checking that in U-Boot
revealed that's actually only one fourth there, since on top of the same
bug as in the kernel, we also calculate the base PLL frequency wrongly.
Fix that by halving the frequency as reported by the clock function, and
apply an extra divider of two in the MMC code - to compensate for that
missing hidden divider (which is the same bug as in Linux).
Seeing only one fourth of the base frequency makes the calculated
internal divider go up by the factor of 4, so we get the MMC performance
back its expected levels: from around 5.8 MB/s to ~23 MB/s.
Cheers,
Andre
Andre Przywara (2):
sunxi: mmc: Fix T113-s3 MMC clock divider
sunxi: sun50i_h6: clock: fix PLL_PERIPH0 rate calculation
arch/arm/mach-sunxi/clock_sun50i_h6.c | 15 ++++++++++-----
drivers/mmc/sunxi_mmc.c | 7 +++++++
2 files changed, 17 insertions(+), 5 deletions(-)
--
2.25.1
next reply other threads:[~2025-02-26 11:37 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-26 11:37 Andre Przywara [this message]
2025-02-26 11:37 ` [PATCH 1/2] sunxi: mmc: Fix T113-s3 MMC clock divider Andre Przywara
2025-02-26 15:54 ` Jernej Škrabec
2025-02-27 0:31 ` Peng Fan
2025-02-27 2:23 ` Tom Rini
2025-02-27 2:25 ` Peng Fan
2025-02-26 11:37 ` [PATCH 2/2] sunxi: sun50i_h6: clock: fix PLL_PERIPH0 rate calculation Andre Przywara
2025-02-26 15:54 ` Jernej Škrabec
2025-02-27 0:33 ` Peng Fan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250226113712.1257061-1-andre.przywara@arm.com \
--to=andre.przywara@arm.com \
--cc=icenowy@aosc.io \
--cc=jernej.skrabec@gmail.com \
--cc=jh80.chung@samsung.com \
--cc=kuba@szczodrzynski.pl \
--cc=linux-sunxi@lists.linux.dev \
--cc=peng.fan@nxp.com \
--cc=sjg@chromium.org \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox