[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1581921111-24172-2-git-send-email-chun-hung.wu@mediatek.com>
Date: Mon, 17 Feb 2020 14:31:48 +0800
From: Chun-Hung Wu <chun-hung.wu@...iatek.com>
To: Chaotian Jing <chaotian.jing@...iatek.com>,
Ulf Hansson <ulf.hansson@...aro.org>,
Rob Herring <robh+dt@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Matthias Brugger <matthias.bgg@...il.com>,
Linus Walleij <linus.walleij@...aro.org>,
Pavel Machek <pavel@....cz>,
Kate Stewart <kstewart@...uxfoundation.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Martin Blumenstingl <martin.blumenstingl@...glemail.com>,
Pan Bian <bianpan2016@....com>,
Thomas Gleixner <tglx@...utronix.de>,
Allison Randal <allison@...utok.net>,
Mathieu Malaterre <malat@...ian.org>,
Stanley Chu <stanley.chu@...iatek.com>,
Kuohong Wang <kuohong.wang@...iatek.com>
CC: <kernel-team@...roid.com>, <linux-kernel@...r.kernel.org>,
<linux-mmc@...r.kernel.org>, <linux-mediatek@...ts.infradead.org>,
<devicetree@...r.kernel.org>, <wsd_upstream@...iatek.com>,
<linux-arm-kernel@...ts.infradead.org>,
Chun-Hung Wu <chun-hung.wu@...iatek.com>
Subject: [PATCH 1/4] [1/4] mmc: core: expose MMC_CAP2_CQE* to dt
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.
---
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
Powered by blists - more mailing lists