Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Arm Trusted Firmware
Commits
3df38b65
Commit
3df38b65
authored
Jun 25, 2020
by
Mark Dykes
Committed by
TrustedFirmware Code Review
Jun 25, 2020
Browse files
Merge "plat/fvp: Dynamic description of clock freq" into integration
parents
ea960761
156dbdd4
Changes
1
Hide whitespace changes
Inline
Side-by-side
plat/arm/board/fvp/fvp_bl31_setup.c
View file @
3df38b65
...
...
@@ -7,7 +7,9 @@
#include <assert.h>
#include <common/debug.h>
#include <drivers/arm/smmu_v3.h>
#include <fconf_hw_config_getter.h>
#include <lib/fconf/fconf.h>
#include <lib/mmio.h>
#include <plat/arm/common/arm_config.h>
#include <plat/arm/common/plat_arm.h>
#include <plat/common/platform.h>
...
...
@@ -65,3 +67,26 @@ void __init bl31_plat_arch_setup(void)
fconf_populate
(
"HW_CONFIG"
,
hw_config_dtb
);
#endif
}
unsigned
int
plat_get_syscnt_freq2
(
void
)
{
unsigned
int
counter_base_frequency
;
#if !RESET_TO_BL31 && !BL2_AT_EL3
/* Get the frequency through FCONF API for HW_CONFIG */
counter_base_frequency
=
FCONF_GET_PROPERTY
(
hw_config
,
cpu_timer
,
clock_freq
);
if
(
counter_base_frequency
>
0U
)
{
return
counter_base_frequency
;
}
#endif
/* Read the frequency from Frequency modes table */
counter_base_frequency
=
mmio_read_32
(
ARM_SYS_CNTCTL_BASE
+
CNTFID_OFF
);
/* The first entry of the frequency modes table must not be 0 */
if
(
counter_base_frequency
==
0U
)
{
panic
();
}
return
counter_base_frequency
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment