Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp2041023rwa; Mon, 22 Aug 2022 00:34:02 -0700 (PDT) X-Google-Smtp-Source: AA6agR6KfjbZESILbxxVU741/459LQsFjZQY9eyQ+3wUmJQPrrkjNSyIGeRkirGLe8CtdqMED/z1 X-Received: by 2002:a17:907:da9:b0:731:1a5:8c66 with SMTP id go41-20020a1709070da900b0073101a58c66mr11766823ejc.80.1661153642510; Mon, 22 Aug 2022 00:34:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661153642; cv=none; d=google.com; s=arc-20160816; b=U5DHSWJoqJ8Awmx5GKaXeRUfmBSWNHru7IS3AyllrPuzgKaYl0eBxkigW0nZ8ajTCU 7MBeEPsiih5B6wkIzf3GkyBpGapSl+O+0GfPfJbhV0DoSprXtY0Cdct8kH+1q2vd+1eE C5llQO304acUbqSoq/fQKBovh8p0Qe6rrO2E9RMQkRKAo/7/77Em++UR6UxlCa1Gw+3p tmdqQ3UOv5c4km2Mcp++hyI2pO4sUok15kWtX7IIzSENfsUQ1PltELd+v9Kur/1e4twf 2Jgv5PNuiYpuHCgg4f135QgmCEC9em5eYZvBO5e6guxEWDUhM0eAUts297izqJf9WcFb qCVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id; bh=mDlkrVZ2d5wKUVCfBIC7xi1oGKYXt8/lCmRpEjCVXi8=; b=NZt3A7xQee109Sism1+LEORoOqnmqUsWgo6BQuAm1rMEJLOqO5kJZ99oaQzmn4oihh JYpGoBRHTPyOQyAeVshcfIZfnISQUCTnlCIvanwXlyONfnUmAIMQWCg4J3q65WwCxSFO DswAKg/0Jd2mTBfFwAXG7GgcaER3kLBbXbeJdL4U5CKBePyffZb36WIvePrX10jQo1FO /doHk9gA5KTyXmnokz38CQ2aQw3Oz5tWhTbQw/J8DnklCd0qAPiGnllJ59wE7C04OiyV t37GtC/OXG9Whq6G4UEyyaSwY2oV1ggrQgvbtYcjkC9bLOZlEAV07tPOv7XhJELJ+ezk Y/NQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l15-20020a056402028f00b0043e438a48e1si7580969edv.178.2022.08.22.00.33.36; Mon, 22 Aug 2022 00:34:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229933AbiHVHEg convert rfc822-to-8bit (ORCPT + 99 others); Mon, 22 Aug 2022 03:04:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56734 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232090AbiHVHEd (ORCPT ); Mon, 22 Aug 2022 03:04:33 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 99B6F1571A for ; Mon, 22 Aug 2022 00:04:22 -0700 (PDT) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oQ1T7-0002ow-Hs; Mon, 22 Aug 2022 09:03:29 +0200 Received: from [2a0a:edc0:0:900:1d::4e] (helo=lupine) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1oQ1T1-001Flh-DM; Mon, 22 Aug 2022 09:03:23 +0200 Received: from pza by lupine with local (Exim 4.94.2) (envelope-from ) id 1oQ1T0-0002CG-NV; Mon, 22 Aug 2022 09:03:22 +0200 Message-ID: Subject: Re: [PATCH v6 17/17] mmc: sdhci-cadence: Support mmc hardware reset From: Philipp Zabel To: Brad Larson , linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org, adrian.hunter@intel.com, alcooperx@gmail.com, andy.shevchenko@gmail.com, arnd@arndb.de, blarson@amd.com, brijeshkumar.singh@amd.com, catalin.marinas@arm.com, gsomlo@gmail.com, gerg@linux-m68k.org, krzk@kernel.org, krzysztof.kozlowski+dt@linaro.org, lee.jones@linaro.org, broonie@kernel.org, yamada.masahiro@socionext.com, piotrs@cadence.com, p.yadav@ti.com, rdunlap@infradead.org, robh+dt@kernel.org, samuel@sholland.org, fancer.lancer@gmail.com, suravee.suthikulpanit@amd.com, thomas.lendacky@amd.com, ulf.hansson@linaro.org, will@kernel.org, devicetree@vger.kernel.org Date: Mon, 22 Aug 2022 09:03:22 +0200 In-Reply-To: <20220820195750.70861-18-brad@pensando.io> References: <20220820195750.70861-1-brad@pensando.io> <20220820195750.70861-18-brad@pensando.io> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: p.zabel@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Brad, On Sa, 2022-08-20 at 12:57 -0700, Brad Larson wrote: [...] > +static void sdhci_mmc_hw_reset(struct mmc_host *mmc) > +{ > + struct sdhci_host *host = mmc_priv(mmc); > + struct sdhci_cdns_priv *priv = sdhci_cdns_priv(host); > + > + dev_info(mmc_dev(host->mmc), "emmc hardware reset\n"); > + > + reset_control_assert(priv->rst_hw); > + /* For eMMC, minimum is 1us but give it 9us for good measure */ > + udelay(9); At a glance, this seems excessive. Is there a reason 9 us is better than, say, 2 or 3? [...] > @@ -520,6 +538,17 @@ static int sdhci_cdns_probe(struct platform_device *pdev) >   if (ret) >   goto free; >   > > > > + if (host->mmc->caps & MMC_CAP_HW_RESET) { > + priv->rst_hw = devm_reset_control_get_optional_exclusive(dev, "hw"); This should be described in cdns,sdhci.yaml first. regards Philipp