/******************************************************* * Routine: misc_init_r * Description: Init ethernet (done here so udelay works) ********************************************************/ int misc_init_r (void) { int ret = 0; #ifdef CFG_UBOOT_PROFILING unsigned int time_load_logo; unsigned int time_boot_mode; unsigned int time_part_init; #endif #ifdef CFG_UBOOT_PROFILING time_part_init = get_timer(0); #endif mt6575_part_init(BLK_NUM(16 * GB)); // mt6575_part_dump(); #ifdef CFG_UBOOT_PROFILING printf("[PROFILE] ------- part_init takes %d ms -------- \n", get_timer(time_part_init)); #endif //***************** //* check mode (1) factory mode (2) meta mode ... #ifdef CFG_UBOOT_PROFILING time_boot_mode = get_timer(0); #endif boot_mode_select(); #ifdef CFG_UBOOT_PROFILING printf("[PROFILE] ------- boot mode select takes %d ms -------- \n", get_timer(time_boot_mode)); #endif #if 1 //Remove tmp for 6575 porting #ifdef CONFIG_MMC mmc_legacy_init(1); mt6575_part_dump(); #endif #ifdef CFG_UBOOT_PROFILING time_load_logo = get_timer(0); #endif ret = mboot_common_load_logo((unsigned long)mt65xx_get_logo_db_addr(), CFG_LOGO_NAME); printf("Show BLACK_PICTURE\n"); mt65xx_disp_fill_rect(0, 0, CFG_DISPLAY_WIDTH, CFG_DISPLAY_HEIGHT, 0x0); mt65xx_disp_power(TRUE); mt65xx_disp_update(0, 0, CFG_DISPLAY_WIDTH, CFG_DISPLAY_HEIGHT); #ifdef CFG_UBOOT_PROFILING printf("[PROFILE] ------- load_logo takes %d ms -------- \n", get_timer(time_load_logo)); #endif if (ret <= 0) { printf("[ERROR] load logo partition failed, ret: %d\n", ret); } return 0; #endif//Remove tmp for 6575 porting }
void mt65xx_disp_draw_prog_bar(DISP_PROG_BAR_DIRECT direct, UINT32 left, UINT32 top, UINT32 right, UINT32 bottom, UINT32 fgColor, UINT32 bgColor, UINT32 start_div, UINT32 total_div, UINT32 occupied_div) { const UINT32 PADDING = 3; UINT32 div_size = (bottom - top) / total_div; UINT32 draw_size = div_size - PADDING; UINT32 i; if (DISP_HORIZONTAL_PROG_BAR == direct) { div_size = (right - left) / total_div; draw_size = div_size - PADDING; for (i = start_div; i < start_div + occupied_div; ++ i) { UINT32 draw_left = left + div_size * i + PADDING; UINT32 draw_right = draw_left + draw_size; // fill one division of the progress bar mt65xx_disp_fill_rect(draw_left, top, draw_right, bottom, fgColor); } } else if(DISP_VERTICAL_PROG_BAR == direct) { div_size = (bottom - top) / total_div; draw_size = div_size - PADDING; for (i = start_div; i < start_div + occupied_div; ++ i) { UINT32 draw_bottom = bottom - div_size * i - PADDING; UINT32 draw_top = draw_bottom - draw_size; // fill one division of the progress bar mt65xx_disp_fill_rect(left, draw_top, right, draw_bottom, fgColor); } } else { NOT_IMPLEMENTED(); } }