linux/drivers/crypto/qce/regs-v5.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
 */

#ifndef _REGS_V5_H_
#define _REGS_V5_H_

#include <linux/bitops.h>

#define REG_VERSION
#define REG_STATUS
#define REG_STATUS2
#define REG_ENGINES_AVAIL
#define REG_FIFO_SIZES
#define REG_SEG_SIZE
#define REG_GOPROC
#define REG_ENCR_SEG_CFG
#define REG_ENCR_SEG_SIZE
#define REG_ENCR_SEG_START
#define REG_CNTR0_IV0
#define REG_CNTR1_IV1
#define REG_CNTR2_IV2
#define REG_CNTR3_IV3
#define REG_CNTR_MASK
#define REG_ENCR_CCM_INT_CNTR0
#define REG_ENCR_CCM_INT_CNTR1
#define REG_ENCR_CCM_INT_CNTR2
#define REG_ENCR_CCM_INT_CNTR3
#define REG_ENCR_XTS_DU_SIZE
#define REG_CNTR_MASK2
#define REG_CNTR_MASK1
#define REG_CNTR_MASK0
#define REG_AUTH_SEG_CFG
#define REG_AUTH_SEG_SIZE
#define REG_AUTH_SEG_START
#define REG_AUTH_IV0
#define REG_AUTH_IV1
#define REG_AUTH_IV2
#define REG_AUTH_IV3
#define REG_AUTH_IV4
#define REG_AUTH_IV5
#define REG_AUTH_IV6
#define REG_AUTH_IV7
#define REG_AUTH_IV8
#define REG_AUTH_IV9
#define REG_AUTH_IV10
#define REG_AUTH_IV11
#define REG_AUTH_IV12
#define REG_AUTH_IV13
#define REG_AUTH_IV14
#define REG_AUTH_IV15
#define REG_AUTH_INFO_NONCE0
#define REG_AUTH_INFO_NONCE1
#define REG_AUTH_INFO_NONCE2
#define REG_AUTH_INFO_NONCE3
#define REG_AUTH_BYTECNT0
#define REG_AUTH_BYTECNT1
#define REG_AUTH_BYTECNT2
#define REG_AUTH_BYTECNT3
#define REG_AUTH_EXP_MAC0
#define REG_AUTH_EXP_MAC1
#define REG_AUTH_EXP_MAC2
#define REG_AUTH_EXP_MAC3
#define REG_AUTH_EXP_MAC4
#define REG_AUTH_EXP_MAC5
#define REG_AUTH_EXP_MAC6
#define REG_AUTH_EXP_MAC7
#define REG_CONFIG
#define REG_GOPROC_QC_KEY
#define REG_GOPROC_OEM_KEY
#define REG_ENCR_KEY0
#define REG_ENCR_KEY1
#define REG_ENCR_KEY2
#define REG_ENCR_KEY3
#define REG_ENCR_KEY4
#define REG_ENCR_KEY5
#define REG_ENCR_KEY6
#define REG_ENCR_KEY7
#define REG_ENCR_XTS_KEY0
#define REG_ENCR_XTS_KEY1
#define REG_ENCR_XTS_KEY2
#define REG_ENCR_XTS_KEY3
#define REG_ENCR_XTS_KEY4
#define REG_ENCR_XTS_KEY5
#define REG_ENCR_XTS_KEY6
#define REG_ENCR_XTS_KEY7
#define REG_AUTH_KEY0
#define REG_AUTH_KEY1
#define REG_AUTH_KEY2
#define REG_AUTH_KEY3
#define REG_AUTH_KEY4
#define REG_AUTH_KEY5
#define REG_AUTH_KEY6
#define REG_AUTH_KEY7
#define REG_AUTH_KEY8
#define REG_AUTH_KEY9
#define REG_AUTH_KEY10
#define REG_AUTH_KEY11
#define REG_AUTH_KEY12
#define REG_AUTH_KEY13
#define REG_AUTH_KEY14
#define REG_AUTH_KEY15

/* Register bits - REG_VERSION */
#define CORE_STEP_REV_SHIFT
#define CORE_STEP_REV_MASK
#define CORE_MINOR_REV_SHIFT
#define CORE_MINOR_REV_MASK
#define CORE_MAJOR_REV_SHIFT
#define CORE_MAJOR_REV_MASK

/* Register bits - REG_STATUS */
#define MAC_FAILED_SHIFT
#define DOUT_SIZE_AVAIL_SHIFT
#define DOUT_SIZE_AVAIL_MASK
#define DIN_SIZE_AVAIL_SHIFT
#define DIN_SIZE_AVAIL_MASK
#define HSD_ERR_SHIFT
#define ACCESS_VIOL_SHIFT
#define PIPE_ACTIVE_ERR_SHIFT
#define CFG_CHNG_ERR_SHIFT
#define DOUT_ERR_SHIFT
#define DIN_ERR_SHIFT
#define AXI_ERR_SHIFT
#define CRYPTO_STATE_SHIFT
#define CRYPTO_STATE_MASK
#define ENCR_BUSY_SHIFT
#define AUTH_BUSY_SHIFT
#define DOUT_INTR_SHIFT
#define DIN_INTR_SHIFT
#define OP_DONE_INTR_SHIFT
#define ERR_INTR_SHIFT
#define DOUT_RDY_SHIFT
#define DIN_RDY_SHIFT
#define OPERATION_DONE_SHIFT
#define SW_ERR_SHIFT

/* Register bits - REG_STATUS2 */
#define AXI_EXTRA_SHIFT
#define LOCKED_SHIFT

/* Register bits - REG_CONFIG */
#define REQ_SIZE_SHIFT
#define REQ_SIZE_MASK
#define REQ_SIZE_ENUM_1_BEAT
#define REQ_SIZE_ENUM_2_BEAT
#define REQ_SIZE_ENUM_3_BEAT
#define REQ_SIZE_ENUM_4_BEAT
#define REQ_SIZE_ENUM_5_BEAT
#define REQ_SIZE_ENUM_6_BEAT
#define REQ_SIZE_ENUM_7_BEAT
#define REQ_SIZE_ENUM_8_BEAT
#define REQ_SIZE_ENUM_9_BEAT
#define REQ_SIZE_ENUM_10_BEAT
#define REQ_SIZE_ENUM_11_BEAT
#define REQ_SIZE_ENUM_12_BEAT
#define REQ_SIZE_ENUM_13_BEAT
#define REQ_SIZE_ENUM_14_BEAT
#define REQ_SIZE_ENUM_15_BEAT
#define REQ_SIZE_ENUM_16_BEAT

#define MAX_QUEUED_REQ_SHIFT
#define MAX_QUEUED_REQ_MASK
#define ENUM_1_QUEUED_REQS
#define ENUM_2_QUEUED_REQS
#define ENUM_3_QUEUED_REQS

#define IRQ_ENABLES_SHIFT
#define IRQ_ENABLES_MASK

#define LITTLE_ENDIAN_MODE_SHIFT
#define PIPE_SET_SELECT_SHIFT
#define PIPE_SET_SELECT_MASK

#define HIGH_SPD_EN_N_SHIFT
#define MASK_DOUT_INTR_SHIFT
#define MASK_DIN_INTR_SHIFT
#define MASK_OP_DONE_INTR_SHIFT
#define MASK_ERR_INTR_SHIFT

/* Register bits - REG_AUTH_SEG_CFG */
#define COMP_EXP_MAC_SHIFT
#define COMP_EXP_MAC_DISABLED
#define COMP_EXP_MAC_ENABLED

#define F9_DIRECTION_SHIFT
#define F9_DIRECTION_UPLINK
#define F9_DIRECTION_DOWNLINK

#define AUTH_NONCE_NUM_WORDS_SHIFT
#define AUTH_NONCE_NUM_WORDS_MASK

#define USE_PIPE_KEY_AUTH_SHIFT
#define USE_HW_KEY_AUTH_SHIFT
#define AUTH_FIRST_SHIFT
#define AUTH_LAST_SHIFT

#define AUTH_POS_SHIFT
#define AUTH_POS_MASK
#define AUTH_POS_BEFORE
#define AUTH_POS_AFTER

#define AUTH_SIZE_SHIFT
#define AUTH_SIZE_MASK
#define AUTH_SIZE_SHA1
#define AUTH_SIZE_SHA256
#define AUTH_SIZE_ENUM_1_BYTES
#define AUTH_SIZE_ENUM_2_BYTES
#define AUTH_SIZE_ENUM_3_BYTES
#define AUTH_SIZE_ENUM_4_BYTES
#define AUTH_SIZE_ENUM_5_BYTES
#define AUTH_SIZE_ENUM_6_BYTES
#define AUTH_SIZE_ENUM_7_BYTES
#define AUTH_SIZE_ENUM_8_BYTES
#define AUTH_SIZE_ENUM_9_BYTES
#define AUTH_SIZE_ENUM_10_BYTES
#define AUTH_SIZE_ENUM_11_BYTES
#define AUTH_SIZE_ENUM_12_BYTES
#define AUTH_SIZE_ENUM_13_BYTES
#define AUTH_SIZE_ENUM_14_BYTES
#define AUTH_SIZE_ENUM_15_BYTES
#define AUTH_SIZE_ENUM_16_BYTES

#define AUTH_MODE_SHIFT
#define AUTH_MODE_MASK
#define AUTH_MODE_HASH
#define AUTH_MODE_HMAC
#define AUTH_MODE_CCM
#define AUTH_MODE_CMAC

#define AUTH_KEY_SIZE_SHIFT
#define AUTH_KEY_SIZE_MASK
#define AUTH_KEY_SZ_AES128
#define AUTH_KEY_SZ_AES256

#define AUTH_ALG_SHIFT
#define AUTH_ALG_MASK
#define AUTH_ALG_NONE
#define AUTH_ALG_SHA
#define AUTH_ALG_AES
#define AUTH_ALG_KASUMI
#define AUTH_ALG_SNOW3G
#define AUTH_ALG_ZUC

/* Register bits - REG_ENCR_XTS_DU_SIZE */
#define ENCR_XTS_DU_SIZE_SHIFT
#define ENCR_XTS_DU_SIZE_MASK

/* Register bits - REG_ENCR_SEG_CFG */
#define F8_KEYSTREAM_ENABLE_SHIFT
#define F8_KEYSTREAM_DISABLED
#define F8_KEYSTREAM_ENABLED

#define F8_DIRECTION_SHIFT
#define F8_DIRECTION_UPLINK
#define F8_DIRECTION_DOWNLINK

#define USE_PIPE_KEY_ENCR_SHIFT
#define USE_PIPE_KEY_ENCR_ENABLED
#define USE_KEY_REGISTERS

#define USE_HW_KEY_ENCR_SHIFT
#define USE_KEY_REG
#define USE_HW_KEY

#define LAST_CCM_SHIFT
#define LAST_CCM_XFR
#define INTERM_CCM_XFR

#define CNTR_ALG_SHIFT
#define CNTR_ALG_MASK
#define CNTR_ALG_NIST

#define ENCODE_SHIFT

#define ENCR_MODE_SHIFT
#define ENCR_MODE_MASK
#define ENCR_MODE_ECB
#define ENCR_MODE_CBC
#define ENCR_MODE_CTR
#define ENCR_MODE_XTS
#define ENCR_MODE_CCM

#define ENCR_KEY_SZ_SHIFT
#define ENCR_KEY_SZ_MASK
#define ENCR_KEY_SZ_DES
#define ENCR_KEY_SZ_3DES
#define ENCR_KEY_SZ_AES128
#define ENCR_KEY_SZ_AES256

#define ENCR_ALG_SHIFT
#define ENCR_ALG_MASK
#define ENCR_ALG_NONE
#define ENCR_ALG_DES
#define ENCR_ALG_AES
#define ENCR_ALG_KASUMI
#define ENCR_ALG_SNOW_3G
#define ENCR_ALG_ZUC

/* Register bits - REG_GOPROC */
#define GO_SHIFT
#define CLR_CNTXT_SHIFT
#define RESULTS_DUMP_SHIFT

/* Register bits - REG_ENGINES_AVAIL */
#define ENCR_AES_SEL_SHIFT
#define DES_SEL_SHIFT
#define ENCR_SNOW3G_SEL_SHIFT
#define ENCR_KASUMI_SEL_SHIFT
#define SHA_SEL_SHIFT
#define SHA512_SEL_SHIFT
#define AUTH_AES_SEL_SHIFT
#define AUTH_SNOW3G_SEL_SHIFT
#define AUTH_KASUMI_SEL_SHIFT
#define BAM_PIPE_SETS_SHIFT
#define BAM_PIPE_SETS_MASK
#define AXI_WR_BEATS_SHIFT
#define AXI_WR_BEATS_MASK
#define AXI_RD_BEATS_SHIFT
#define AXI_RD_BEATS_MASK
#define ENCR_ZUC_SEL_SHIFT
#define AUTH_ZUC_SEL_SHIFT
#define ZUC_ENABLE_SHIFT

#endif /* _REGS_V5_H_ */