P2020 Local bus pll enable

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

P2020 Local bus pll enable

ソリューションへジャンプ
1,827件の閲覧回数
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 解決策
1,532件の閲覧回数
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 返答(返信)
1,532件の閲覧回数
ufedor
NXP Employee
NXP Employee

Which processor is in question?

0 件の賞賛
返信
1,532件の閲覧回数
wangxiao
Contributor II

P2020

0 件の賞賛
返信
1,532件の閲覧回数
ufedor
NXP Employee
NXP Employee

Please use debugger to debug U-Boot.

0 件の賞賛
返信
1,533件の閲覧回数
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