crypto: inside-secure - optimize DSE bufferability control
authorIgal Liberman <igall@marvell.com>
Thu, 15 Jun 2017 07:56:21 +0000 (09:56 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Tue, 20 Jun 2017 03:21:44 +0000 (11:21 +0800)
Configure the data write bufferability to always buffer packets in the
DSE. This change slightly improves performance.

Signed-off-by: Igal Liberman <igall@marvell.com>
Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/inside-secure/safexcel.c
drivers/crypto/inside-secure/safexcel.h

index 658b307c6a11dbd9bff5d5f8f16483081179c52c..73f4ef8d71f36df1d19a8411ab4c0bb32474e68a 100644 (file)
@@ -329,6 +329,7 @@ static int safexcel_hw_init(struct safexcel_crypto_priv *priv)
        val = EIP197_HIA_DSE_CFG_DIS_DEBUG;
        val |= EIP197_HIA_DxE_CFG_MIN_DATA_SIZE(7) | EIP197_HIA_DxE_CFG_MAX_DATA_SIZE(8);
        val |= EIP197_HIA_DxE_CFG_DATA_CACHE_CTRL(WR_CACHE_3BITS);
+       val |= EIP197_HIA_DSE_CFG_ALLWAYS_BUFFERABLE;
        val |= EIP197_HIA_DSE_CFG_EN_SINGLE_WR;
        writel(val, priv->base + EIP197_HIA_DSE_CFG);
 
index b8a81c568c99014b9be71eccd408f4e5f345dec2..7e3cbb9ac98ef5a89737b3877a45e70732f0a704 100644 (file)
 #define EIP197_HIA_DxE_CFG_MIN_DATA_SIZE(n)    ((n) << 0)
 #define EIP197_HIA_DxE_CFG_DATA_CACHE_CTRL(n)  (((n) & 0x7) << 4)
 #define EIP197_HIA_DxE_CFG_MAX_DATA_SIZE(n)    ((n) << 8)
+#define EIP197_HIA_DSE_CFG_ALLWAYS_BUFFERABLE  GENMASK(15, 14)
 #define EIP197_HIA_DxE_CFG_MIN_CTRL_SIZE(n)    ((n) << 16)
 #define EIP197_HIA_DxE_CFG_CTRL_CACHE_CTRL(n)  (((n) & 0x7) << 20)
 #define EIP197_HIA_DxE_CFG_MAX_CTRL_SIZE(n)    ((n) << 24)