linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] mmc: xenon-sdhci: Try to fix 2G address limitation on AC5 SoC
@ 2022-08-06  8:58 Vadym Kochan
  2022-08-06  8:58 ` [PATCH 1/3] dt-bindings: mmc: xenon: Add compatible string for Xenon SDHCI " Vadym Kochan
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Vadym Kochan @ 2022-08-06  8:58 UTC (permalink / raw)
  To: Hu Ziji, Ulf Hansson, Rob Herring, Krzysztof Kozlowski,
	Adrian Hunter, Vadym Kochan, linux-mmc, devicetree, linux-kernel
  Cc: Elad Nachman

There is a limitation on AC5 SoC that Xenon SDHC can address only
first 2GB of memory. Turning to the SDMA mode to use the bounce_buffer
causes ext_csd recognition to fail on init.

Using of swiotlb=force also does not help as it is allocated at the
end of the memory.

So it was decided to use reserved-memory as a bounce buffer in case
if the board has more than 2G of memory, or turn on the PIO
mode if such memory region does not exist in the device-tree.
There is a custom property which is used to attach bounce memory region
to the device on demand (only if more 2G memory is used). This is a software
property only so it was not described in the dt-bindings.

Separate DTSI is added to reserve memory only for boards with eMMC cards.

It was tested that this approach is 1.5 times faster than PIO.

Vadym Kochan (3):
  dt-bindings: mmc: xenon: Add compatible string for Xenon SDHCI on AC5
    SoC
  mmc: sdhci-xenon: Try to fix 2G address limitation on AC5 SoC
  arm64: dts: marvell: Add DTSI to fix Xenon SDHCI 2G limitation on AC5
    SoC

 .../bindings/mmc/marvell,xenon-sdhci.yaml     |  3 ++
 .../boot/dts/marvell/ac5-98dx25xx-sdhci.dtsi  | 40 +++++++++++++++++++
 drivers/mmc/host/sdhci-xenon.c                | 36 +++++++++++++++++
 3 files changed, 79 insertions(+)
 create mode 100644 arch/arm64/boot/dts/marvell/ac5-98dx25xx-sdhci.dtsi

-- 
2.17.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-08-08  9:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-06  8:58 [PATCH 0/3] mmc: xenon-sdhci: Try to fix 2G address limitation on AC5 SoC Vadym Kochan
2022-08-06  8:58 ` [PATCH 1/3] dt-bindings: mmc: xenon: Add compatible string for Xenon SDHCI " Vadym Kochan
2022-08-08  9:18   ` Krzysztof Kozlowski
2022-08-06  8:58 ` [PATCH 2/3] mmc: sdhci-xenon: Try to fix 2G address limitation " Vadym Kochan
2022-08-08  9:20   ` Krzysztof Kozlowski
2022-08-06  8:58 ` [PATCH 3/3] arm64: dts: marvell: Add DTSI to fix Xenon SDHCI 2G " Vadym Kochan
2022-08-08  9:21   ` Krzysztof Kozlowski

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).