Re: [PATCH v6 2/2] mmc: sdhci-msm: Use pm ops instead of macro to restore crypto keys
From: Dmitry Baryshkov
Date: Mon Aug 03 2026 - 14:27:58 EST
On Mon, Aug 03, 2026 at 10:01:23PM +0530, Neeraj Soni wrote:
> From: Ram Prakash Gupta <ram.gupta@xxxxxxxxxxxxxxxx>
>
> Inline Crypto Engine (ICE) keys are lost after hibernation entry and this
> needs to be restored when hibernation exits. ICE keys are re-programmed
> during sdhci_msm_ice_init() but it may not cover cases where the
> hibernation image is already restored.
>
> Unwrap the pm ops and use directly in driver to add the call to restore
> Inline Crypto Engine (ICE) keys. This ensures that ICE is brought into
> same state as before hibernation.
>
> Also set MMC_CAP2_CRYPTO_NO_REPROG to indicate that re-programming of ICE
> keys is not needed during MMC runtime suspend/resume.
Hmm, if there is a flag which controls reprogramming of the keys, why
can't we use a default and make the core reprogram those?
>
> Signed-off-by: Ram Prakash Gupta <ram.gupta@xxxxxxxxxxxxxxxx>
> Signed-off-by: Seshu Madhavi Puppala <quic_spuppala@xxxxxxxxxxx>
> Co-developed-by: Ram Prakash Gupta <quic_rampraka@xxxxxxxxxxx>
> Signed-off-by: Ram Prakash Gupta <quic_rampraka@xxxxxxxxxxx>
> Co-developed-by: Sarthak Garg <quic_sartgarg@xxxxxxxxxxx>
> Signed-off-by: Sarthak Garg <quic_sartgarg@xxxxxxxxxxx>
> Signed-off-by: Debraj Mukhopadhyay <quic_dmukhopa@xxxxxxxxxxx>
> Signed-off-by: Neeraj Soni <neeraj.soni@xxxxxxxxxxxxxxxx>
> ---
> drivers/mmc/host/sdhci-msm.c | 23 ++++++++++++++++++++++-
> 1 file changed, 22 insertions(+), 1 deletion(-)
>
--
With best wishes
Dmitry