ANDROID: scsi: ufs: split up UFSHCD_QUIRK_NO_KEYSLOTS
UFSHCD_QUIRK_NO_KEYSLOTS does several different things:
1. Skip writing CRYPTO_GENERAL_ENABLE to REG_CONTROLLER_ENABLE.
2. Skip initializing the keyslot manager via the standard UFS crypto
capability registers.
3. Skip clearing and re-programming all keyslots.
The current use case for this is FMP, which needs all these behaviors.
However, some new hardware will still need behaviors (1) and (2),
but will no longer need (3) since the hardware will have keyslots.
To support this hardware, split up UFSHCD_QUIRK_NO_KEYSLOTS as follows:
1. UFSHCD_QUIRK_BROKEN_CRYPTO_ENABLE
2. UFSHCD_QUIRK_BROKEN_CRYPTO_CAPS
3. No quirk bit; just use hba->ksm.num_slots.
Also adjust the crypto quirk bits to start at (1 << 20) to avoid
collisions with backports from upstream.
Bug: 166139333
Bug: 162257402
Change-Id: I1e740f7ce0db7a1bafada0eb73343cd04966fee0
Signed-off-by:
Eric Biggers <ebiggers@google.com>
Loading
Please sign in to comment