mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-05-08 10:08:47 +00:00
feat(stm32mp2): enable DDR sub-system clock
Create a DDR helper files, and add a function to enable DDR clocks in RCC_DDRCPCFGR register. Call this ddr_sub_system_clk_init() just before clock driver init, as it needs to be done before enabling DDR PLL clock (PLL2). Change-Id: I365d6aa034363d0c036ce2d9f944f077ba86e193 Signed-off-by: Yann Gautier <yann.gautier@st.com>
This commit is contained in:
parent
c3a7534167
commit
5e0be8c024
4 changed files with 36 additions and 0 deletions
15
drivers/st/ddr/stm32mp2_ddr_helpers.c
Normal file
15
drivers/st/ddr/stm32mp2_ddr_helpers.c
Normal file
|
@ -0,0 +1,15 @@
|
|||
/*
|
||||
* Copyright (c) 2024, STMicroelectronics - All Rights Reserved
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
#include <lib/mmio.h>
|
||||
|
||||
#include <platform_def.h>
|
||||
|
||||
void ddr_sub_system_clk_init(void)
|
||||
{
|
||||
mmio_write_32(stm32mp_rcc_base() + RCC_DDRCPCFGR,
|
||||
RCC_DDRCPCFGR_DDRCPEN | RCC_DDRCPCFGR_DDRCPLPEN);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue