mpfs: Kconfig/Make: add DDR support flag

This adds the proper flag for introducing the DDR
support. Also call the mpfs_ddr_init() at the
proper location.

Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
This commit is contained in:
Eero Nurkkala
2021-10-07 12:54:16 +03:00
committed by Xiang Xiao
parent 3b330089d5
commit bc72ccdf6a
3 changed files with 15 additions and 0 deletions
+6
View File
@@ -26,6 +26,12 @@ config MPFS_BOOT_HART
---help---
The HART number which does the HW initialiization and wakes up the other harts (Default 0, E51 core)
config MPFS_DDR_INIT
bool "Initialize DDR"
default n
---help---
Initializes and performs DDR training on the associated DDR memory.
menu "MPFS Peripheral Support"
# These "hidden" settings determine whether a peripheral option is available
+4
View File
@@ -81,3 +81,7 @@ endif
ifeq (${CONFIG_MPFS_HAVE_COREPWM},y)
CHIP_CSRCS += mpfs_corepwm.c
endif
ifeq (${CONFIG_MPFS_DDR_INIT},y)
CHIP_CSRCS += mpfs_ddr.c
endif
+5
View File
@@ -31,6 +31,7 @@
#include "chip.h"
#include "mpfs.h"
#include "mpfs_clockconfig.h"
#include "mpfs_ddr.h"
#include "mpfs_userspace.h"
#include "riscv_arch.h"
@@ -110,6 +111,10 @@ void __mpfs_start(uint32_t mhartid)
riscv_earlyserialinit();
#endif
#ifdef CONFIG_MPFS_DDR_INIT
mpfs_ddr_init();
#endif
showprogress('B');
g_serial_ok = true;