brintos

brintos / linux-shallow public Read only

0
0
Text · 1.2 KiB · 6d0a0cd Raw
59 lines · c
1/* SPDX-License-Identifier: GPL-2.0-or-later */2/* Copyright (C) 2003-2006, Advanced Micro Devices, Inc.3 */4 5#ifndef _GEODE_AES_H_6#define _GEODE_AES_H_7 8/* driver logic flags */9#define AES_MODE_ECB 010#define AES_MODE_CBC 111 12#define AES_DIR_DECRYPT 013#define AES_DIR_ENCRYPT 114 15#define AES_FLAGS_HIDDENKEY (1 << 0)16 17/* Register definitions */18 19#define AES_CTRLA_REG  0x000020 21#define AES_CTRL_START     0x0122#define AES_CTRL_DECRYPT   0x0023#define AES_CTRL_ENCRYPT   0x0224#define AES_CTRL_WRKEY     0x0425#define AES_CTRL_DCA       0x0826#define AES_CTRL_SCA       0x1027#define AES_CTRL_CBC       0x2028 29#define AES_INTR_REG  0x000830 31#define AES_INTRA_PENDING (1 << 16)32#define AES_INTRB_PENDING (1 << 17)33 34#define AES_INTR_PENDING  (AES_INTRA_PENDING | AES_INTRB_PENDING)35#define AES_INTR_MASK     0x0736 37#define AES_SOURCEA_REG   0x001038#define AES_DSTA_REG      0x001439#define AES_LENA_REG      0x001840#define AES_WRITEKEY0_REG 0x003041#define AES_WRITEIV0_REG  0x004042 43/*  A very large counter that is used to gracefully bail out of an44 *  operation in case of trouble45 */46 47#define AES_OP_TIMEOUT    0x5000048 49struct geode_aes_tfm_ctx {50	u8 key[AES_KEYSIZE_128];51	union {52		struct crypto_skcipher *skcipher;53		struct crypto_cipher *cip;54	} fallback;55	u32 keylen;56};57 58#endif59