include: move MHZ_TICKS_PER_SEC to utils_def.h

This patch moves the MHZ_TICKS_PER_SEC macro to utils_def.h
for other platforms to use.

Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Change-Id: I6c4dc733f548d73cfdb3515ec9ad89a9efaf4407
This commit is contained in:
Varun Wadekar 2020-02-13 13:07:12 -08:00
parent 56e7d6a716
commit d4b29105f4
3 changed files with 10 additions and 6 deletions

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2016-2019, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2020, NVIDIA Corporation. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@ -12,11 +13,9 @@
#include <common/debug.h>
#include <drivers/delay_timer.h>
#include <drivers/generic_delay_timer.h>
#include <lib/utils_def.h>
#include <plat/common/platform.h>
/* Ticks elapsed in one second by a signal of 1 MHz */
#define MHZ_TICKS_PER_SEC 1000000
static timer_ops_t ops;
static uint32_t get_timer_value(void)

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2016-2019, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2020, NVIDIA Corporation. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@ -157,4 +158,9 @@
# define SPECULATION_SAFE_VALUE(var) var
#endif
/*
* Ticks elapsed in one second with a signal of 1 MHz
*/
#define MHZ_TICKS_PER_SEC U(1000000)
#endif /* UTILS_DEF_H */

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2016-2019, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2020, NVIDIA Corporation. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@ -9,6 +10,7 @@
#include <arch.h>
#include <lib/pmf/pmf.h>
#include <lib/psci/psci.h>
#include <lib/utils_def.h>
#include <plat/common/platform.h>
#if ENABLE_PSCI_STAT && ENABLE_PMF
@ -16,9 +18,6 @@
#pragma weak plat_psci_stat_accounting_stop
#pragma weak plat_psci_stat_get_residency
/* Ticks elapsed in one second by a signal of 1 MHz */
#define MHZ_TICKS_PER_SEC 1000000U
/* Maximum time-stamp value read from architectural counters */
#ifdef __aarch64__
#define MAX_TS UINT64_MAX