1/* 2 * Copyright 2017, Data61 3 * Commonwealth Scientific and Industrial Research Organisation (CSIRO) 4 * ABN 41 687 119 230. 5 * 6 * This software may be distributed and modified according to the terms of 7 * the GNU General Public License version 2. Note that NO WARRANTY is provided. 8 * See "LICENSE_GPLv2.txt" for details. 9 * 10 * @TAG(DATA61_GPL) 11 */ 12 13#ifndef __ARCH_MODE_MACHINE_TIMER_H_ 14#define __ARCH_MODE_MACHINE_TIMER_H_ 15 16#include <config.h> 17#include <stdint.h> 18#include <plat/machine/hardware.h> 19#include <mode/machine.h> 20 21/* Use Hypervisor Physical timer */ 22#ifdef CONFIG_ARM_HYPERVISOR_SUPPORT 23#define CNT_TVAL CNTHP_TVAL 24#define CNT_CTL CNTHP_CTL 25#define CNT_CVAL CNTHP_CVAL 26#else 27/* Use virtual timer */ 28#define CNT_TVAL CNTV_TVAL 29#define CNT_CTL CNTV_CTL 30#define CNT_CVAL CNTV_CVAL 31#endif 32 33#endif /* __ARCH_MODE_MACHINE_TIMER_H_ */ 34