From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,USER_AGENT_SANE_2 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 61EBAC10F25 for ; Mon, 9 Mar 2020 23:31:23 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2E1BF2253D for ; Mon, 9 Mar 2020 23:31:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="YSc1YXXr"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="TZorDZQc" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2E1BF2253D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Date:To:From:Subject:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=5E3ZzDKQokEYAMK6PweocsxGXSzVd8tie62Uqfj6xGk=; b=YSc1YXXrTYDNmE W/iLoQFXsHA9VFC/2Uk866ME34ebYoP7/tv6YWxWOF4agx3qD+wY/wWbkrxEza8Pt1eijHAu1fqRk XXlfyvySvUXIg87OEk8M+TqQXP1x2MBxqkbD0FdQrVw3l8AN3gsRdYCiTwMI5J3KX9jN8Gb/ycvcU TLYDSdkTN/zI+Zrs6QEHlWL2BS0A3nxoUx/zADQwq6AU4zZYqbquuIRkHIADOvmJYq1yiRoSg22Em LHBrNIgCjEztSU7DucCAi4NfPe/4TuTzIeBfaznEY0kxWITgoxBH/2nxaP887ZINr1rUVcFrytkFU 7p4k3WgPAfrXJEm3uh2w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jBRrj-0007Ch-RC; Mon, 09 Mar 2020 23:31:19 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jBRrg-0007C7-Lv; Mon, 09 Mar 2020 23:31:18 +0000 X-UUID: 61cec5a51ff94b26b9524ffaad2b2e0b-20200309 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:MIME-Version:Content-Type:References:In-Reply-To:Date:CC:To:From:Subject:Message-ID; bh=/ML3Ledtqy4m3bKFwbFWPyytmDkR4UuhLn++0IipQ84=; b=TZorDZQcjDTH8lhmhgwVC1EltnoyQvnZ/vx2FIVo0ORShoGzK930oQGd0abkK3LzJNKUE19zlwu7m2pdA0eea2zZRC3XoEikCEDXxOvcqsZgLl02BezOl57hK1Lui4QRqPs9SLiyu6/0PwW7+3KAMnBP9WGJMZK5ox+whgKW4H0=; X-UUID: 61cec5a51ff94b26b9524ffaad2b2e0b-20200309 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLS) with ESMTP id 989306467; Mon, 09 Mar 2020 15:31:09 -0800 Received: from mtkmbs05n1.mediatek.inc (172.21.101.15) by MTKMBS62DR.mediatek.inc (172.29.94.18) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 9 Mar 2020 16:21:06 -0700 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs05n1.mediatek.inc (172.21.101.15) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 10 Mar 2020 07:19:53 +0800 Received: from [172.21.77.33] (172.21.77.33) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Tue, 10 Mar 2020 07:18:21 +0800 Message-ID: <1583796065.23665.8.camel@mtkswgap22> Subject: Re: [PATCH 1/4] [1/4] mmc: core: expose MMC_CAP2_CQE* to dt From: Chun-Hung Wu To: Linus Walleij Date: Tue, 10 Mar 2020 07:21:05 +0800 In-Reply-To: References: <1581921111-24172-1-git-send-email-chun-hung.wu@mediatek.com> <1581921111-24172-2-git-send-email-chun-hung.wu@mediatek.com> X-Mailer: Evolution 3.2.3-0ubuntu6 MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200309_163116_729137_1F45ED83 X-CRM114-Status: GOOD ( 21.37 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Kate Stewart , Ulf Hansson , wsd_upstream@mediatek.com, linux-mmc , Pan Bian , Pavel Machek , Chaotian Jing , kernel-team@android.com, "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Martin Blumenstingl , Rob Herring , "moderated list:ARM/Mediatek SoC support" , Matthias Brugger , Thomas Gleixner , Stanley Chu , Allison Randal , Linux ARM , Mathieu Malaterre , Greg Kroah-Hartman , Kuohong Wang , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, 2020-02-21 at 15:33 +0100, Linus Walleij wrote: > On Mon, Feb 17, 2020 at 7:32 AM Chun-Hung Wu wrote: > > > 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; > > I don't understand why this is even a DT property as it should > be clear from the hosts compatible whether it supports CQE or > not. But it's too late to do anything about that I suppose, and > I just assume there is something I don't understand here. "supports-cqe" as my understanding is like HS400 HS200 is a host capability. > > > + /* 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; > > + } > > This is the right place to do this I suppose. Disabling CQE > selectively is something you might wanna do for debugging. > Acked-by: Linus Walleij > > I see that some drivers are already parsing this DT property > on their own, should we follow up with patches so that these: > > $ git grep 'supports-cqe' > drivers/mmc/host/sdhci-brcmstb.c: if > (device_property_read_bool(&pdev->dev, "supports-cqe")) { > drivers/mmc/host/sdhci-msm.c: if (of_property_read_bool(node, "supports-cqe")) > drivers/mmc/host/sdhci-tegra.c: if > (device_property_read_bool(host->mmc->parent, "supports-cqe")) > > Make use of the central parsing instead? In v4, I will remove the vendor driver dt setting and use central parsing instead. > > Yours, > Linus Walleij _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel