On Fri, Jan 29, 2021 at 03:08:25PM +0800, Peng Zhou wrote: > - add crypto clock control and ungate it before CQHCI init > - set MMC_CAP2_CRYPTO property of eMMC > > Change-Id: I3a28eaa3718eee73259b4d60867cce25525f9bba > Signed-off-by: Peng Zhou <peng.zhou@xxxxxxxxxxxx> Please run scripts/checkpatch.pl on this patch (and the next one) and address the warnings and errors. > + /* only eMMC has crypto property */ > + if ((mmc->caps2 & MMC_CAP2_NO_SD) && (mmc->caps2 & MMC_CAP2_NO_SDIO)) > + mmc->caps2 |= MMC_CAP2_CRYPTO; > + > + if (mmc->caps2 & MMC_CAP2_CRYPTO) { > + host->crypto_clk = devm_clk_get(&pdev->dev, "crypto_clk"); > + if (IS_ERR(host->crypto_clk)) > + host->crypto_clk = NULL; > + } Is this logic correct? I'm wondering whether you want something more like: /* only eMMC has crypto property */ if ((mmc->caps2 & MMC_CAP2_NO_SD) && (mmc->caps2 & MMC_CAP2_NO_SDIO)) host->crypto_clk = devm_clk_get(&pdev->dev, "crypto_clk"); if (IS_ERR(host->crypto_clk)) host->crypto_clk = NULL; else mmc->caps2 |= MMC_CAP2_CRYPTO; } I.e., is crypto only supported when crypto_clk is present? Or can crypto be supported without crypto_clk being present? - Eric