From: Eric Biggers <ebiggers@kernel.org>
To: Peng Zhou <peng.zhou@mediatek.com>
Cc: linux-mmc@vger.kernel.org,
Chaotian Jing <chaotian.jing@mediatek.com>,
Ulf Hansson <ulf.hansson@linaro.org>,
Satya Tangirala <satyat@google.com>,
Andy Gross <agross@kernel.org>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
Adrian Hunter <adrian.hunter@intel.com>,
Wulin Li <wulin.li@mediatek.com>,
Stanley Chu <stanley.chu@mediatek.com>
Subject: Re: [PATCH 1/2] mmc: mediatek: add Inline Crypto Engine support
Date: Thu, 28 Jan 2021 20:52:44 -0800 [thread overview]
Message-ID: <YBOUnFvaqO9ukNCa@sol.localdomain> (raw)
In-Reply-To: <20210129033916.26508-1-peng.zhou@mediatek.com>
Hi Peng,
On Fri, Jan 29, 2021 at 11:39:16AM +0800, Peng Zhou wrote:
> Add Inline Crypto Engine(ICE) support into Mediatek MMC Host.
>
> - add crypto clock control and ungate it before CQHCI init
> - set MMC_CAP2_CRYPTO property of MMC
>
> Change-Id: I6dc35391fd2841609c5be0df1fe1d12ec28ee0c4
> Signed-off-by: Peng Zhou <peng.zhou@mediatek.com>
This is patch 1 of 2, but I only received patch 1. Is there a cover letter and
patch 2 as well?
Also, what branch does this apply too? I tried mmc/next as well as v5.11-rc5,
but neither works.
> ---
> drivers/mmc/host/mtk-sd.c | 16 ++++++++++++++--
> 1 file changed, 14 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
> index de09c6347524..e870afd66ae8 100644
> --- a/drivers/mmc/host/mtk-sd.c
> +++ b/drivers/mmc/host/mtk-sd.c
> @@ -441,6 +441,7 @@ struct msdc_host {
> struct clk *bus_clk; /* bus clock which used to access register */
> struct clk *src_clk_cg; /* msdc source clock control gate */
> struct clk *sys_clk_cg; /* msdc subsys clock control gate */
> + struct clk *crypto_clk; /* msdc crypto clock */
> struct clk_bulk_data bulk_clks[MSDC_NR_CLOCKS];
Perhaps the new clock should go in bulk_clks so that it doesn't have to be
handled separately?
>
> + /* only eMMC has crypto property */
> +#ifdef CONFIG_MMC_CRYPTO
> + if ((mmc->caps2 & MMC_CAP2_NO_SD) && (mmc->caps2 & MMC_CAP2_NO_SDIO))
> + mmc->caps2 |= MMC_CAP2_CRYPTO;
> +#endif
This #ifdef is unnecessary (i.e., the code can just be unconditional) because
MMC_CAP2_CRYPTO is #defined to 0 when !CONFIG_MMC_CRYPTO.
> + if (mmc->caps2 & MMC_CAP2_CRYPTO) {
> + host->crypto_clk = devm_clk_get(&pdev->dev, "crypto_clk");
> + if (IS_ERR(host->crypto_clk))
> + }
> +
Why is there nothing under IS_ERR()?
- Eric
prev parent reply other threads:[~2021-01-29 4:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-29 3:39 [PATCH 1/2] mmc: mediatek: add Inline Crypto Engine support Peng Zhou
2021-01-29 4:52 ` Eric Biggers [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YBOUnFvaqO9ukNCa@sol.localdomain \
--to=ebiggers@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=agross@kernel.org \
--cc=bjorn.andersson@linaro.org \
--cc=chaotian.jing@mediatek.com \
--cc=linux-mmc@vger.kernel.org \
--cc=peng.zhou@mediatek.com \
--cc=satyat@google.com \
--cc=stanley.chu@mediatek.com \
--cc=ulf.hansson@linaro.org \
--cc=wulin.li@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox