diff options
author | Maxime Ripard <maxime@cerno.tech> | 2021-03-24 09:53:13 +0100 |
---|---|---|
committer | Maxime Ripard <maxime@cerno.tech> | 2021-03-24 09:53:13 +0100 |
commit | 00099e67ddf03c548afe5c1bdbf21e6d7ed7dba4 (patch) | |
tree | d7efb6413807c1a17c67f34c405821709de21826 | |
parent | 66700fec5e01a737f1ec0ae433738e453d288868 (diff) | |
download | linux-sunxi/h6-emmc-inline-encryption.tar.gz |
HACK: Try to use 4096 block sizesunxi/h6-emmc-inline-encryption
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
-rw-r--r-- | drivers/mmc/host/sunxi-mmc.c | 2 | ||||
-rw-r--r-- | drivers/soc/sunxi/sun50i_h6_emce.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mmc/host/sunxi-mmc.c b/drivers/mmc/host/sunxi-mmc.c index 90c2a99a127623..92705c720f9e1d 100644 --- a/drivers/mmc/host/sunxi-mmc.c +++ b/drivers/mmc/host/sunxi-mmc.c @@ -1075,7 +1075,7 @@ static void sunxi_mmc_request(struct mmc_host *mmc, struct mmc_request *mrq) } if (mrq->crypto_enabled) - mmc_writel(host, REG_EMCE, BIT(0) | BIT(4) | (0x200 << 16)); + mmc_writel(host, REG_EMCE, BIT(0) | BIT(4) | (4096 << 16)); else mmc_writel(host, REG_EMCE, 0); diff --git a/drivers/soc/sunxi/sun50i_h6_emce.c b/drivers/soc/sunxi/sun50i_h6_emce.c index caae90b82ce881..84b95dc84f42e1 100644 --- a/drivers/soc/sunxi/sun50i_h6_emce.c +++ b/drivers/soc/sunxi/sun50i_h6_emce.c @@ -52,6 +52,8 @@ int sun50i_h6_emce_program_key(struct emce *emce, const struct emce_key *key) struct emce_priv *priv = emce->priv; u32 mode = readl(priv->base + 0x80) & ~GENMASK(11, 0); + mode &= ~GENMASK(31, 16); + mode |= 4096 << 16; switch (key->cipher) { case SUN50I_H6_EMCE_AES_ECB: |