summaryrefslogtreecommitdiff
path: root/arch/arm/mach-stm32mp/spl.c
diff options
context:
space:
mode:
authorPatrick Delaunay <patrick.delaunay@st.com>2019-02-27 19:01:14 +0300
committerPatrick Delaunay <patrick.delaunay@st.com>2019-04-12 17:09:13 +0300
commit006ea18910679f150a8bc0aa5bf92d67f4f8870b (patch)
tree3abb1d9ae42d711e691cb9d7979386f2313bdb4f /arch/arm/mach-stm32mp/spl.c
parent35d568f090ec853efa1b0b5409cc89c0f0dfa7e7 (diff)
downloadu-boot-006ea18910679f150a8bc0aa5bf92d67f4f8870b.tar.xz
stm32mp1: spl: add spl_display_print
SPL displays the board model from device tree. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Diffstat (limited to 'arch/arm/mach-stm32mp/spl.c')
-rw-r--r--arch/arm/mach-stm32mp/spl.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/arm/mach-stm32mp/spl.c b/arch/arm/mach-stm32mp/spl.c
index c6ae73d600..501e077fb3 100644
--- a/arch/arm/mach-stm32mp/spl.c
+++ b/arch/arm/mach-stm32mp/spl.c
@@ -7,6 +7,8 @@
#include <dm.h>
#include <spl.h>
#include <asm/io.h>
+#include <asm/arch/sys_proto.h>
+#include <linux/libfdt.h>
u32 spl_boot_device(void)
{
@@ -58,6 +60,21 @@ int spl_boot_partition(const u32 boot_device)
}
}
+#ifdef CONFIG_SPL_DISPLAY_PRINT
+void spl_display_print(void)
+{
+ DECLARE_GLOBAL_DATA_PTR;
+ const char *model;
+
+ /* same code than show_board_info() but not compiled for SPL
+ * see CONFIG_DISPLAY_BOARDINFO & common/board_info.c
+ */
+ model = fdt_getprop(gd->fdt_blob, 0, "model", NULL);
+ if (model)
+ printf("Model: %s\n", model);
+}
+#endif
+
void board_init_f(ulong dummy)
{
struct udevice *dev;