From patchwork Thu Mar 7 08:43:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Muellner X-Patchwork-Id: 10842433 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 96E2F1669 for ; Thu, 7 Mar 2019 08:44:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 80B25286C2 for ; Thu, 7 Mar 2019 08:44:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 732592DEE2; Thu, 7 Mar 2019 08:44:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 24F42286C2 for ; Thu, 7 Mar 2019 08:44:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=PAIYdUJkG+LtPZnTSLW2dMqqqeoIg6IEJ0eNJljqtzA=; b=TzY w/6bmgPSIvO3pbOf9P79R2jhrILq3m2BIOPneuGOGxoo89BhRlUbmNxGUu0OII1TXfzJQpLtsNB3N GO5AW7hfT1zS6rIKJ8LoGcMCMpMu1I60bPbz+mR4NKp82sJuusDVlibh214t2EowPRjRFnSI7Y4yG +Ik0IkckXH4ghnEtcYHYP8b06YjQ+3MmKLSqIkkwDVTkOC2cyliBnPKHdvlxoS5yRbzY3YVGjAdPF 3QbedeVkqPuJG+pBa1CzAmeJ9q0xaUcGci23QjRW3pbTAcSvFq6gqLjFgF7vBitgMEgTe97RxcQzG i/Oa0OQwVRWB8FTc9WOsQC+phbqU+2A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h1odF-0004qC-JO; Thu, 07 Mar 2019 08:44:01 +0000 Received: from vegas.theobroma-systems.com ([144.76.126.164] helo=mail.theobroma-systems.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h1od5-0004gt-9q; Thu, 07 Mar 2019 08:43:53 +0000 Received: from ip092042140082.rev.nessus.at ([92.42.140.82]:54492 helo=purcell.lan) by mail.theobroma-systems.com with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1h1oco-00083e-Fi; Thu, 07 Mar 2019 09:43:34 +0100 From: Christoph Muellner To: robh+dt@kernel.org, mark.rutland@arm.com, heiko@sntech.de, shawn.lin@rock-chips.com, ulf.hansson@linaro.org, adrian.hunter@intel.com Subject: [PATCH v2 1/3] mmc: sdhci-of-arasan: Add DTS property to disable DCMDs. Date: Thu, 7 Mar 2019 09:43:26 +0100 Message-Id: <20190307084329.25416-1-christoph.muellner@theobroma-systems.com> X-Mailer: git-send-email 2.11.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190307_004352_321040_EAB704B4 X-CRM114-Status: UNSURE ( 9.19 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Emil Renner Berthing , Tony Xie , Viresh Kumar , Randy Li , linux-mmc@vger.kernel.org, Douglas Anderson , Vicente Bergas , Michal Simek , linux-rockchip@lists.infradead.org, Lin Huang , Klaus Goger , linux-arm-kernel@lists.infradead.org, Enric Balletbo i Serra , Philipp Tomsich , Ezequiel Garcia , linux-kernel@vger.kernel.org, Christoph Muellner MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Direct commands (DCMDs) are an optional feature of eMMC 5.1's command queue engine (CQE). The Arasan eMMC 5.1 controller uses the CQHCI, which exposes a control register bit to enable the feature. The current implementation sets this bit unconditionally. This patch allows to suppress the feature activation, by specifying the property disable-cqe-dcmd. Signed-off-by: Christoph Muellner Signed-off-by: Philipp Tomsich Acked-by: Adrian Hunter --- drivers/mmc/host/sdhci-of-arasan.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-of-arasan.c b/drivers/mmc/host/sdhci-of-arasan.c index c9e3e050ccc8..88dc3f00a5be 100644 --- a/drivers/mmc/host/sdhci-of-arasan.c +++ b/drivers/mmc/host/sdhci-of-arasan.c @@ -832,7 +832,10 @@ static int sdhci_arasan_probe(struct platform_device *pdev) host->mmc_host_ops.start_signal_voltage_switch = sdhci_arasan_voltage_switch; sdhci_arasan->has_cqe = true; - host->mmc->caps2 |= MMC_CAP2_CQE | MMC_CAP2_CQE_DCMD; + host->mmc->caps2 |= MMC_CAP2_CQE; + + if (!of_property_read_bool(np, "disable-cqe-dcmd")) + host->mmc->caps2 |= MMC_CAP2_CQE_DCMD; } ret = sdhci_arasan_add_host(sdhci_arasan);