mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-30 07:39:24 +00:00

This patch adds an internal UART init routine that gets called from the external facing clock init function. In the first pass this call does an explicit disable of all UART clock-gates. Later changes will enable only the UART clock-gates we care about. Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
33 lines
894 B
C
33 lines
894 B
C
/*
|
|
* Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
#include <imx_regs.h>
|
|
#include <imx_clock.h>
|
|
|
|
static void imx7_clock_uart_init(void)
|
|
{
|
|
unsigned int i;
|
|
|
|
for (i = 0; i < MXC_MAX_UART_NUM; i++)
|
|
imx_clock_disable_uart(i);
|
|
}
|
|
|
|
void imx_clock_init(void)
|
|
{
|
|
/*
|
|
* The BootROM hands off to the next stage with the internal 24 MHz XTAL
|
|
* crystal already clocking the main PLL, which is very handy.
|
|
* Here we should enable whichever peripherals are required for ATF and
|
|
* OPTEE.
|
|
*
|
|
* Subsequent stages in the boot process such as u-boot and Linux
|
|
* already have a significant and mature code-base around clocks, so our
|
|
* objective should be to enable what we need for ATF/OPTEE without
|
|
* breaking any existing upstream code in Linux and u-boot.
|
|
*/
|
|
|
|
/* Initialize UART clocks */
|
|
imx7_clock_uart_init();
|
|
}
|