From: Andre Przywara <andre.przywara@arm.com>
To: Jagan Teki <jagan@amarulasolutions.com>, Peng Fan <peng.fan@nxp.com>
Cc: u-boot@lists.denx.de, Jernej Skrabec <jernej.skrabec@gmail.com>,
Samuel Holland <samuel@sholland.org>,
Ondrej Jirman <megous@megous.com>,
linux-sunxi@lists.linux.dev
Subject: [PATCH 0/8] sunxi: mmc: Fixes and speed increase
Date: Tue, 25 May 2021 00:30:21 +0100 [thread overview]
Message-ID: <20210524233029.16417-1-andre.przywara@arm.com> (raw)
While debugging some eMMC problem on the H616 SoC, I stumbled upon some
weird code in the Allwinner MMC driver. Some closer inspection and some
help from Ondrej later this series of fixes emerged:
Some patches remove part of the #ifdef hell we needlessly had in the
driver.
A big chunk is around the "new timing mode", which all "newer" SoCs
(since around 2015) have, and which requires some extra bit to be set. We
didn't enable this mode for all SoCs, this is now fixed in patches 3-6.
Patch 7 fixes a big performance problem we had due to using MMIO accesses
for the actual data transfer, as opposed to DMA transfers used in Linux.
Short from adding a lot of code to use DMA as well, we can actually halve
the number of MMIO accesses on reads, effectively doubling the bus
transfer performance. This helps the H6 a lot, but also improves the eMMC
read performance.
The final patch makes use of some generic MMC DT code, to parse generic
DT properties. This allows us to remove sunxi specific code, but also
adds support for "broken-cd" and more advanced MMC speed modes.
Please have a look and test this code on as many boards as possible.
While a performance increase is nice, we don't want to risk data
integrity over this, so please try to verify that it still works for
you.
Cheers,
Andre.
P.S. Patches 5 and 6 use different approaches to differentiate between
SoCs specific quirks: Patch 5/8 selects an explicit symbol from the
SoC specific sections in our Kconfig file, while patch 6/8 compares
the selected SoC type in the C code. Please let me know which approach
is better, I can then use this for both patches (and in the future).
Andre Przywara (8):
mmc: sunxi: Avoid #ifdefs in delay and width setup
mmc: sunxi: Fix warnings with CONFIG_PHYS_64BIT
mmc: sunxi: Fix MMC clock parent selection
mmc: sunxi: Cleanup "new timing mode" selection
mmc: sunxi: Enable "new timing mode" on all new SoCs
mmc: sunxi: Cleanup and fix self-calibration code
mmc: sunxi: Increase MMIO FIFO read performance
mmc: sunxi: Use mmc_of_parse()
.../include/asm/arch-sunxi/clock_sun50i_h6.h | 2 +-
arch/arm/include/asm/arch-sunxi/mmc.h | 1 +
arch/arm/mach-sunxi/Kconfig | 3 +
drivers/mmc/sunxi_mmc.c | 160 +++++++++++-------
4 files changed, 102 insertions(+), 64 deletions(-)
--
2.17.5
next reply other threads:[~2021-05-24 23:30 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-24 23:30 Andre Przywara [this message]
2021-05-24 23:30 ` [PATCH 1/8] mmc: sunxi: Avoid #ifdefs in delay and width setup Andre Przywara
2021-05-25 1:42 ` Jaehoon Chung
2021-05-24 23:30 ` [PATCH 2/8] mmc: sunxi: Fix warnings with CONFIG_PHYS_64BIT Andre Przywara
2021-05-25 1:43 ` Jaehoon Chung
2021-05-24 23:30 ` [PATCH 3/8] mmc: sunxi: Fix MMC clock parent selection Andre Przywara
2021-05-24 23:30 ` [PATCH 4/8] mmc: sunxi: Cleanup "new timing mode" selection Andre Przywara
2021-05-25 1:43 ` Jaehoon Chung
2021-05-24 23:30 ` [PATCH 5/8] mmc: sunxi: Enable "new timing mode" on all new SoCs Andre Przywara
2021-05-24 23:30 ` [PATCH 6/8] mmc: sunxi: Cleanup and fix self-calibration code Andre Przywara
2021-05-24 23:30 ` [PATCH 7/8] mmc: sunxi: Increase MMIO FIFO read performance Andre Przywara
2021-05-24 23:30 ` [PATCH 8/8] mmc: sunxi: Use mmc_of_parse() Andre Przywara
2021-05-25 1:43 ` Jaehoon Chung
2021-07-03 23:24 ` [PATCH 0/8] sunxi: mmc: Fixes and speed increase Andre Przywara
2021-07-04 19:56 ` Samuel Holland
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=20210524233029.16417-1-andre.przywara@arm.com \
--to=andre.przywara@arm.com \
--cc=jagan@amarulasolutions.com \
--cc=jernej.skrabec@gmail.com \
--cc=linux-sunxi@lists.linux.dev \
--cc=megous@megous.com \
--cc=peng.fan@nxp.com \
--cc=samuel@sholland.org \
--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;
as well as URLs for NNTP newsgroup(s).