Find the code flow based on the log records.
The logs are as follows:
EL3 Monitor information = built:07:10:44, APR 7
ufs: ufs (0) UIC command error!
00000016 00000000 00000000 00000000
00000016 00000000 00000001 00000000
UFS0 linkstartup error!
Retry Link Startup cnt:1
The source of each log is analyzed in detail below.
1. LOG:EL3 monitor information = built:07:10:44, APR 7
Corresponds to the following function:
File: board\uicsystem\yse7420\yse7420.c
int board_init (void)
{
#ifndef config_sg_binary
if (* ( unsigned int *) Config_sys_sdram_base = = 0xabcdef)
set_asv_pmic ();
#endif
#ifdef config_ina231
currnet_check_init ();
#endif
#ifdef CONFIG_524AD
eep_init ();
#endif
clk_init_root_clock_gating ();
Display_bl1_version ();
DISPLAY_CHIP_ID ();
Display_pmic_info ();
Display_tmu_info ();
Display_boot_device_info ();
Display_trip_info ();
Load_secure_payload ();
Print_el3_monitor_version ();
Domain_power_off ();
Gd->bd->bi_boot_params = (phys_sdram_1 + 0x100ul);
return 0;
}
static void Print_el3_monitor_version (void)
{
char el3_mon_ver[50] = {0,};
if (* (unsigned int *) Config_sys_sdram_base = = 0xabcdef) {/* This booting are from
emmc/ufs. Not T32 */
Get_el3_m On_version (El3_mon_ver,);
printf ("EL3 Monitor information =%s\n", el3_mon_ver);
}
}
2. Log UFS:
Files: arch\arm\lib\board.c
There is the following code:
#if defined (CONFIG_CMD_SCSI)
puts ("ufs:\t");
Ufs_init (2);
if (exynos_boot_mode () = = Boot_ufs)
run_command ("SCSI init", 0);
#if firm_in_ufs && sd_firm_in
if (Exynos_boot_mode ()! = Boot_ufs)
run_command ("SCSI init", 0);
#endif
#endif
The ufs_init function is called in this code, and the other functions called in the function produce additional log information, as follows
Files: drivers\block\scsi_ufs.c
/* 1. Called
by ARCH/LIB/BOARD.C *
/int ufs_init (int mode)
{
int res = 0, I;
#if! Sd_firm_in &&! Firm_in_ufs
if (mode = = 2) && (Exynos_boot_mode ()! = Boot_ufs)) {
printf ("Not UFS boot mode. Init UFS manually.\n ");
return res;
}
#endif for
(i = 0; i < config_sys_scsi_max_scsi_id; i++) {
if (!_ufs[i]) {
_ufs[i] = malloc (sizeof (Struc T ufs_host));
if (_ufs[i])
memset (_ufs[i], 0x00, sizeof (struct ufs_host));
else
goto errout;
}
res = Ufs_host_init (i, _ufs[i]);
if (res)
goto errfree;
}
Ufs_identify_bootlun ();
Scsi_scan (mode);
return res;
Errfree: Do
{free
(_ufs[i]),
} while (i--);
Errout:
return res;
}
3. LOG:Retry Link Startup cnt:1
File: drivers\block\scsi_ufs.c
function: static int ufs_host_init (int host_index, struct ufs_host *ufs) do
{
res = Ufs_link_startup (UFS);
if (!res) break
;
rst_cnt++;
printf ("Retry Link Startup CNT:%d\n", rst_cnt);
} while (Rst_cnt < 3);
4, log:UFS0 linkstartup error!
File: drivers\block\scsi_ufs.c
function: int ufs_link_startup (struct ufs_host *ufs)
res = Send_uic_cmd (UFS);
if (res) {
printf ("ufs%d linkstartup error!\n", ufs->host_index);
goto out;
}
5. LOG:UFS (0) UIC command error!
File: drivers\block\scsi_ufs.c
function: int send_uic_cmd (struct ufs_host *ufs)
"UFS (%d) UIC command error!\n\t%08x %08x%08x%08x\n\t%08x%08x%08x%08x\n "