From: Andre Przywara <andre.przywara@arm.com>
To: Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>, Chen-Yu Tsai <wens@csie.org>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Samuel Holland <samuel@sholland.org>
Cc: "Maxime Ripard" <mripard@kernel.org>,
"Kuba Szczodrzyński" <kuba@szczodrzynski.pl>,
linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-sunxi@lists.linux.dev
Subject: [PATCH 0/2] clk: sunxi-ng: d1: Fix halved MMC frequency
Date: Wed, 26 Feb 2025 10:37:32 +0000 [thread overview]
Message-ID: <20250226103734.1252013-1-andre.przywara@arm.com> (raw)
Hi,
as Kuba reported, on an Allwinner T113-s3 based board the SD card
performance is only half of what we expect: ~11 MB/s instead of the
usual 23 MB/s.
Looking at our MMC mod clock definition, this seems to be due to a
missing fixed (and hidden) divider of 2, a "feature" of every other
Allwinner SoC from the last 10 years.
Patch 2/2 changes the MMC mod clock definition to carry this post_div
of 2, in line with the A64, H6, A100, and H616 SoCs.
Since the D1 clock driver describes clock parents using an array of
pointers, we need to use a new macro that allows both parent_data and
post_div to be specified. This is also needed by the new A523 clocks,
so I lifted the patch from there[1]. Chen-Yu reviewed that one already,
but I made some changes to make the macro more flexible, so I dropped
his tag.
I couldn't test this on a D1 board, so I'd be grateful if someone could
confirm that the SD card performance is now as expected. I simply used
"hdparm -t" to get a ballpark number of read performance, but any other
benchmark or even a timed file copy should do.
Thanks to Kuba for the report!
Cheers,
Andre
[1]
https://lore.kernel.org/linux-sunxi/20250214125359.5204-1-andre.przywara@arm.com/T/#m9adaa1fcea09185c561f3fd01ba895fa67af456c
Andre Przywara (2):
clk: sunxi-ng: mp: provide wrapper for setting feature flags
clk: sunxi-ng: d1: Add missing divider for MMC mod clocks
drivers/clk/sunxi-ng/ccu-sun20i-d1.c | 43 ++++++++++++++++------------
drivers/clk/sunxi-ng/ccu_mp.h | 19 ++++++++++--
2 files changed, 42 insertions(+), 20 deletions(-)
--
2.25.1
next reply other threads:[~2025-02-26 11:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-26 10:37 Andre Przywara [this message]
2025-02-26 10:37 ` [PATCH 1/2] clk: sunxi-ng: mp: provide wrapper for setting feature flags Andre Przywara
2025-02-26 16:00 ` Jernej Škrabec
2025-02-26 10:37 ` [PATCH 2/2] clk: sunxi-ng: d1: Add missing divider for MMC mod clocks Andre Przywara
2025-02-26 16:06 ` Jernej Škrabec
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=20250226103734.1252013-1-andre.przywara@arm.com \
--to=andre.przywara@arm.com \
--cc=jernej.skrabec@gmail.com \
--cc=kuba@szczodrzynski.pl \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=mripard@kernel.org \
--cc=mturquette@baylibre.com \
--cc=samuel@sholland.org \
--cc=sboyd@kernel.org \
--cc=wens@csie.org \
/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