How to display IFC frequency when booting T1020 board?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

How to display IFC frequency when booting T1020 board?

跳至解决方案
1,121 次查看
cappulee7
Contributor I

Hello.

I am confused how to display the IFC frequency on the T1020 board.(Blue letter below)

CPU0: T1020, Version: 1.1, (0x85210011)
Core: e5500, Version: 2.1, (0x80241021)
Single Source Clock Configuration
Clock Configuration:
CPU0:1200 MHz, CPU1:1200 MHz,
CCB:600 MHz,
DDR:800 MHz (1600 MT/s data rate) (Asynchronous), IFC:300 MHz

........

SDK1.7 and SDK2.0 display methods are different. Which one is more correct?

1) SDK 1.7 uboot
#if defined(CONFIG_FSL_IFC)
    ccr = in_be32(&ifc_regs->ifc_ccr);
    ccr = ((ccr & IFC_CCR_CLK_DIV_MASK) >> IFC_CCR_CLK_DIV_SHIFT) + 1;

    sys_info->freq_localbus = sys_info->freq_systembus / ccr;
#endif

2) SDK 2.0 uboot
    sys_info->freq_localbus = sys_info->freq_systembus / CONFIG_SYS_FSL_IFC_CLK_DIV;

 

Best regard.

0 项奖励
回复
1 解答
1,112 次查看
yipingwang
NXP TechSupport
NXP TechSupport

#if defined(CONFIG_FSL_IFC)

ccr = ifc_in32(&ifc_regs.gregs->ifc_ccr);

ccr = ((ccr & IFC_CCR_CLK_DIV_MASK) >> IFC_CCR_CLK_DIV_SHIFT) + 1;

sys_info->freq_localbus = sys_info->freq_systembus / ccr;

#endif

According to the code above, IFC clock freq in uboot means the external clock freq of IFC, not the IFC IP module clock freq. In fact IFC external clock isn’t used on any existing board, so the right way is to calculate IFC IP module clock freq in uboot log as below:

sys_info->freq_localbus = sys_info->freq_systembus / 2.

 

SDK 2.0 is correct.

在原帖中查看解决方案

1 回复
1,113 次查看
yipingwang
NXP TechSupport
NXP TechSupport

#if defined(CONFIG_FSL_IFC)

ccr = ifc_in32(&ifc_regs.gregs->ifc_ccr);

ccr = ((ccr & IFC_CCR_CLK_DIV_MASK) >> IFC_CCR_CLK_DIV_SHIFT) + 1;

sys_info->freq_localbus = sys_info->freq_systembus / ccr;

#endif

According to the code above, IFC clock freq in uboot means the external clock freq of IFC, not the IFC IP module clock freq. In fact IFC external clock isn’t used on any existing board, so the right way is to calculate IFC IP module clock freq in uboot log as below:

sys_info->freq_localbus = sys_info->freq_systembus / 2.

 

SDK 2.0 is correct.