summaryrefslogtreecommitdiffstats
path: root/board/toradex/common/tdx-common.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2020-08-04 11:11:02 -0400
committerTom Rini <trini@konsulko.com>2020-08-04 11:11:02 -0400
commitf1c0b7cd4be2081ae3711cec2c4cc2910a5817e1 (patch)
tree694f503767f8511bffc8c5e6360f542e50428a0d /board/toradex/common/tdx-common.c
parent993b59f0451cb102f23714478a64361b44694fc6 (diff)
parent3e980a2d8bd13d0d1c2d5cec9e57a47b6cff8b92 (diff)
downloadu-boot-f1c0b7cd4be2081ae3711cec2c4cc2910a5817e1.tar.gz
u-boot-f1c0b7cd4be2081ae3711cec2c4cc2910a5817e1.tar.xz
u-boot-f1c0b7cd4be2081ae3711cec2c4cc2910a5817e1.zip
Merge tag 'u-boot-imx-20200804' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
For 2020.10 ----------- - fixes for Toradex board - fix warnings from previous PR - HAB: reset instead of panic after failure - new board: MYiR Tech MYS-6ULX - mx6cuboxi: use OF_PLATDATA - further changes for DM Travis: https://travis-ci.org/github/sbabic/u-boot-imx/builds/714513163
Diffstat (limited to 'board/toradex/common/tdx-common.c')
-rw-r--r--board/toradex/common/tdx-common.c54
1 files changed, 54 insertions, 0 deletions
diff --git a/board/toradex/common/tdx-common.c b/board/toradex/common/tdx-common.c
index 3a3cfc8821..fe5295f94b 100644
--- a/board/toradex/common/tdx-common.c
+++ b/board/toradex/common/tdx-common.c
@@ -9,6 +9,13 @@
#include <init.h>
#include <linux/libfdt.h>
+#ifdef CONFIG_DM_VIDEO
+#include <bmp_logo.h>
+#include <dm.h>
+#include <splash.h>
+#include <video.h>
+#endif
+
#include "tdx-cfg-block.h"
#include <asm/setup.h>
#include "tdx-common.h"
@@ -19,6 +26,12 @@
static char tdx_serial_str[9];
static char tdx_board_rev_str[6];
+#ifdef CONFIG_TDX_CFG_BLOCK_EXTRA
+static char tdx_car_serial_str[9];
+static char tdx_car_rev_str[6];
+static char *tdx_carrier_board_name;
+#endif
+
#ifdef CONFIG_REVISION_TAG
u32 get_board_rev(void)
{
@@ -88,6 +101,28 @@ int show_board_info(void)
toradex_modules[tdx_hw_tag.prodid],
tdx_board_rev_str,
tdx_serial_str);
+#ifdef CONFIG_TDX_CFG_BLOCK_EXTRA
+ if (read_tdx_cfg_block_carrier()) {
+ printf("MISSING TORADEX CARRIER CONFIG BLOCKS\n");
+ try_migrate_tdx_cfg_block_carrier();
+ } else {
+ tdx_carrier_board_name = (char *)
+ toradex_carrier_boards[tdx_car_hw_tag.prodid];
+
+ sprintf(tdx_car_serial_str, "%08u", tdx_car_serial);
+ sprintf(tdx_car_rev_str, "V%1d.%1d%c",
+ tdx_car_hw_tag.ver_major,
+ tdx_car_hw_tag.ver_minor,
+ (char)tdx_car_hw_tag.ver_assembly +
+ 'A');
+
+ env_set("carrier_serial#", tdx_car_serial_str);
+ printf("Carrier: Toradex %s %s, Serial# %s\n",
+ tdx_carrier_board_name,
+ tdx_car_rev_str,
+ tdx_car_serial_str);
+ }
+#endif
}
/*
@@ -168,3 +203,22 @@ int ft_common_board_setup(void *blob, struct bd_info *bd)
}
#endif /* CONFIG_TDX_CFG_BLOCK */
+
+#if defined(CONFIG_DM_VIDEO)
+int show_boot_logo(void)
+{
+ struct udevice *dev;
+ int ret;
+ int xpos, ypos;
+
+ splash_get_pos(&xpos, &ypos);
+
+ ret = uclass_get_device(UCLASS_VIDEO, 0, &dev);
+ if (ret)
+ return ret;
+
+ ret = video_bmp_display(dev, (ulong)bmp_logo_bitmap, xpos, ypos, true);
+
+ return ret;
+}
+#endif /* CONFIG_DM_VIDEO */