2015-04-13 07:47:57 +01:00
|
|
|
/*
|
2016-07-11 09:05:23 +01:00
|
|
|
* Copyright (c) 2016, ARM Limited and Contributors. All rights reserved.
|
2015-04-13 07:47:57 +01:00
|
|
|
*
|
2017-05-03 09:38:09 +01:00
|
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
2015-04-13 07:47:57 +01:00
|
|
|
*/
|
|
|
|
|
2018-11-08 10:20:19 +00:00
|
|
|
#ifndef MT_CPUXGPT_H
|
|
|
|
#define MT_CPUXGPT_H
|
2015-04-13 07:47:57 +01:00
|
|
|
|
2016-07-11 09:05:23 +01:00
|
|
|
/* REG */
|
|
|
|
#define INDEX_CTL_REG 0x000
|
|
|
|
#define INDEX_STA_REG 0x004
|
|
|
|
#define INDEX_CNT_L_INIT 0x008
|
|
|
|
#define INDEX_CNT_H_INIT 0x00C
|
2015-04-13 07:47:57 +01:00
|
|
|
|
2016-07-11 09:05:23 +01:00
|
|
|
/* 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))
|
2015-04-13 07:47:57 +01:00
|
|
|
|
2016-07-11 09:05:23 +01:00
|
|
|
void generic_timer_backup(void);
|
|
|
|
void sched_clock_init(uint64_t normal_base, uint64_t atf_base);
|
|
|
|
uint64_t sched_clock(void);
|
2015-04-13 07:47:57 +01:00
|
|
|
|
2018-11-08 10:20:19 +00:00
|
|
|
#endif /* MT_CPUXGPT_H */
|