Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp1325053rdh; Mon, 25 Sep 2023 09:15:16 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGMb6jpSMfAfIKZhD9BIYCJ4El+37yfNLUtI4nXEWYAHPLzCOegwkmx8aNGL5QltMFTc20g X-Received: by 2002:a05:6808:10d3:b0:3a7:550c:635d with SMTP id s19-20020a05680810d300b003a7550c635dmr8678059ois.56.1695658515670; Mon, 25 Sep 2023 09:15:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695658515; cv=none; d=google.com; s=arc-20160816; b=culOiAZPttZEmo6kXUgt8gnlPmr9w8frNKDSRSrokHAHysQsArxo50LW5RdvwsPqF2 WasoYtmM+LaxgeM9e3HHp26ADnfjnt8rRav3eCL2CKrUF+sFXuiFGsixcRnBY+zNdKyH I4yfguCan5zLljeA0LxZUMnbyjhsvoxvr24SAtcosMJXsp7+Z6IxlNMU+Xy6ZiJtb7wK HPgygPVwXxJjteFrcnZH7IO+Z7n1YVWwp+p9SduM6r4RIf5MkKEti/nnbF7P0oyJg0MN 3/HQrgCDXApCBogvThlE0UJELVhe7chOgcBEcVG0EX24Z0K9bNZgH3M2+N+tjAQu9l9h a3NA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :organization:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:dkim-signature; bh=HkdLufjrZggV7R58hbTTUACc/0X1itlb5kFrVHf77Jo=; fh=Z7RghtyZ6V4BIGj+ZJ+oS4LBojm3Hly7BfzXUiY+M1g=; b=GT3jNDFZ2yEnj6d1ztjewqLYl9QxgEIw7x4R5hpK0PU68qA0qTHAv1fhm/3Eoj0GuO uT9T+LfeNaAyP+1tFIhHcVRYJ0oUnbmhHmD+hky6gPDBKI7FmyeTeukC2g+1k3qCOoqE pqIFFb5OXZjEoCNlV0nuF82RgcE5nKtWDIAAXwoh4JUavZCo0qzca8f8cGLT1T55u7Lu 9Kz27m1+0VHyLE9uNbqfr3S0lUo1ZXoeR3FOtjMWBT3vu6rmAZdLtMAioU+sZU+ZGI5A R7zp9qgQGsA8YmXvSiuO23ARGszrlPRs3mDyArNVNqOX5vetkC2TAlVkhVEvnvy6DBMe 6LGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="A/m678kN"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id q17-20020a63cc51000000b00573f867741fsi10310189pgi.158.2023.09.25.09.15.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 09:15:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="A/m678kN"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id A0C84804B2B9; Mon, 25 Sep 2023 03:21:25 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231191AbjIYKVZ (ORCPT + 99 others); Mon, 25 Sep 2023 06:21:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230467AbjIYKVX (ORCPT ); Mon, 25 Sep 2023 06:21:23 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5EC2EA3; Mon, 25 Sep 2023 03:21:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695637277; x=1727173277; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=25xM1GGX99FaJI1a7/sAeMNfBZdYigkRiv9j1kibCCQ=; b=A/m678kNZzOT7y+Ao43vOkO8C6174uW3ZgaHhcdwTttYHdHc3JP5Ysn+ DOCZa/3EhVIMF6EZEtKkK50W7MjnAtVKBYtk1SQEc7NlZA6UiodZexSp9 PUPA3A25rtXxyQRS0gmHWphyyPUUZP1NxdF82uLy6SKIYG5h/3X376Y0I Csmue9gPmklqM7ZDcA/rtRF66ZiQXGZIb6Guk5gmH6LZGeOAXsXi7X5Cp Qkjw/RuO4pW7O+wHNEsw97OiihWwhRhNkBlyYTjvsr9XqyYZMUS3uXKtJ sMVG/+b8gLIb9N5MRGYdHBoNgKuTUwNoCutsPyQrR5DwA/kdxoW0HcO1W g==; X-IronPort-AV: E=McAfee;i="6600,9927,10843"; a="381126628" X-IronPort-AV: E=Sophos;i="6.03,174,1694761200"; d="scan'208";a="381126628" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Sep 2023 03:21:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10843"; a="872002635" X-IronPort-AV: E=Sophos;i="6.03,174,1694761200"; d="scan'208";a="872002635" Received: from ahunter6-mobl1.ger.corp.intel.com (HELO [10.0.2.15]) ([10.252.50.180]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Sep 2023 03:21:09 -0700 Message-ID: <4ef60ffd-3661-4bca-91a3-b49d6189c71b@intel.com> Date: Mon, 25 Sep 2023 13:21:05 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/6] mmc: sdhci: add __sdhci_execute_tuning() to header Content-Language: en-US To: Drew Fustini , Ulf Hansson , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jisheng Zhang , Guo Ren , Fu Wei , Paul Walmsley , Palmer Dabbelt , Albert Ou , Conor Dooley Cc: Robert Nelson , Jason Kridner , Xi Ruoyao , Han Gao , Icenowy Zheng , linux-mmc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org References: <20230921-th1520-mmc-v1-0-49f76c274fb3@baylibre.com> <20230921-th1520-mmc-v1-2-49f76c274fb3@baylibre.com> From: Adrian Hunter Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki In-Reply-To: <20230921-th1520-mmc-v1-2-49f76c274fb3@baylibre.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Mon, 25 Sep 2023 03:21:25 -0700 (PDT) On 22/09/23 04:49, Drew Fustini wrote: > Expose __sdhci_execute_tuning() so that it can be called from the > mmc host controller drivers. > > In the sdhci-of-dwcmshc driver, sdhci_dwcmshc_th1520_ops sets > platform_execute_tuning to th1520_execute_tuning(). That function has > to manipulate phy registers before tuning can be performed. To avoid > copying the code verbatim from __sdhci_execute_tuning() into > th1520_execute_tuning(), make it possible for __sdhci_execute_tuning() > to be called from sdhci-of-dwcmshc. > > Signed-off-by: Drew Fustini > --- > drivers/mmc/host/sdhci.c | 2 +- > drivers/mmc/host/sdhci.h | 1 + > 2 files changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c > index ff41aa56564e..fd607058d176 100644 > --- a/drivers/mmc/host/sdhci.c > +++ b/drivers/mmc/host/sdhci.c > @@ -2841,7 +2841,7 @@ void sdhci_send_tuning(struct sdhci_host *host, u32 opcode) > } > EXPORT_SYMBOL_GPL(sdhci_send_tuning); > > -static int __sdhci_execute_tuning(struct sdhci_host *host, u32 opcode) > +int __sdhci_execute_tuning(struct sdhci_host *host, u32 opcode) Also need EXPORT_SYMBOL_GPL(__sdhci_execute_tuning); > { > int i; > > diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h > index f219bdea8f28..a20864fc0641 100644 > --- a/drivers/mmc/host/sdhci.h > +++ b/drivers/mmc/host/sdhci.h > @@ -793,6 +793,7 @@ void sdhci_set_bus_width(struct sdhci_host *host, int width); > void sdhci_reset(struct sdhci_host *host, u8 mask); > void sdhci_set_uhs_signaling(struct sdhci_host *host, unsigned timing); > int sdhci_execute_tuning(struct mmc_host *mmc, u32 opcode); > +int __sdhci_execute_tuning(struct sdhci_host *host, u32 opcode); > void sdhci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios); > int sdhci_start_signal_voltage_switch(struct mmc_host *mmc, > struct mmc_ios *ios); >