Skip to content

mmc: meson-gx: add dram-access-quirk support

Neil Armstrong linux-amlogic linux-arm-kernel linux-devicetree linux-mmc lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 3 repliesIn review
  2. v13 patches 15 repliesSuperseded

Changes in v2 from the cover letter

* use DRAM instead of DDR, added details in bindings on internal DMA controller
* fix probe() to not try to unallocate bounce buffer on error
* replace DT patch adding SDIO property to patch adding SDIO controller

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3dt-bindings: mmc: meson-gx: add dram-access-quirk propertyDocumentation/devicetree/bindings/mmc/amlogic,meson-gx.txt+4 -01 reply
2/3mmc: meson-gx: add dram-access-quirkdrivers/mmc/host/meson-gx-mmc.c+55 -151 reply
3/3arm64: dts: meson: g12a: add SDIO controllerarch/arm64/boot/dts/amlogic/meson-g12a.dtsi+37 -01 reply

Reviews trailers per patch

2 of 3 patches have a Reviewed-by or Acked-by.

PatchMartin BlumenstinglKevin HilmanGuillaume La Roque
1/3R-b
2/3R-b T-b
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v2 thread

Cover letter [PATCH v2 0/3] mmc: meson-gx: add dram-access-quirk support

On the Amlogic G12A SoC family, (only) the SDIO controller fails to access the data from DRAM, leading to a broken controller.

Add the amlogic,ddr-access-quirk property so signal this particular controller has this bug and needs a quirk to work properly.

But each MMC controller has 1,5KiB of SRAM after the registers, that can be used as bounce buffer to avoid direct DDR access from the integrated DMAs (this SRAM may be used by the boot ROM when DRAM is not yet initialized).

The quirk is to disable the chained descriptor for this controller, and use this SRAM memory zone as buffer for the bounce buffer fallback mode.

The performance hit hasn't been evaluated, but the fix has been tested using a WiFi AP6398S SDIO module, and the iperf3 Bandwidth measurement gave 55.2 Mbits/sec over a 63 Hours long test, with the SDIO ios set as High-Speed at 50MHz clock. It gave around 170 Mbits/sec as SDR104 and 200MHz clock.

Changes since v1:
* use DRAM instead of DDR, added details in bindings on internal DMA controller
* fix probe() to not try to unallocate bounce buffer on error
* replace DT patch adding SDIO property to patch adding SDIO controller

Jerome Brunet (1):
arm64: dts: meson: g12a: add SDIO controller

Neil Armstrong (2):
dt-bindings: mmc: meson-gx: add dram-access-quirk property
mmc: meson-gx: add dram-access-quirk

 .../bindings/mmc/amlogic,meson-gx.txt         |  4 ++
 arch/arm64/boot/dts/amlogic/meson-g12a.dtsi   | 37 ++++++++++
 drivers/mmc/host/meson-gx-mmc.c               | 70 +++++++++++++++----
 3 files changed, 96 insertions(+), 15 deletions(-)
Signature · 1 line
2.21.0