mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-08-15 08:57:02 +02:00
Main fixes: * Include header file for function declarations [Rule 8.4] * Move global object into function [Rule 8.9] Change-Id: I1bc9f3f0ebd4ffc0b8444ac856cd97b0cb56bda4 Signed-off-by: Anthony Zhou <anzhou@nvidia.com>
31 lines
597 B
C
31 lines
597 B
C
/*
|
|
* Copyright (c) 2015-2017, ARM Limited and Contributors. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#include <delay_timer.h>
|
|
#include <mmio.h>
|
|
#include <tegra_def.h>
|
|
#include <tegra_private.h>
|
|
|
|
static uint32_t tegra_timerus_get_value(void)
|
|
{
|
|
return mmio_read_32(TEGRA_TMRUS_BASE);
|
|
}
|
|
|
|
/*
|
|
* Initialise the on-chip free rolling us counter as the delay
|
|
* timer.
|
|
*/
|
|
void tegra_delay_timer_init(void)
|
|
{
|
|
static const timer_ops_t tegra_timer_ops = {
|
|
.get_timer_value = tegra_timerus_get_value,
|
|
.clk_mult = 1,
|
|
.clk_div = 1,
|
|
};
|
|
|
|
timer_init(&tegra_timer_ops);
|
|
}
|