Browse Source
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>pull/2005/merge
Yann Gautier
6 months ago
4 changed files with 36 additions and 0 deletions
@ -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); |
|||
} |
@ -0,0 +1,12 @@ |
|||
/*
|
|||
* Copyright (c) 2024, STMicroelectronics - All Rights Reserved |
|||
* |
|||
* SPDX-License-Identifier: BSD-3-Clause |
|||
*/ |
|||
|
|||
#ifndef STM32MP2_DDR_HELPERS_H |
|||
#define STM32MP2_DDR_HELPERS_H |
|||
|
|||
void ddr_sub_system_clk_init(void); |
|||
|
|||
#endif /* STM32MP2_DDR_HELPERS_H */ |
Loading…
Reference in new issue