developer | 550bf5e | 2016-07-11 16:05:23 +0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2016, ARM Limited and Contributors. All rights reserved. |
| 3 | * |
dp-arm | fa3cf0b | 2017-05-03 09:38:09 +0100 | [diff] [blame] | 4 | * SPDX-License-Identifier: BSD-3-Clause |
developer | 550bf5e | 2016-07-11 16:05:23 +0800 | [diff] [blame] | 5 | */ |
| 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 | |
| 24 | void generic_timer_backup(void); |
| 25 | void sched_clock_init(uint64_t normal_base, uint64_t atf_base); |
| 26 | uint64_t sched_clock(void); |
| 27 | |
| 28 | #endif /* __MT_CPUXGPT_H__ */ |