Skip to content

Commit b7a30da

Browse files
sebastianasherbertx
authored andcommitted
[CRYPTO] geode: move defines into a headerfile
This patch moves macros in geode-aes.c into geode-aes.h. Signed-off-by: Sebastian Siewior <sebastian@breakpoint.cc> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent 1f4e477 commit b7a30da

2 files changed

Lines changed: 34 additions & 34 deletions

File tree

‎drivers/crypto/geode-aes.c‎

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -20,38 +20,6 @@
2020

2121
#include "geode-aes.h"
2222

23-
/* Register definitions */
24-
25-
#define AES_CTRLA_REG 0x0000
26-
27-
#define AES_CTRL_START 0x01
28-
#define AES_CTRL_DECRYPT 0x00
29-
#define AES_CTRL_ENCRYPT 0x02
30-
#define AES_CTRL_WRKEY 0x04
31-
#define AES_CTRL_DCA 0x08
32-
#define AES_CTRL_SCA 0x10
33-
#define AES_CTRL_CBC 0x20
34-
35-
#define AES_INTR_REG 0x0008
36-
37-
#define AES_INTRA_PENDING (1 << 16)
38-
#define AES_INTRB_PENDING (1 << 17)
39-
40-
#define AES_INTR_PENDING (AES_INTRA_PENDING | AES_INTRB_PENDING)
41-
#define AES_INTR_MASK 0x07
42-
43-
#define AES_SOURCEA_REG 0x0010
44-
#define AES_DSTA_REG 0x0014
45-
#define AES_LENA_REG 0x0018
46-
#define AES_WRITEKEY0_REG 0x0030
47-
#define AES_WRITEIV0_REG 0x0040
48-
49-
/* A very large counter that is used to gracefully bail out of an
50-
* operation in case of trouble
51-
*/
52-
53-
#define AES_OP_TIMEOUT 0x50000
54-
5523
/* Static structures */
5624

5725
static void __iomem * _iobase;

‎drivers/crypto/geode-aes.h‎

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
#ifndef _GEODE_AES_H_
1010
#define _GEODE_AES_H_
1111

12-
#define AES_KEY_LENGTH 16
12+
/* driver logic flags */
1313
#define AES_IV_LENGTH 16
14-
14+
#define AES_KEY_LENGTH 16
1515
#define AES_MIN_BLOCK_SIZE 16
1616

1717
#define AES_MODE_ECB 0
@@ -22,6 +22,38 @@
2222

2323
#define AES_FLAGS_HIDDENKEY (1 << 0)
2424

25+
/* Register definitions */
26+
27+
#define AES_CTRLA_REG 0x0000
28+
29+
#define AES_CTRL_START 0x01
30+
#define AES_CTRL_DECRYPT 0x00
31+
#define AES_CTRL_ENCRYPT 0x02
32+
#define AES_CTRL_WRKEY 0x04
33+
#define AES_CTRL_DCA 0x08
34+
#define AES_CTRL_SCA 0x10
35+
#define AES_CTRL_CBC 0x20
36+
37+
#define AES_INTR_REG 0x0008
38+
39+
#define AES_INTRA_PENDING (1 << 16)
40+
#define AES_INTRB_PENDING (1 << 17)
41+
42+
#define AES_INTR_PENDING (AES_INTRA_PENDING | AES_INTRB_PENDING)
43+
#define AES_INTR_MASK 0x07
44+
45+
#define AES_SOURCEA_REG 0x0010
46+
#define AES_DSTA_REG 0x0014
47+
#define AES_LENA_REG 0x0018
48+
#define AES_WRITEKEY0_REG 0x0030
49+
#define AES_WRITEIV0_REG 0x0040
50+
51+
/* A very large counter that is used to gracefully bail out of an
52+
* operation in case of trouble
53+
*/
54+
55+
#define AES_OP_TIMEOUT 0x50000
56+
2557
struct geode_aes_op {
2658

2759
void *src;

0 commit comments

Comments
 (0)