2013-10-25 09:08:21 +01:00
|
|
|
/*
|
2018-01-10 15:59:31 +00:00
|
|
|
* Copyright (c) 2013-2018, ARM Limited and Contributors. All rights reserved.
|
2013-10-25 09:08:21 +01:00
|
|
|
*
|
2017-05-03 09:38:09 +01:00
|
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
2013-10-25 09:08:21 +01:00
|
|
|
*/
|
|
|
|
|
2016-05-17 09:48:10 +01:00
|
|
|
#include <generic_delay_timer.h>
|
2015-12-01 16:10:15 +00:00
|
|
|
#include <mmio.h>
|
2015-03-19 19:17:53 +00:00
|
|
|
#include <plat_arm.h>
|
2018-02-21 01:16:39 +00:00
|
|
|
#include <platform.h>
|
2015-03-17 14:54:01 +00:00
|
|
|
#include <sp804_delay_timer.h>
|
|
|
|
#include <v2m_def.h>
|
|
|
|
#include "fvp_def.h"
|
2014-05-14 17:44:19 +01:00
|
|
|
#include "fvp_private.h"
|
2013-10-25 09:08:21 +01:00
|
|
|
|
2018-01-10 15:59:31 +00:00
|
|
|
void bl2_early_platform_setup2(u_register_t arg0, u_register_t arg1, u_register_t arg2, u_register_t arg3)
|
2013-10-25 09:08:21 +01:00
|
|
|
{
|
2018-01-15 14:45:33 +00:00
|
|
|
arm_bl2_early_platform_setup((uintptr_t)arg0, (meminfo_t *)arg1);
|
2013-10-25 09:08:21 +01:00
|
|
|
|
|
|
|
/* Initialize the platform config for future decision making */
|
2014-05-15 14:53:30 +01:00
|
|
|
fvp_config_setup();
|
2014-05-16 18:48:12 +01:00
|
|
|
}
|
2015-03-17 14:54:01 +00:00
|
|
|
|
|
|
|
void bl2_platform_setup(void)
|
|
|
|
{
|
|
|
|
arm_bl2_platform_setup();
|
|
|
|
|
2016-05-17 09:48:10 +01:00
|
|
|
#if FVP_USE_SP804_TIMER
|
2015-12-01 16:10:15 +00:00
|
|
|
/* Enable the clock override for SP804 timer 0, which means that no
|
|
|
|
* clock dividers are applied and the raw (35 MHz) clock will be used */
|
|
|
|
mmio_write_32(V2M_SP810_BASE, FVP_SP810_CTRL_TIM0_OV);
|
|
|
|
|
2015-03-17 14:54:01 +00:00
|
|
|
/* Initialize delay timer driver using SP804 dual timer 0 */
|
|
|
|
sp804_timer_init(V2M_SP804_TIMER0_BASE,
|
|
|
|
SP804_TIMER_CLKMULT, SP804_TIMER_CLKDIV);
|
2016-05-17 09:48:10 +01:00
|
|
|
#else
|
|
|
|
generic_delay_timer_init();
|
|
|
|
#endif /* FVP_USE_SP804_TIMER */
|
2015-03-17 14:54:01 +00:00
|
|
|
}
|