/***************************************
* Auto generated by BFGen, do not edit *
***************************************/

/*
   bfgen -I soclib_crypto.bf -o cdefs cdefs_sfx_shifted_field_mask=
*/

#ifndef _SOCLIB_CRYPTO_BFGEN_DEFS_
#define _SOCLIB_CRYPTO_BFGEN_DEFS_

#define SOCLIB_CRYPTO_KEY_ADDR(ridx)                 (0x00000000 + (ridx) * 4)
#define SOCLIB_CRYPTO_KEY_COUNT                      8

#define SOCLIB_CRYPTO_IV_ADDR(ridx)                  (0x00000100 + (ridx) * 4)
#define SOCLIB_CRYPTO_IV_COUNT                       8

#define SOCLIB_CRYPTO_DMASRC_ADDR                    0x00000200

#define SOCLIB_CRYPTO_DMADST_ADDR                    0x00000204

/** size of the data in bytes.  @multiple */
#define SOCLIB_CRYPTO_DMALEN_ADDR                    0x00000208

/** The processing starts when the operation id is written to this register  @multiple */
#define SOCLIB_CRYPTO_OP_ADDR                        0x0000020c
    #define SOCLIB_CRYPTO_OP_AES256_CBC_DECRYPT  0x15
    #define SOCLIB_CRYPTO_OP_AES192_ECB_DECRYPT  0x3
    #define SOCLIB_CRYPTO_OP_AES128_CBC_DECRYPT  0x11
    #define SOCLIB_CRYPTO_OP_AES192_ECB_CRYPT    0x2
    #define SOCLIB_CRYPTO_OP_AES256_CBC_CRYPT    0x14
    #define SOCLIB_CRYPTO_OP_AES128_ECB_DECRYPT  0x1
    #define SOCLIB_CRYPTO_OP_AES256_ECB_CRYPT    0x4
    #define SOCLIB_CRYPTO_OP_AES192_CBC_CRYPT    0x12
    #define SOCLIB_CRYPTO_OP_AES128_ECB_CRYPT    0x0
    #define SOCLIB_CRYPTO_OP_AES192_CBC_DECRYPT  0x13
    #define SOCLIB_CRYPTO_OP_AES128_CBC_CRYPT    0x10
    #define SOCLIB_CRYPTO_OP_AES256_ECB_DECRYPT  0x5

#define SOCLIB_CRYPTO_STATUS_ADDR                    0x00000210
  /** This flag reads as one when the device is processing data.  @multiple */
  #define SOCLIB_CRYPTO_STATUS_BUSY                  0x00000001
  /** This field indicates the error status.  @multiple */
  #define SOCLIB_CRYPTO_STATUS_ERROR_SHIFTED(x)      ((x) << 8)
  #define SOCLIB_CRYPTO_STATUS_ERROR_GET(x)          (((x) >> 8) & 0xffffff)
    #define SOCLIB_CRYPTO_STATUS_ERROR_REMAINING 0x6
    #define SOCLIB_CRYPTO_STATUS_ERROR_WRITE     0x4
    #define SOCLIB_CRYPTO_STATUS_ERROR_WRITE_IO  0x1
    #define SOCLIB_CRYPTO_STATUS_ERROR_READ      0x3
    #define SOCLIB_CRYPTO_STATUS_ERROR_NONE      0x0
    #define SOCLIB_CRYPTO_STATUS_ERROR_READ_IO   0x2
    #define SOCLIB_CRYPTO_STATUS_ERROR_CRYPTO_CFG 0x5

#define SOCLIB_CRYPTO_IRQEN_ADDR                     0x00000214
  /** The device will generate an irq when a processing operation terminates  @multiple */
  #define SOCLIB_CRYPTO_IRQEN_DONE                   0x00000001

/** Reading from this register indicates which interrupts are pending and reset the pending state  @multiple */
#define SOCLIB_CRYPTO_IRQPEND_ADDR                   0x00000214
  /** A processing operation terminated interrupt is pending  @multiple */
  #define SOCLIB_CRYPTO_IRQPEND_DONE                 0x00000001

#endif

