mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-16 04:01:31 +00:00
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>
This commit is contained in:
parent
104085cb84
commit
02a3a4e50f
4 changed files with 39 additions and 2 deletions
|
@ -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;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -186,5 +186,7 @@
|
|||
#define memcpy_fromio(a, c, l) memcpy((a), (c), (l))
|
||||
#define memcpy_toio(c, a, l) memcpy((c), (a), (l))
|
||||
|
||||
#define CONFIG_VIDEO_BMP_LOGO
|
||||
#define CONFIG_VIDEO_LOGO
|
||||
#endif /* _STARFIVE_EVB_H */
|
||||
|
||||
|
|
|
@ -271,5 +271,7 @@
|
|||
#define memcpy_fromio(a, c, l) memcpy((a), (c), (l))
|
||||
#define memcpy_toio(c, a, l) memcpy((c), (a), (l))
|
||||
|
||||
#endif /* _STARFIVE_VISIONFIVE2_H */
|
||||
#define CONFIG_VIDEO_BMP_LOGO
|
||||
#define CONFIG_VIDEO_LOGO
|
||||
#endif /* _STARFIVE_EVB_H */
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue