[u-boot] rk boot: commandline logo information depend on logo on state from kernel dtb.
Signed-off-by: Firefly <service@t-firefly.com>
This commit is contained in:
@ -39,6 +39,9 @@ extern void powerOn(void);
|
||||
extern int g_ir_keycode;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_LCD
|
||||
int g_logo_on_state = 0;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* return 1 if is charging.
|
||||
@ -393,17 +396,19 @@ void board_fbt_preboot(void)
|
||||
board_fbt_low_power_check();
|
||||
#endif
|
||||
|
||||
int logo_on = 0;
|
||||
#ifdef CONFIG_LCD
|
||||
/* logo state defautl init = 0 */
|
||||
g_logo_on_state = 0;
|
||||
|
||||
if (gd->fdt_blob) {
|
||||
int node = fdt_path_offset(gd->fdt_blob, "/fb");
|
||||
logo_on = fdtdec_get_int(gd->fdt_blob, node, "rockchip,uboot-logo-on", 0);
|
||||
g_logo_on_state = fdtdec_get_int(gd->fdt_blob, node, "rockchip,uboot-logo-on", 0);
|
||||
}
|
||||
printf("read logo_on switch from dts [%d]\n", logo_on);
|
||||
printf("read logo on state from dts [%d]\n", g_logo_on_state);
|
||||
|
||||
if (logo_on) {
|
||||
if (g_logo_on_state != 0) {
|
||||
lcd_enable_logo(true);
|
||||
drv_lcd_init(); //move backlight enable to board_init_r, for don't show logo in rockusb
|
||||
drv_lcd_init();
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -417,7 +422,7 @@ void board_fbt_preboot(void)
|
||||
|| (frt == FASTBOOT_REBOOT_CHARGE)) {
|
||||
#ifdef CONFIG_CMD_CHARGE_ANIM
|
||||
char *charge[] = { "charge" };
|
||||
if (logo_on && do_charge(NULL, 0, ARRAY_SIZE(charge), charge)) {
|
||||
if ((g_logo_on_state != 0) && do_charge(NULL, 0, ARRAY_SIZE(charge), charge)) {
|
||||
//boot from charge animation.
|
||||
frt = FASTBOOT_REBOOT_NORMAL;
|
||||
lcd_clear();
|
||||
@ -431,7 +436,7 @@ void board_fbt_preboot(void)
|
||||
powerOn();
|
||||
|
||||
#ifdef CONFIG_LCD
|
||||
if (logo_on) {
|
||||
if (g_logo_on_state != 0) {
|
||||
//lcd_enable_logo(true);
|
||||
lcd_standby(0);
|
||||
//mdelay(100);
|
||||
|
||||
@ -15,6 +15,10 @@
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
#ifdef CONFIG_LCD
|
||||
extern int g_logo_on_state;
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_RK_HDMI)
|
||||
extern int g_hdmi_vic;
|
||||
#endif
|
||||
@ -450,13 +454,15 @@ static void rk_commandline_setenv(const char *boot_name, rk_boot_img_hdr *hdr, b
|
||||
* size - fb size, address - fb address, offset - kernel bmp logo offset.
|
||||
* offset is optional, depend on resource image has kernel_logo.bmp.
|
||||
*/
|
||||
snprintf(command_line, sizeof(command_line),
|
||||
"%s uboot_logo=0x%08x@0x%08lx", command_line, CONFIG_RK_LCD_SIZE, gd->fb_base);
|
||||
#if defined(CONFIG_KERNEL_LOGO)
|
||||
if (g_rk_fb_size != -1)
|
||||
if (g_logo_on_state != 0) {
|
||||
snprintf(command_line, sizeof(command_line),
|
||||
"%s:0x%08x", command_line, g_rk_fb_size);
|
||||
"%s uboot_logo=0x%08x@0x%08lx", command_line, CONFIG_RK_LCD_SIZE, gd->fb_base);
|
||||
#if defined(CONFIG_KERNEL_LOGO)
|
||||
if (g_rk_fb_size != -1)
|
||||
snprintf(command_line, sizeof(command_line),
|
||||
"%s:0x%08x", command_line, g_rk_fb_size);
|
||||
#endif /* CONFIG_KERNEL_LOGO */
|
||||
}
|
||||
#endif /* CONFIG_RK_FB_DDREND */
|
||||
|
||||
snprintf(command_line, sizeof(command_line),
|
||||
@ -529,7 +535,10 @@ int do_bootrk(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
||||
}
|
||||
}
|
||||
#if defined(CONFIG_LCD) && defined(CONFIG_KERNEL_LOGO)
|
||||
rk_load_kernel_logo();
|
||||
/* if uboot logo enable, load logo */
|
||||
if (g_logo_on_state != 0) {
|
||||
rk_load_kernel_logo();
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_UBOOT_CHARGE) && defined(CONFIG_POWER_FG_ADC)
|
||||
|
||||
Reference in New Issue
Block a user