Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp2285174imc; Tue, 12 Mar 2019 10:34:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqy97LOyRNUchTmEg1hFR8THiftX9F0noi0PoBIPbBGMvnYOkAlXbr8uQzJWuG6fs2NQUlY4 X-Received: by 2002:a63:e90f:: with SMTP id i15mr36145384pgh.430.1552412099087; Tue, 12 Mar 2019 10:34:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552412099; cv=none; d=google.com; s=arc-20160816; b=bLBzwWo11KT4rcmAyFu+TwRa+RsqjAV13DlbzKK+guB3KEnfSAUNBY9C7wgPc49noD omBv7vxk3NdPEZ9IuXAcwoPSB72b8MNF42waKfx/aIGcfKQaBvmSXcjFqbHAQR0JUil9 Vov1sX/ahZABZlDF5faRWuItxv1iNIRD1K3qA5mnStuDXAdPX4UdCF9FrXLZc9fJnn1t 5abqsO90a8WzFdA6BKrnZMvLepo5R5pUKr2ag3bkqEyDhT0BbfPcZ5EE6/LN+33Lceht 8cO3CQwFjyWd+q36dx8j4uz8oVx4PcL/Zt6wkHfLyvE8yvWOumY9MV2ILy241oarAQ6l h53Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version; bh=T3B43/s9mSIe89KPRwIhPBJAkcmkzHP+QHyrG1+jdiU=; b=QtdNiHABcoCmLSD/254xnwXJlWJ0xBYkVZUTgqjmiy7jrSWcAdh7AcJetVmPFZJYM1 jGebaiJ+k6R6J4estQBjHZjESY5+gpdt7LvqSlz/TNpCKrFhctxQg7X7zP6051klEXWH Tt/ZUdUgRg2xItLZ4N7j3ZDW0yN/t+yGY6n7GXHWi0pGHr47ztDy6mOsR+k6qfKotuaq 12gINvtSAqJ+A00Z7tQtcbdzZV7ViXPryyUI0E6FV/gcPuxvmRlAGqtkKHzoPpKqSf/b 97lkYcMlCAODtLjD5xwfblhH/TwZy/vkRAxf6yZUpisZtlif3lhXwtd06zHNXDNAkEK8 twuA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q4si7542338pgv.338.2019.03.12.10.34.43; Tue, 12 Mar 2019 10:34:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729698AbfCLRcT convert rfc822-to-8bit (ORCPT + 99 others); Tue, 12 Mar 2019 13:32:19 -0400 Received: from vegas.theobroma-systems.com ([144.76.126.164]:60887 "EHLO mail.theobroma-systems.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729412AbfCLRRF (ORCPT ); Tue, 12 Mar 2019 13:17:05 -0400 Received: from ip092042140082.rev.nessus.at ([92.42.140.82]:51415 helo=[10.2.146.249]) by mail.theobroma-systems.com with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1h3l17-0006mT-UP; Tue, 12 Mar 2019 18:16:42 +0100 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: [PATCH v2 2/3] dt-bindings: mmc: Add a new property disable-cqe-dcmd. From: =?utf-8?Q?Christoph_M=C3=BCllner?= In-Reply-To: <2038789.ZmMFo7ZELZ@diego> Date: Tue, 12 Mar 2019 18:16:40 +0100 Cc: Adrian Hunter , robh+dt@kernel.org, mark.rutland@arm.com, shawn.lin@rock-chips.com, ulf.hansson@linaro.org, Philipp Tomsich , Michal Simek , Douglas Anderson , Viresh Kumar , Enric Balletbo i Serra , Vicente Bergas , Emil Renner Berthing , Randy Li , Tony Xie , Ezequiel Garcia , Klaus Goger , Lin Huang , linux-mmc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org Content-Transfer-Encoding: 8BIT Message-Id: References: <20190307084329.25416-1-christoph.muellner@theobroma-systems.com> <4793843.T1TZ7EF8k3@phil> <2038789.ZmMFo7ZELZ@diego> To: =?utf-8?Q?Heiko_St=C3=BCbner?= X-Mailer: Apple Mail (2.3445.9.1) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On 12.03.2019, at 18:10, Heiko Stübner wrote: > > Hi Christoph, > > Am Dienstag, 12. März 2019, 15:46:44 CET schrieb Christoph Müllner: >>> On 12.03.2019, at 14:17, Heiko Stuebner wrote: >>> >>> Am Freitag, 8. März 2019, 14:10:45 CET schrieb Christoph Müllner: >>>>> On 08.03.2019, at 13:46, Adrian Hunter wrote: >>>>> >>>>> On 7/03/19 10:43 AM, Christoph Muellner wrote: >>>>>> This patch documents the new property disable-cqe-dcmd >>>>>> for the Arasan eMMC 5.1 driver. >>>>>> >>>>>> Signed-off-by: Christoph Muellner >>>>>> Signed-off-by: Philipp >>>>>> Tomsich --- >>>>>> Documentation/devicetree/bindings/mmc/arasan,sdhci.txt | 4 ++++ >>>>>> 1 file changed, 4 insertions(+) >>>>>> >>>>>> diff --git a/Documentation/devicetree/bindings/mmc/arasan,sdhci.txt >>>>>> b/Documentation/devicetree/bindings/mmc/arasan,sdhci.txt index >>>>>> 1edbb049cccb..ec699bf98b7c 100644 >>>>>> --- a/Documentation/devicetree/bindings/mmc/arasan,sdhci.txt >>>>>> +++ b/Documentation/devicetree/bindings/mmc/arasan,sdhci.txt >>>>>> >>>>>> @@ -44,6 +44,10 @@ Optional Properties: >>>>>> properly. Test mode can be used to force the controller to function. >>>>>> >>>>>> - xlnx,int-clock-stable-broken: when present, the controller always >>>>>> reports >>>>>> >>>>>> that the internal clock is stable even when it is not. >>>>>> >>>>>> + - disable-cqe-dcmd: The eMMC 5.1 standard specifies direct commands >>>>>> (DCMDs) + as part of the command queue engine (CQE). On controllers >>>>>> with a CQHCI, + such as the Arasan eMMC 5.1 host controller, the >>>>>> driver has to enable DCMDs. + This is done unless disable-cqe-dcmd >>>>>> is specified. >>> >>> This needs a rewording please. See below for hw-description vs. driver, so >>> the description should be centered around why this is a property of the hw >>> [like faulty controller implementation or whatever] >> >> I understand, that you prefer a HW-specific name for a property >> over one, that explains the actual effect. > > Actually I think the property-name is just fine :-) . > > The description might profit from a rewording though. Aka not driver- > centric but hw-centric, describing why some controllers may need the > option to disable these dcmds (controller bugs or whatever). Ah, ok. Now I understand what you mean. Will do for v3. Thanks, Christoph > > > Heiko > > > >> However, using disable- (which is always a directive for the driver >> and not a HW description) is not uncommon: >> >> * disable-wp should be "no-wp-line-connection" >> * disable-over-current -> "no-over-current-line-connection" >> * srp-disable -> "not-existing-srp-implementation" >> * ... >> >> But I don't mind using something else. >> Would "broken-cqe-dcmd" (like broken-cd or broken-flash-reset) be ok? >> Or other suggestions? >> >> Also I'd like to mention, that my first implementation was >> "supports-cqe-dcmd". I guess that would be a good choice, if it would have >> been there >> from the beginning. Introducing it now, would silently disable DCMD >> for existing DTBs. Therefore I went on to "disable-cqe-dcmd". >> >>>>> If "supports-cqe" is in mmc.txt, should "disable-cqe-dcmd" be there >>>>> also? >>>> >>>> The file mmc.txt says on top: >>>> "These properties are common to multiple MMC host controllers". >>>> As my patchset introduces "disable-cqe-dcmd" just for sdhci-of-arasan, >>>> I would say it should not go into that file. >>>> >>>> Also I wonder why "supports-cqe" is in mmc.txt, because >>>> only sdhci-tegra.c is evaluating that property. >>>> So I would expect it to be documented in >>>> Documentation/devicetree/bindings/mmc/nvidia,tegra20-sdhci.txt >>>> >>>> However, I see that "disable-cqe-dcmd" could go into other drivers as >>>> well. >>>> But is this enough to document it in mmc.txt? >>> >>> Devicetree is always about describing the hardware capabilites and never >>> about the actual nitty-gritty of driver implementation, aka it is not >>> meant >>> as a space for hardware-independent config-settings or such. >>> >>> As for only tegra evaluating this, is probably because it is still so new, >>> like january 2019 and Rob explicitly suggested it becoming common [0], >>> which suggests that the disable-cqe-dcmds should probably also be common. >> So mmc.txt lists "standardised" names for properties to reduce the risk >> of having similar, but distinct names for different MMC drivers. >> So whenever you want to introduce a new property for a driver, >> check if there isn't already something defined in mmc.txt. >> >> When seeing it this way, it clearly makes sense to have the property there. >> >> Thanks, >> Christoph