/*-----------------------------------------------------------------------------------
!
!                              COPYRIGHT 2015 BY
!                            MegaChips Corporation
!
!------------------------------------------------------------------------------------
! These coded instructions, statements, and computer programs include
! intellectual property and know-how belonging to MegaChips
! Corporaiton ("MCC") and its partner companies.
! Therefore, do not use these specifications for any purpose other than
! the purpose
! expressly agreed to by MCCs customer and MCC.  Also, do not duplicate,
! copy,
! or reproduce these specifications, nor reveal these specifications to
! any third party
! without MCCs prior written consent.
!
*/
/*-----------------------------------------------------------------------------------
  FILE        : bol_reg.h
  DESCRIPTION : BOL Register
  Revision    : $Rev: 4 $
  Author      : $Author: shirait $
  Date        : $Date: 2015-09-09 15:19:58 +0900 (水, 09 9 2015) $
-----------------------------------------------------------------------------------*/
#ifndef ___BOL_REG_H_INCLUDED___
#define ___BOL_REG_H_INCLUDED___

#include <stdint.h>

#define BOL_REG_BASE (0x40009000u)

typedef struct _tagBolReg {
	uint32_t bol_en;
	uint32_t bol_status;
	uint32_t bol_size;
	uint32_t aes_sk[4];
	uint32_t aes_iv[4];
} BolReg;

#define BOLR (*(volatile BolReg*)(BOL_REG_BASE))

#define BOLR_KEY_SIZE (16)
#define BOLR_IV_SIZE  (16)


#define BOLR_START   (0x00000001u)
#define BOLR_IDLE    (0x00000000u)

#endif // ___BOL_REG_H_INCLUDED___
