]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/crypto/atmel-aes-regs.h
Merge remote-tracking branches 'asoc/fix/intel', 'asoc/fix/topology' and 'asoc/fix...
[karo-tx-linux.git] / drivers / crypto / atmel-aes-regs.h
index 0ec04407b533a1efea41c4a6e3dc79bb7e54beae..7694679802b38528783892d8321f59771bbec289 100644 (file)
 #define AES_CTRR       0x98
 #define AES_GCMHR(x)   (0x9c + ((x) * 0x04))
 
+#define AES_EMR                0xb0
+#define AES_EMR_APEN           BIT(0)  /* Auto Padding Enable */
+#define AES_EMR_APM            BIT(1)  /* Auto Padding Mode */
+#define AES_EMR_APM_IPSEC      0x0
+#define AES_EMR_APM_SSL                BIT(1)
+#define AES_EMR_PLIPEN         BIT(4)  /* PLIP Enable */
+#define AES_EMR_PLIPD          BIT(5)  /* PLIP Decipher */
+#define AES_EMR_PADLEN_MASK    (0xFu << 8)
+#define AES_EMR_PADLEN_OFFSET  8
+#define AES_EMR_PADLEN(padlen) (((padlen) << AES_EMR_PADLEN_OFFSET) &\
+                                AES_EMR_PADLEN_MASK)
+#define AES_EMR_NHEAD_MASK     (0xFu << 16)
+#define AES_EMR_NHEAD_OFFSET   16
+#define AES_EMR_NHEAD(nhead)   (((nhead) << AES_EMR_NHEAD_OFFSET) &\
+                                AES_EMR_NHEAD_MASK)
+
 #define AES_TWR(x)     (0xc0 + ((x) * 0x04))
 #define AES_ALPHAR(x)  (0xd0 + ((x) * 0x04))