blob: 99b78a77822501ec2ecb9ec9685c31f54b675a85 [file] [log] [blame]
developer550bf5e2016-07-11 16:05:23 +08001/*
2 * Copyright (c) 2016, ARM Limited and Contributors. All rights reserved.
3 *
dp-armfa3cf0b2017-05-03 09:38:09 +01004 * SPDX-License-Identifier: BSD-3-Clause
developer550bf5e2016-07-11 16:05:23 +08005 */
6
7#ifndef __MT_CPUXGPT_H__
8#define __MT_CPUXGPT_H__
9
10/* REG */
11#define INDEX_CTL_REG 0x000
12#define INDEX_STA_REG 0x004
13#define INDEX_CNT_L_INIT 0x008
14#define INDEX_CNT_H_INIT 0x00C
15
16/* CTL_REG SET */
17#define EN_CPUXGPT 0x01
18#define EN_AHLT_DEBUG 0x02
19#define CLK_DIV1 (0x1 << 8)
20#define CLK_DIV2 (0x2 << 8)
21#define CLK_DIV4 (0x4 << 8)
22#define CLK_DIV_MASK (~(0x7<<8))
23
24void generic_timer_backup(void);
25void sched_clock_init(uint64_t normal_base, uint64_t atf_base);
26uint64_t sched_clock(void);
27
28#endif /* __MT_CPUXGPT_H__ */