示例#1
0
part_t* mt_part_get_partition(char *name)
{
	int index=0;
	printf ("[%s] %s\n", __FUNCTION__, name);
    part_t *part = &partition_layout[0];
	
	while (part->name)
	{
		if (!strcmp (name, part->name))
		{
#ifdef PMT
		tempart.name=part->name;
		//when download get partitin used new,orther wise used latest
		{
			tempart.startblk = BLK_NUM(lastest_part[index].offset);
			tempart.blknum=BLK_NUM(lastest_part[index].size);
		}
		tempart.flags=part->flags;
		printf ("[%s] %x\n", __FUNCTION__, tempart.startblk);
		return &tempart;
#endif
		return part;
		}
		index++;
		part++;
	}
    return NULL;
}
示例#2
0
/*******************************************************
 * 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    
}