Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp410872rwb; Wed, 9 Nov 2022 04:18:12 -0800 (PST) X-Google-Smtp-Source: AA0mqf5BRylzvDAwge5Tz44TpqYogtMUlnWNN5XGQBXtLoy0/AtlsQ6n91Lvajq8x5m7Vea7zSZH X-Received: by 2002:a63:1607:0:b0:470:6934:e853 with SMTP id w7-20020a631607000000b004706934e853mr16031651pgl.237.1667996292191; Wed, 09 Nov 2022 04:18:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667996292; cv=none; d=google.com; s=arc-20160816; b=zpg225aoYV0kgjlPZnaxGDfbiqFBRGaj+MhueW6dJNubVhgeyE0Yx8E93E28fn+w/x GvOF4W9Th/eIFlB7gdjW7nbvPFAi5xGXMPoqaSU32zsM+H75s+gJObA+Q3l0pv7Z2CUP 5hWlPFnghwbNEeyp51S31pFcqKRzY4F60Xh34dxBFImv40rl7kYQzbpiYQ7OALpRalO9 dxSkVPje/XHxDCEbUDPshIdwn5Mbc8a0Ljl5EcB2zfbUq5FF6lLlLp29Bf0OjFtJPoFb 2vYxBhazgl2+RDxis7CgKuBJJp1+DqZ/GvYJtRop/wdCH65bLRH2Sa6lSZD0uVvmTY8D aCJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=yybp5GQkINWOGNJfWdB4Wuog9A6gcJ2pt653sLMEWvA=; b=RLqI2o9kqTZl54NkqbceVHPnfgCvTwui4kv5OxdZJKIF70YUfPpqdX3fgMaFNL9alC JhuNfFzd3rInYK4gcmRfUklICZNLCGPX65PZk7jXwM6IdTt2o/I4a6Ax5hmlPyMewNIk SjiiBYwDsznvK2vqgwEeUibwBKhxyhjrhxWRLCZw7tbPwCbCUHlUE2lPe4cXX4i0Zj4k bzU90QsbuDpFv/BSo0g95n8crSu/EZyXUU2c60jUV89UWdVf/lxvsg0z7y5/wyNKyQ// 74ul0YRlm7M8PDsNdFbiu9xwIUtJD2XyAVzlpR5mucx3cn/P5sAaiaYCeI7AdQASLEXl 5hIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SCqUdVWM; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i64-20020a17090a3dc600b00203336ddd4asi1104885pjc.56.2022.11.09.04.18.00; Wed, 09 Nov 2022 04:18:12 -0800 (PST) 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; dkim=pass header.i=@linaro.org header.s=google header.b=SCqUdVWM; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229922AbiKIMPx (ORCPT + 93 others); Wed, 9 Nov 2022 07:15:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229555AbiKIMPt (ORCPT ); Wed, 9 Nov 2022 07:15:49 -0500 Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E706813F0F for ; Wed, 9 Nov 2022 04:15:48 -0800 (PST) Received: by mail-pl1-x62f.google.com with SMTP id d20so15853019plr.10 for ; Wed, 09 Nov 2022 04:15:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=yybp5GQkINWOGNJfWdB4Wuog9A6gcJ2pt653sLMEWvA=; b=SCqUdVWMgRBRF5if0NYhIo9YJLY3EzcceIYuHAdGuVfdc0dt8tITUguFKB8l42msOp 9zi49zCHJKTs3USdfW+NnzKaM3uSsRxg2OzJSr4ycwGVJ1PdBEBfJMuUQ98fNMpOAITF 8ZvuqHcNVjiRNbfmBx961B949M6vm/achhz33E8tVNXNlR1yPpkJBNchEOpxter52lRq nPjEpsfZi7fe4ox/ubHDkI862st4zHYtI/5qPTWGwR9x4GpdY2sbq79mgudcQZCAz9po jaOdyoJBPv2ZJy83KhgkxJ6ambSn2wtRdbUdz5smTpjrmrvG9BELgXwLjNBOJ6zoemEI mzlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=yybp5GQkINWOGNJfWdB4Wuog9A6gcJ2pt653sLMEWvA=; b=ycPLWC43513NVt6zvBmuYmLHdjqO/pcYlJ0qJHl2G6CJKW8Q3URE1TXRi3hkbTgQ1H dXlWff7TpvrP3G3xE2yA0LHhCw7aC+y4UTeFBDGOT8zxRM8hThIxByTfT6CI5IxUunmR hQRZiXd9W3MY0QEy+hFnoV1U22lSPzZ6OAyJ4/hRWrALlPlWifRydjLdyPzOvWKFVUf9 WCX+/MwbDk89xlw06cEb3WOa+iQZxlUXcDEYF/BOs/vYqv8LiPU+w86TVI87+Tc7D2go Zwe+CYPyr3W0fl6xDmSf5vO7WHNemZGwOeiA0NEqcUveHltEspV/BDeqAexuS5WJH8ZZ Jt+w== X-Gm-Message-State: ACrzQf3+sgzgGcPb0fTEmy1MGgls/GNV8XLek4aExpM6gcsYpfOoNQzm 3Ets7fqQ4MD0OKoVHd82wdKgqje3VrgbjA3n2/r6kj45Z5BLwQ== X-Received: by 2002:a17:90b:4d07:b0:1ef:521c:f051 with SMTP id mw7-20020a17090b4d0700b001ef521cf051mr80652557pjb.164.1667996148432; Wed, 09 Nov 2022 04:15:48 -0800 (PST) MIME-Version: 1.0 References: <20221108082533.21384-1-hayashi.kunihiko@socionext.com> <20221108082533.21384-2-hayashi.kunihiko@socionext.com> In-Reply-To: <20221108082533.21384-2-hayashi.kunihiko@socionext.com> From: Ulf Hansson Date: Wed, 9 Nov 2022 13:15:11 +0100 Message-ID: Subject: Re: [PATCH 1/4] mmc: f-sdh30: Add reset control support To: Kunihiko Hayashi Cc: Adrian Hunter , Jassi Brar , Ard Biesheuvel , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 On Tue, 8 Nov 2022 at 09:25, Kunihiko Hayashi wrote: > > Add reset control support for F_SDH30 controller. This is optional. > > Signed-off-by: Kunihiko Hayashi This needs an update to the DT doc too, which is also the case for patch4. That said, please convert the DT doc into the yaml based format as the first step. Kind regards Uffe > --- > drivers/mmc/host/sdhci_f_sdh30.c | 17 ++++++++++++++++- > 1 file changed, 16 insertions(+), 1 deletion(-) > > diff --git a/drivers/mmc/host/sdhci_f_sdh30.c b/drivers/mmc/host/sdhci_f_sdh30.c > index 3f5977979cf2..7f4553b28180 100644 > --- a/drivers/mmc/host/sdhci_f_sdh30.c > +++ b/drivers/mmc/host/sdhci_f_sdh30.c > @@ -14,6 +14,7 @@ > #include > #include > #include > +#include > > #include "sdhci-pltfm.h" > #include "sdhci_f_sdh30.h" > @@ -21,6 +22,7 @@ > struct f_sdhost_priv { > struct clk *clk_iface; > struct clk *clk; > + struct reset_control *rst; > u32 vendor_hs200; > struct device *dev; > bool enable_cmd_dat_delay; > @@ -150,6 +152,16 @@ static int sdhci_f_sdh30_probe(struct platform_device *pdev) > ret = clk_prepare_enable(priv->clk); > if (ret) > goto err_clk; > + > + priv->rst = devm_reset_control_get_optional_shared(dev, NULL); > + if (IS_ERR(priv->rst)) { > + ret = PTR_ERR(priv->rst); > + goto err_rst; > + } > + > + ret = reset_control_deassert(priv->rst); > + if (ret) > + goto err_rst; > } > > /* init vendor specific regs */ > @@ -175,6 +187,8 @@ static int sdhci_f_sdh30_probe(struct platform_device *pdev) > return 0; > > err_add_host: > + reset_control_assert(priv->rst); > +err_rst: > clk_disable_unprepare(priv->clk); > err_clk: > clk_disable_unprepare(priv->clk_iface); > @@ -191,8 +205,9 @@ static int sdhci_f_sdh30_remove(struct platform_device *pdev) > sdhci_remove_host(host, readl(host->ioaddr + SDHCI_INT_STATUS) == > 0xffffffff); > > - clk_disable_unprepare(priv->clk_iface); > + reset_control_assert(priv->rst); > clk_disable_unprepare(priv->clk); > + clk_disable_unprepare(priv->clk_iface); > > sdhci_free_host(host); > platform_set_drvdata(pdev, NULL); > -- > 2.25.1 >