mt_cpuxgpt.h 722 Bytes
Newer Older
1
/*
Leon Chen's avatar
Leon Chen committed
2
 * Copyright (c) 2016, ARM Limited and Contributors. All rights reserved.
3
 *
dp-arm's avatar
dp-arm committed
4
 * SPDX-License-Identifier: BSD-3-Clause
5
6
 */

Leon Chen's avatar
Leon Chen committed
7
8
#ifndef __MT_CPUXGPT_H__
#define __MT_CPUXGPT_H__
9

Leon Chen's avatar
Leon Chen committed
10
11
12
13
14
/* REG */
#define INDEX_CTL_REG       0x000
#define INDEX_STA_REG       0x004
#define INDEX_CNT_L_INIT    0x008
#define INDEX_CNT_H_INIT    0x00C
15

Leon Chen's avatar
Leon Chen committed
16
17
18
19
20
21
22
/* CTL_REG SET */
#define EN_CPUXGPT          0x01
#define EN_AHLT_DEBUG       0x02
#define CLK_DIV1            (0x1 << 8)
#define CLK_DIV2            (0x2 << 8)
#define CLK_DIV4            (0x4 << 8)
#define CLK_DIV_MASK        (~(0x7<<8))
23

Leon Chen's avatar
Leon Chen committed
24
25
26
void generic_timer_backup(void);
void sched_clock_init(uint64_t normal_base, uint64_t atf_base);
uint64_t sched_clock(void);
27

Leon Chen's avatar
Leon Chen committed
28
#endif /* __MT_CPUXGPT_H__ */