summaryrefslogtreecommitdiff
path: root/arch/arm/mach-stm32mp/stm32mp1/cpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-stm32mp/stm32mp1/cpu.c')
-rw-r--r--arch/arm/mach-stm32mp/stm32mp1/cpu.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/arm/mach-stm32mp/stm32mp1/cpu.c b/arch/arm/mach-stm32mp/stm32mp1/cpu.c
index cb1b84c9af9..18175fd12cc 100644
--- a/arch/arm/mach-stm32mp/stm32mp1/cpu.c
+++ b/arch/arm/mach-stm32mp/stm32mp1/cpu.c
@@ -82,7 +82,7 @@ void dram_bank_mmu_setup(int bank)
option = DCACHE_DEFAULT_OPTION;
if (use_lmb &&
(lmb_is_reserved_flags(i << MMU_SECTION_SHIFT, LMB_NOMAP) ||
- addr >= gd->ram_top)
+ (gd->ram_top && addr >= gd->ram_top))
)
option = 0; /* INVALID ENTRY in TLB */
set_section_dcache(i, option);
@@ -138,8 +138,6 @@ int mach_cpu_init(void)
if (IS_ENABLED(CONFIG_CMD_STM32PROG_SERIAL) &&
(boot_mode & TAMP_BOOT_DEVICE_MASK) == BOOT_SERIAL_UART)
gd->flags |= GD_FLG_SILENT | GD_FLG_DISABLE_CONSOLE;
- else if (IS_ENABLED(CONFIG_DEBUG_UART) && IS_ENABLED(CONFIG_XPL_BUILD))
- debug_uart_init();
return 0;
}