On 11/9/23 10:11, Patrick DELAUNAY wrote: > Hi, > > On 10/27/23 16:42, Patrice Chotard wrote: >> From: Patrice Chotard <patrice.chot...@st.com> >> >> In case there is no RAM driver retrieve RAM size from DT as fallback. >> >> Signed-off-by: Patrice Chotard <patrice.chot...@st.com> >> Signed-off-by: Patrice Chotard <patrice.chot...@foss.st.com> >> --- >> >> arch/arm/mach-stm32mp/dram_init.c | 7 +++++-- >> 1 file changed, 5 insertions(+), 2 deletions(-) >> >> diff --git a/arch/arm/mach-stm32mp/dram_init.c >> b/arch/arm/mach-stm32mp/dram_init.c >> index 7f37b0d2aa2..a1e77a42e4f 100644 >> --- a/arch/arm/mach-stm32mp/dram_init.c >> +++ b/arch/arm/mach-stm32mp/dram_init.c >> @@ -24,8 +24,11 @@ int dram_init(void) >> int ret; >> ret = uclass_get_device(UCLASS_RAM, 0, &dev); >> - if (ret) { >> - log_debug("RAM init failed: %d\n", ret); >> + /* in case there is no RAM driver, retrieve DDR size from DT */ >> + if (ret == -ENODEV) { >> + return fdtdec_setup_mem_size_base(); >> + } else if (ret) { >> + log_err("RAM init failed: %d\n", ret); >> return ret; >> } >> ret = ram_get_info(dev, &ram); > > > Reviewed-by: Patrick Delaunay <patrick.delau...@foss.st.com> > > Thanks > Patrick > Applied to u-boot-stm32/next Thanks Patrice
- [PATCH v1 0/9] Add STM32MP2 SoCs and STM32MP257F-EV board... Patrice Chotard
- [PATCH v1 2/9] stm32mp: dram_init: Get RAM size from... Patrice Chotard
- [PATCH v1 3/9] stm32mp: dram_init: Fix AARCH64 compi... Patrice Chotard
- [PATCH v1 1/9] arm: caches: Make DCACHE_DEFAULT_OPTI... Patrice Chotard
- Re: [PATCH v1 0/9] Add STM32MP2 SoCs and STM32MP257F... Patrice CHOTARD
- [PATCH v1 0/9] Add STM32MP2 SoCs and STM32MP257F-EV ... Patrice Chotard
- [PATCH v1 2/9] stm32mp: dram_init: Get RAM size ... Patrice Chotard
- Re: [PATCH v1 2/9] stm32mp: dram_init: Get R... Patrick DELAUNAY
- Re: [PATCH v1 2/9] stm32mp: dram_init: G... Patrice CHOTARD
- [PATCH v1 4/9] stm32mp: dram_init: Limit DDR usa... Patrice Chotard
- Re: [PATCH v1 4/9] stm32mp: dram_init: Limit... Patrick DELAUNAY
- Re: [PATCH v1 4/9] stm32mp: dram_init: L... Patrice CHOTARD
- [PATCH v1 3/9] stm32mp: dram_init: Fix AARCH64 c... Patrice Chotard
- Re: [PATCH v1 3/9] stm32mp: dram_init: Fix A... Patrick DELAUNAY
- Re: [PATCH v1 3/9] stm32mp: dram_init: F... Patrice CHOTARD
- Re: [PATCH v1 3/9] stm32mp: dram_init: Fix A... Patrice CHOTARD
- [PATCH v1 1/9] arm: caches: Make DCACHE_DEFAULT_... Patrice Chotard
- Re: [PATCH v1 1/9] arm: caches: Make DCACHE_... Patrick DELAUNAY
- Re: [PATCH v1 1/9] arm: caches: Make DCA... Patrice CHOTARD