/*
 *               Copyright (C) 2005, BroadOn Communications Corp.
 *
 *  These coded instructions, statements, and computer programs contain
 *  unpublished  proprietary information of BroadOn Communications Corp.,
 *  and  are protected by Federal copyright law. They may not be disclosed
 *  to  third  parties or copied or duplicated in any form, in whole or in
 *  part, without the prior written consent of BroadOn Communications Corp.
 *
 */

#ifndef __AES_TEST_H__
#define __AES_TEST_H__

#ifdef LITTLE_ENDIAN
#define LE_ON	1
#else
#define LE_ON	0
#endif

#define MAX_DATA_SIZE           1024

#define SRN_SRAM_MAX_SIZE	(96*1024)       /* 96 KB */
#define SPLASH_MAX_SIZE		0x01800000	/* 24 MB */
#define DDR_MAX_SIZE		0x04000000	/* 64 MB */


int aesCompareBlocks(u32 buf1[], u32 buf2[], s32 numBlocks, s32 little); 

int aesCompareMemBlocks(u32 addr, u32 data[], u32 numBlocks); 

int aesCompareMem(u32 addr1, u32 addr2, u32 len); 

int aesMemWrite(u32 addr, u32 data[], u32 len, u32 readNVerify);

int aesMemFill(u32 addr, u32 pattern, u32 len, u32 readNVerify);

int aesDoEncryptDecryptTest(u32 srcAddr1, u32 dstAddr, u32 srcAddr2, 
    s32 numBlocks, s32 chain, u32 hwEncData[], u32 
    key[], u32 iv[], u32 data[], 	/* Big endian */
    u32 swEncData[], u32 hwDecData[], u32 swDecData[]);

void aesConfigMemAccessForTest();

int aesDoRefTest(u32 testAddr);

int aesDoMultiBlockTest(u32 srcAddr, u32 dstAddr, u32 numBlocks);

int aesDoDmaTest(u32 srcAddr, u32 dstAddr, u32 numBlocks, u32 skipMemInit,
                 u32 oneDmaOnly);

#endif /* __AES_TEST_H__ */
