linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] [1/3] mmc: core: expose MMC_CAP2_CQE* to dt
@ 2019-11-01  6:43 Chun-Hung Wu
  2019-11-01  6:43 ` [PATCH 2/3] [2/3] mmc: mediatek: command queue support Chun-Hung Wu
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Chun-Hung Wu @ 2019-11-01  6:43 UTC (permalink / raw)
  To: Chaotian Jing, Ulf Hansson, Rob Herring, Mark Rutland,
	Matthias Brugger, Linus Walleij, Pavel Machek, Kate Stewart,
	Greg Kroah-Hartman, Martin Blumenstingl, Pan Bian,
	Thomas Gleixner, Stanley Chu, Kuohong Wang
  Cc: linux-kernel, linux-mmc, linux-mediatek, devicetree,
	wsd_upstream, linux-arm-kernel, Chun-Hung Wu

Expose MMC_CAP2_CQE and MMC_CAP2_CQE_DCMD
to host->caps2 if
1. "supports-cqe" is defined in dt and
2. "disable-cqe-dcmd" is not defined in dt.

Change-Id: I3d172e6bcfac34520c3932a6f8df2e20f2c0d05b
CR-Id:
Feature:
Signed-off-by: Chun-Hung Wu <chun-hung.wu@mediatek.com>
---
 drivers/mmc/core/host.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c
index 105b7a7..efb0dbe 100644
--- a/drivers/mmc/core/host.c
+++ b/drivers/mmc/core/host.c
@@ -319,6 +319,14 @@ int mmc_of_parse(struct mmc_host *host)
 		host->caps2 |= MMC_CAP2_NO_SD;
 	if (device_property_read_bool(dev, "no-mmc"))
 		host->caps2 |= MMC_CAP2_NO_MMC;
+	if (device_property_read_bool(dev, "supports-cqe"))
+		host->caps2 |= MMC_CAP2_CQE;
+
+	/* Must be after "supports-cqe" check */
+	if (!device_property_read_bool(dev, "disable-cqe-dcmd")) {
+		if (host->caps2 & MMC_CAP2_CQE)
+			host->caps2 |= MMC_CAP2_CQE_DCMD;
+	}
 
 	/* Must be after "non-removable" check */
 	if (device_property_read_u32(dev, "fixed-emmc-driver-type", &drv_type) == 0) {
-- 
1.9.1

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

end of thread, other threads:[~2020-02-04  1:02 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-01  6:43 [PATCH 1/3] [1/3] mmc: core: expose MMC_CAP2_CQE* to dt Chun-Hung Wu
2019-11-01  6:43 ` [PATCH 2/3] [2/3] mmc: mediatek: command queue support Chun-Hung Wu
2019-11-11 13:37   ` Ulf Hansson
2020-02-04  1:01     ` Chun-Hung Wu
2019-11-01  6:43 ` [PATCH 3/3] [3/3] dt-bindings: mmc: mediatek: Add document for mt6779 Chun-Hung Wu
2019-11-06  4:17   ` Rob Herring
2019-11-06  8:07     ` Chun-Hung Wu
2019-11-11 13:04 ` [PATCH 1/3] [1/3] mmc: core: expose MMC_CAP2_CQE* to dt Ulf Hansson
2020-02-04  0:44   ` Chun-Hung Wu

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