| From: |
| Sergey Khimich <serghox-AT-gmail.com> |
| To: |
| linux-kernel-AT-vger.kernel.org |
| Subject: |
| [PATCH v3 0/2] mmc: sdhci-of-dwcmshc: Add CQE support |
| Date: |
| Mon, 02 Oct 2023 14:32:59 +0300 |
| Message-ID: |
| <20231002113301.1531717-1-serghox@gmail.com> |
| Cc: |
| linux-mmc-AT-vger.kernel.org, Adrian Hunter <adrian.hunter-AT-intel.com>, Ulf Hansson <ulf.hansson-AT-linaro.org>, Philipp Zabel <p.zabel-AT-pengutronix.de>, Shawn Lin <shawn.lin-AT-rock-chips.com>, Jyan Chou <jyanchou-AT-realtek.com> |
| Archive-link: |
| Article |
Hello!
This is implementation of SDHCI CQE support for sdhci-of-dwcmshc driver.
For enabling CQE support just set 'supports-cqe' in your DevTree file
for appropriate mmc node.
Also, while implementing CQE support for the driver, I faced with a problem
which I will describe below.
According to the IP block documentation CQE works only with "AMDA-2 only"
mode which is activated only with v4 mode enabled. I see in dwcmshc_probe()
function that v4 mode gets enabled only for 'sdhci_dwcmshc_bf3_pdata' platform data.
So my question is: is it correct to enable v4 mode for all platform data
if 'SDHCI_CAN_64BIT_V4' bit is set in hw?
Because I`m afraid that enabling v4 mode for some platforms could break
them down. On the other hand, if host controller says that it can do v4
(caps & SDHCI_CAN_64BIT_V4), lets do v4 or disable it manualy by some
quirk. Anyway - RFC.
v2:
- Added dwcmshc specific cqe_disable hook to prevent losing
in-flight cmd when an ioctl is issued and cqe_disable is called;
- Added processing 128Mb boundary for the host memory data buffer size
and the data buffer. For implementing this processing an extra
callback is added to the struct 'sdhci_ops'.
- Fixed typo.
v3:
- Fix warning reported by kernel test robot:
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202309270807.VoVn81...
| Closes: https://lore.kernel.org/oe-kbuild-all/202309300806.dcR19k...
Thanks in advance, Sergey.
Sergey Khimich (2):
mmc: cqhci: Add cqhci_set_tran_desc() callback
Implement SDHCI CQE support for DesignWare SDHCI.
drivers/mmc/host/Kconfig | 1 +
drivers/mmc/host/cqhci-core.c | 5 +
drivers/mmc/host/cqhci.h | 4 +
drivers/mmc/host/sdhci-of-dwcmshc.c | 233 +++++++++++++++++++++++++++-
4 files changed, 241 insertions(+), 2 deletions(-)
--
2.30.2