summaryrefslogtreecommitdiff
path: root/drivers/crypto
diff options
context:
space:
mode:
authorMallikarjun Kasoju <mkasoju@nvidia.com>2012-07-16 12:05:35 +0530
committerVarun Colbert <vcolbert@nvidia.com>2012-07-20 23:06:56 -0700
commit371e088852c0a0b629d00e4ebbfcf3d7b2a925e5 (patch)
treedf83c3217a28a961ea50dc7b27cc22933919d5ae /drivers/crypto
parent8e0e0185253f612c56dfd141ce56e73aba9d4633 (diff)
crypto: tegra-se: Program slot zero for RNG operation
RNG operation updates UIV. So program reserved slot i.e., slot zero before every RNG operation. Bug 1017413 Change-Id: I831b8cfd275ebecb5e6df3166a977b0cc5a26a8a Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com> Reviewed-on: http://git-master/r/115992 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com>
Diffstat (limited to 'drivers/crypto')
-rw-r--r--drivers/crypto/tegra-se.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/crypto/tegra-se.c b/drivers/crypto/tegra-se.c
index 3746399894c3..45da366d886a 100644
--- a/drivers/crypto/tegra-se.c
+++ b/drivers/crypto/tegra-se.c
@@ -515,7 +515,8 @@ static void tegra_se_config_crypto(struct tegra_se_dev *se_dev,
case SE_AES_OP_MODE_RNG_DRBG:
val = SE_CRYPTO_INPUT_SEL(INPUT_RANDOM) |
SE_CRYPTO_XOR_POS(XOR_BYPASS) |
- SE_CRYPTO_CORE_SEL(CORE_ENCRYPT);
+ SE_CRYPTO_CORE_SEL(CORE_ENCRYPT)|
+ SE_CRYPTO_KEY_INDEX(slot_num);
break;
case SE_AES_OP_MODE_ECB:
if (encrypt) {