mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Improve eMMC performance for the StarFive JHB100 SoC
@ 2026-11-04 11:26 Changhuang Liang
  2026-11-04 11:26 ` [PATCH v2 1/2] mmc: cqhci: Add support for setting command idle time in nanoseconds Changhuang Liang
  2026-11-04 11:26 ` [PATCH v2 2/2] mmc: sdhci-of-dwcmshc: Set CQHCI command idle time for StarFive JHB100 Changhuang Liang
  0 siblings, 2 replies; 3+ messages in thread
From: Changhuang Liang @ 2026-11-04 11:26 UTC (permalink / raw)
  To: Asutosh Das, Ritesh Harjani, Ulf Hansson, Adrian Hunter, Shawn Lin
  Cc: linux-mmc, linux-kernel, Changhuang Liang

This series implements a generic interface to configure CIT based on
time (ns). Different platforms can improve MMC performance by
configuring their respective CIT. This series has been tested on the
JHB100 SoC.

before:
dd if=/dev/mmcblk0 of=/dev/null bs=1M count=800
838860800 bytes (839 MB, 800 MiB) copied, 9.38511 s, 89.4 MB/s
dd if=/dev/zero of=/dev/mmcblk0 bs=1M count=800
838860800 bytes (839 MB, 800 MiB) copied, 12.2127 s, 68.7 MB/s

after:
dd if=/dev/mmcblk0 of=/dev/null bs=1M count=800
838860800 bytes (839 MB, 800 MiB) copied, 3.19472 s, 263 MB/s
dd if=/dev/zero of=/dev/mmcblk0 bs=1M count=800
838860800 bytes (839 MB, 800 MiB) copied, 10.7587 s, 78.0 MB/s

Changes since v1:

Patch 1:
- Add a cit field to struct cqhci_host.
- cqhci_set_cmd_idle_time() caches cit in cq_host->cit.
- __cqhci_enable() applies the cached CIT value to CQHCI_SSC1
  (only when non-zero).

Patch 2:
- dwcmshc_cqhci_init() calls cqhci_set_cmd_idle_time() once at
  init time when cqhci_cit_ns is set.
- Replace the JHB100-specific pre_enable hook (dwcmshc_starfive_jhb100_pre_enable)
  and its private cqhci_host_ops with a new cqhci_cit_ns field in
  struct dwcmshc_pltfm_data.
- sets .cqhci_cit_ns = JHB100_CQHCI_CIT_NS.

v1: https://lore.kernel.org/all/20261014121222.31385-1-changhuang.liang@starfivetech.com/

Changhuang Liang (2):
  mmc: cqhci: Add support for setting command idle time in nanoseconds
  mmc: sdhci-of-dwcmshc: Set CQHCI command idle time for StarFive JHB100

 drivers/mmc/host/cqhci-core.c       | 64 +++++++++++++++++++++++++++++
 drivers/mmc/host/cqhci.h            |  8 ++++
 drivers/mmc/host/sdhci-of-dwcmshc.c | 12 ++++++
 3 files changed, 84 insertions(+)

--
2.25.1

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

end of thread, other threads:[~2026-11-04 11:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-04 11:26 [PATCH v2 0/2] Improve eMMC performance for the StarFive JHB100 SoC Changhuang Liang
2026-11-04 11:26 ` [PATCH v2 1/2] mmc: cqhci: Add support for setting command idle time in nanoseconds Changhuang Liang
2026-11-04 11:26 ` [PATCH v2 2/2] mmc: sdhci-of-dwcmshc: Set CQHCI command idle time for StarFive JHB100 Changhuang Liang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®