blob: ebe1402295174c901a181392ab45a46cdf167f21 [file] [log] [blame]
/******************************************************************************
*
* (C)Copyright 2005 - 2011 Marvell. All Rights Reserved.
*
* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MARVELL.
* The copyright notice above does not evidence any actual or intended
* publication of such source code.
* This Module contains Proprietary Information of Marvell and should be
* treated as Confidential.
* The information in this file is provided for the exclusive use of the
* licensees of Marvell.
* Such users have the right to use, modify, and incorporate this code into
* products for purposes authorized by the license agreement provided they
* include this notice and the associated copyright notice with any such
* product.
* The information in this file is provided "AS IS" without warranty.
******************************************************************************/
/*************************************************************
* Timer.h
*
* Contents:
* Definitions and functions declarations used fin the
* Boot ROM development
*
*************************************************************/
#ifndef __timer_h
#define __timer_h
#include "TMR.h"
#include "PlatformConfig.h"
#define TIMER_CER (volatile UINT_T *)TMR1_CER
#define TIMER_ENABLE (*TIMER_CER |= 1)
#define WAITINMICROSECONDS 0
#define WAITINMILLISECONDS 1
// Prototypes
UINT_T GetOSCR0(void);
UINT_T OSCR0IntervalInSec(UINT_T Before, UINT_T After);
UINT_T OSCR0IntervalInMilli(UINT_T Before, UINT_T After);
UINT_T OSCR0IntervalInMicro(UINT_T Before, UINT_T After);
UINT32 InitSODTimer( void );
UINT32 GetSODTimerValue( void );
UINT_T GetElapsedTimeUSecFromSOD( void );
void Delay(UINT_T uSec);
UINT_T WaitForOperationComplete(UINT_T TimeOutValue, UINT8_T WaitGranularity, VUINT_T *pAddress, UINT_T Value, UINT_T Mask);
#endif // Misc_h