blob: 84df081bd9fabc79089d22d62b177fa0b9d0c001 [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
Antonio Nino Diaz5eb88372018-11-08 10:20:19 +00007#ifndef MT_CPUXGPT_H
8#define MT_CPUXGPT_H
developer550bf5e2016-07-11 16:05:23 +08009
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
Antonio Nino Diaz5eb88372018-11-08 10:20:19 +000028#endif /* MT_CPUXGPT_H */