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
e141aa03
Commit
e141aa03
authored
May 24, 2016
by
danh-arm
Browse files
Merge pull request #625 from antonio-nino-diaz-arm/an/delay-timer-v2
Implement generic delay timer and use it on platforms
parents
d1d71653
6704f425
Changes
27
Show whitespace changes
Inline
Side-by-side
plat/rockchip/common/bl31_plat_setup.c
View file @
e141aa03
...
...
@@ -33,6 +33,7 @@
#include <bl_common.h>
#include <console.h>
#include <debug.h>
#include <generic_delay_timer.h>
#include <mmio.h>
#include <platform.h>
#include <plat_private.h>
...
...
@@ -126,7 +127,7 @@ void bl31_early_platform_setup(bl31_params_t *from_bl2,
******************************************************************************/
void
bl31_platform_setup
(
void
)
{
plat
_delay_timer_init
();
generic
_delay_timer_init
();
plat_rockchip_soc_init
();
/* Initialize the gic cpu and distributor interfaces */
...
...
plat/rockchip/rk3368/platform.mk
View file @
e141aa03
...
...
@@ -58,13 +58,13 @@ BL31_SOURCES += ${RK_GIC_SOURCES} \
drivers/console/console.S
\
drivers/ti/uart/16550_console.S
\
drivers/delay_timer/delay_timer.c
\
drivers/delay_timer/generic_delay_timer.c
\
lib/cpus/aarch64/cortex_a53.S
\
plat/common/aarch64/platform_mp_stack.S
\
${RK_PLAT_COMMON}
/aarch64/plat_helpers.S
\
${RK_PLAT_COMMON}
/bl31_plat_setup.c
\
${RK_PLAT_COMMON}
/pmusram/pmu_sram_cpus_on.S
\
${RK_PLAT_COMMON}
/pmusram/pmu_sram.c
\
${RK_PLAT_COMMON}
/plat_delay_timer.c
\
${RK_PLAT_COMMON}
/plat_pm.c
\
${RK_PLAT_COMMON}
/plat_topology.c
\
${RK_PLAT_COMMON}
/aarch64/platform_common.c
\
...
...
plat/rockchip/rk3368/rk3368_def.h
View file @
e141aa03
...
...
@@ -89,7 +89,6 @@
* System counter frequency related constants
******************************************************************************/
#define SYS_COUNTER_FREQ_IN_TICKS 24000000
#define SYS_COUNTER_FREQ_IN_MHZ 24
/******************************************************************************
* GIC-400 & interrupt handling related constants
...
...
plat/rockchip/rk3399/platform.mk
View file @
e141aa03
...
...
@@ -57,6 +57,7 @@ BL31_SOURCES += ${RK_GIC_SOURCES}
drivers/console/console.S
\
drivers/ti/uart/16550_console.S
\
drivers/delay_timer/delay_timer.c
\
drivers/delay_timer/generic_delay_timer.c
\
lib/cpus/aarch64/cortex_a53.S
\
lib/cpus/aarch64/cortex_a72.S
\
plat/common/aarch64/platform_mp_stack.S
\
...
...
@@ -64,7 +65,6 @@ BL31_SOURCES += ${RK_GIC_SOURCES}
${RK_PLAT_COMMON}
/bl31_plat_setup.c
\
${RK_PLAT_COMMON}
/pmusram/pmu_sram_cpus_on.S
\
${RK_PLAT_COMMON}
/pmusram/pmu_sram.c
\
${RK_PLAT_COMMON}
/plat_delay_timer.c
\
${RK_PLAT_COMMON}
/plat_pm.c
\
${RK_PLAT_COMMON}
/plat_topology.c
\
${RK_PLAT_COMMON}
/aarch64/platform_common.c
\
...
...
plat/rockchip/rk3399/rk3399_def.h
View file @
e141aa03
...
...
@@ -89,7 +89,6 @@
* System counter frequency related constants
******************************************************************************/
#define SYS_COUNTER_FREQ_IN_TICKS 24000000
#define SYS_COUNTER_FREQ_IN_MHZ 24
/* Base rockchip_platform compatible GIC memory map */
#define BASE_GICD_BASE (GIC500_BASE)
...
...
plat/xilinx/zynqmp/aarch64/zynqmp_common.c
View file @
e141aa03
...
...
@@ -297,9 +297,9 @@ void zynqmp_config_setup(void)
mmio_write_32
(
IOU_SCNTRS_CONTROL
,
IOU_SCNTRS_CONTROL_EN
);
}
unsigned
long
long
plat_get_syscnt_freq
(
void
)
unsigned
int
plat_get_syscnt_freq
2
(
void
)
{
unsigned
long
long
counter_base_frequency
;
unsigned
int
counter_base_frequency
;
/* FIXME: Read the frequency from Frequency modes table */
counter_base_frequency
=
zynqmp_get_system_timer_freq
();
...
...
services/std_svc/psci/psci_suspend.c
View file @
e141aa03
...
...
@@ -214,7 +214,7 @@ exit:
void
psci_cpu_suspend_finish
(
unsigned
int
cpu_idx
,
psci_power_state_t
*
state_info
)
{
unsigned
long
long
counter_freq
;
unsigned
int
counter_freq
;
unsigned
int
max_off_lvl
;
/* Ensure we have been woken up from a suspended state */
...
...
@@ -238,7 +238,7 @@ void psci_cpu_suspend_finish(unsigned int cpu_idx,
psci_do_pwrup_cache_maintenance
();
/* Re-init the cntfrq_el0 register */
counter_freq
=
plat_get_syscnt_freq
();
counter_freq
=
plat_get_syscnt_freq
2
();
write_cntfrq_el0
(
counter_freq
);
/*
...
...
Prev
1
2
Next
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