/*
 *               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 __SHA_HAL_H__
#define __SHA_HAL_H__


#if defined(RVL)
#include "iostypes.h"
#else
#include "types.h"
#endif

// #define SHA_OP_TIME	1000
#define SHA_OP_TIME	10000

/* Error codes */
#define SHA_ERROR_OK            0
#define SHA_ERROR_UNKNOWN       1
#define SHA_ERROR_INTR          2
#define SHA_ERROR_ACCESS        3
#define SHA_ERROR_SIZE          4
#define SHA_ERROR_TIMEOUT       5


void _SHA_Init(u32 initBuf[]);
void _SHA_Setup(u32 addr);
void _SHA_Hash(u32 numBlocks, u32 intr);
void _SHA_GetResult(u32 *hash);
int  _SHA_Wait4Done(u32 timeout, u32 pollOnly);
int   SHA_Hash(u32 addr, u32 numBlocks, u32 intr, u32 *hash);

#endif /* __SHA_HAL_H__*/
