arm-trusted-firmware/plat/arm/board/arm_fpga/fpga_def.h
Oliver Swede 2d696d1811 plat/arm/board/arm_fpga: Initialize the System Counter
This sets the frequency of the system counter so that the Delay Timer
driver programs the correct value to CNTCRL. This value depends on
the FPGA image being used, and is 10MHz for the initial test image.
Once configured, the BL31 platform setup sequence then enables the
system counter.

Signed-off-by: Oliver Swede <oli.swede@arm.com>
Change-Id: Ieb036a36fd990f350b5953357424a255b8ac5d5a
2020-03-26 20:40:50 +00:00

36 lines
1 KiB
C

/*
* Copyright (c) 2020, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <lib/utils_def.h>
#ifndef FPGA_DEF_H
#define FPGA_DEF_H
/*
* The initial FPGA image configures a system with 2 clusters, 1 core in each,
* and multi-threading is unimplemented.
*/
#define FPGA_MAX_CLUSTER_COUNT 2
#define FPGA_MAX_CPUS_PER_CLUSTER 1
#define FPGA_MAX_PE_PER_CPU 1
#define FPGA_PRIMARY_CPU 0x0
/*******************************************************************************
* FPGA image memory map related constants
******************************************************************************/
/* UART base address and clock frequency, as configured by the image */
#define PLAT_FPGA_BOOT_UART_BASE 0x7ff80000
#define PLAT_FPGA_BOOT_UART_CLK_IN_HZ 10000000
#define PLAT_FPGA_CRASH_UART_BASE PLAT_FPGA_BOOT_UART_BASE
#define PLAT_FPGA_CRASH_UART_CLK_IN_HZ PLAT_FPGA_BOOT_UART_CLK_IN_HZ
#define FPGA_TIMER_FREQUENCY 10000000
#define FPGA_TIMER_BASE 0x2a830000
#endif