Home | History | Annotate | Download | only in timer
      1 /*
      2  * Copyright (c) 2016, ARM Limited and Contributors. All rights reserved.
      3  *
      4  * SPDX-License-Identifier: BSD-3-Clause
      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__ */
     29