P2020 Local bus pll enable

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

P2020 Local bus pll enable

跳至解决方案
2,737 次查看
wangxiao
Contributor II

Hi,

I met the problem.Platform clock is 400MHz,i want to set local bus clock for 100MHz,so add in the .h file:

#define CONFIG_SYS_LBC_LCRR 0x00030002 /* local bus freq */

bit 0 PLL enable

clock divide 4

Clock ratio register (eLBC_LCRR)  bit 0 PBYP should be 0,means the PLL enable.

After set the register,  I read this register data is 0x80030002,bit 0 still 1 in bypass mode ,is that right?

(Additionally,Bypass mode ,local bus cycle time minnum 12ns,so the clock maxmum 83MHz)

标签 (1)
0 项奖励
回复
1 解答
2,442 次查看
wangxiao
Contributor II

Thanks。

Progam:

clrsetbits_be32(&lbc->lcrr, LCRR_CLKDIV, CONFIG_SYS_LBC_LCRR);

__raw_readl(&lbc->lcrr);
isync();

 

the reason:

clrsetbits_be32(&lbc->lcrr, LCRR_CLKDIV, CONFIG_SYS_LBC_LCRR)   mapping to 

out_be32(&lbc->lcrr,inbe32(&lbc->lcrr) & (~LCRR_CLKDIV) | CONFIG_SYS_LBC_LCRR)

actually it does not change bit 0

 

 solution:

*(volatile *)(&lbc->lcrr) = CONFIG_SYS_LBC_LCRR ;

 

then it‘s ok

在原帖中查看解决方案

4 回复数
2,442 次查看
ufedor
NXP Employee
NXP Employee

Which processor is in question?

0 项奖励
回复
2,442 次查看
wangxiao
Contributor II

P2020

0 项奖励
回复
2,442 次查看
ufedor
NXP Employee
NXP Employee

Please use debugger to debug U-Boot.

0 项奖励
回复
2,443 次查看
wangxiao
Contributor II

Thanks。

Progam:

clrsetbits_be32(&lbc->lcrr, LCRR_CLKDIV, CONFIG_SYS_LBC_LCRR);

__raw_readl(&lbc->lcrr);
isync();

 

the reason:

clrsetbits_be32(&lbc->lcrr, LCRR_CLKDIV, CONFIG_SYS_LBC_LCRR)   mapping to 

out_be32(&lbc->lcrr,inbe32(&lbc->lcrr) & (~LCRR_CLKDIV) | CONFIG_SYS_LBC_LCRR)

actually it does not change bit 0

 

 solution:

*(volatile *)(&lbc->lcrr) = CONFIG_SYS_LBC_LCRR ;

 

then it‘s ok