summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorkeith.zhao <keith.zhao@starfivetech.com>2023-03-15 12:10:22 +0300
committerkeith.zhao <keith.zhao@starfivetech.com>2023-03-15 12:10:22 +0300
commit02a3a4e50f388cdce84d4b9f0e9c600464dc28f9 (patch)
tree16fb33e07b88e540ad5e4e78aaee0159d3878fc5 /board
parent104085cb84f51ae04808353c3442fa9d6422c15e (diff)
downloadu-boot-02a3a4e50f388cdce84d4b9f0e9c600464dc28f9.tar.xz
board:riscv:jh7110: modify config for starfive JH7110 board
add board_late_init to init display memory config the bitmap picture Signed-off-by: keith.zhao<keith.zhao@statfivetech.com>
Diffstat (limited to 'board')
-rw-r--r--board/starfive/evb/starfive_evb.c20
-rw-r--r--board/starfive/visionfive2/starfive_visionfive2.c15
2 files changed, 34 insertions, 1 deletions
diff --git a/board/starfive/evb/starfive_evb.c b/board/starfive/evb/starfive_evb.c
index 61ff83d02e..e1e3f2dbc4 100644
--- a/board/starfive/evb/starfive_evb.c
+++ b/board/starfive/evb/starfive_evb.c
@@ -16,6 +16,8 @@
#include <misc.h>
#include <linux/bitops.h>
#include <asm/arch/gpio.h>
+#include <bmp_logo.h>
+#include <video.h>
enum chip_type_t {
CHIP_A = 0,
@@ -299,3 +301,21 @@ err:
}
#endif
+int board_late_init(void)
+{
+ struct udevice *dev;
+ int ret;
+
+ ret = uclass_get_device(UCLASS_VIDEO, 0, &dev);
+ if (ret)
+ return ret;
+
+ ret = video_bmp_display(dev, (ulong)&bmp_logo_bitmap[0], 0, 0, false);
+ if (ret)
+ goto err;
+
+err:
+ return 0;
+
+}
+
diff --git a/board/starfive/visionfive2/starfive_visionfive2.c b/board/starfive/visionfive2/starfive_visionfive2.c
index a2e6e5ec3e..e0203f637f 100644
--- a/board/starfive/visionfive2/starfive_visionfive2.c
+++ b/board/starfive/visionfive2/starfive_visionfive2.c
@@ -17,6 +17,8 @@
#include <misc.h>
#include <linux/bitops.h>
#include <asm/arch/gpio.h>
+#include <bmp_logo.h>
+#include <video.h>
#define SYS_CLOCK_ENABLE(clk) \
setbits_le32(SYS_CRG_BASE + clk, CLK_ENABLE_MASK)
@@ -437,6 +439,9 @@ int board_init(void)
#ifdef CONFIG_BOARD_LATE_INIT
int board_late_init(void)
{
+ struct udevice *dev;
+ int ret;
+
get_boot_mode();
jh7110_gmac_init(get_chip_type(), get_board_type());
@@ -448,6 +453,15 @@ int board_late_init(void)
env_set_hex("memory_addr", gd->ram_base);
env_set_hex("memory_size", gd->ram_size);
+ ret = uclass_get_device(UCLASS_VIDEO, 0, &dev);
+ if (ret)
+ return ret;
+
+ ret = video_bmp_display(dev, (ulong)&bmp_logo_bitmap[0], 0, 0, false);
+ if (ret)
+ goto err;
+
+err:
return 0;
}
#endif
@@ -493,4 +507,3 @@ err:
return 0;
}
#endif
-