blob: ebe1402295174c901a181392ab45a46cdf167f21 [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001/******************************************************************************
2 *
3 * (C)Copyright 2005 - 2011 Marvell. All Rights Reserved.
4 *
5 * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MARVELL.
6 * The copyright notice above does not evidence any actual or intended
7 * publication of such source code.
8 * This Module contains Proprietary Information of Marvell and should be
9 * treated as Confidential.
10 * The information in this file is provided for the exclusive use of the
11 * licensees of Marvell.
12 * Such users have the right to use, modify, and incorporate this code into
13 * products for purposes authorized by the license agreement provided they
14 * include this notice and the associated copyright notice with any such
15 * product.
16 * The information in this file is provided "AS IS" without warranty.
17
18 ******************************************************************************/
19/*************************************************************
20 * Timer.h
21 *
22 * Contents:
23 * Definitions and functions declarations used fin the
24 * Boot ROM development
25 *
26 *************************************************************/
27#ifndef __timer_h
28#define __timer_h
29
30#include "TMR.h"
31#include "PlatformConfig.h"
32
33#define TIMER_CER (volatile UINT_T *)TMR1_CER
34#define TIMER_ENABLE (*TIMER_CER |= 1)
35
36#define WAITINMICROSECONDS 0
37#define WAITINMILLISECONDS 1
38
39// Prototypes
40UINT_T GetOSCR0(void);
41UINT_T OSCR0IntervalInSec(UINT_T Before, UINT_T After);
42UINT_T OSCR0IntervalInMilli(UINT_T Before, UINT_T After);
43UINT_T OSCR0IntervalInMicro(UINT_T Before, UINT_T After);
44UINT32 InitSODTimer( void );
45UINT32 GetSODTimerValue( void );
46UINT_T GetElapsedTimeUSecFromSOD( void );
47void Delay(UINT_T uSec);
48UINT_T WaitForOperationComplete(UINT_T TimeOutValue, UINT8_T WaitGranularity, VUINT_T *pAddress, UINT_T Value, UINT_T Mask);
49
50#endif // Misc_h