Can I have code example how to read DCFG_CCSR_FUSESR register. Thanks

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

Can I have code example how to read DCFG_CCSR_FUSESR register. Thanks

ソリューションへジャンプ
1,570件の閲覧回数
sergeyuskach
Contributor I

Can I have code example how to read DCFG_CCSR_FUSESR register. Thanks

hi ,

thanks for the answer but I would like to look if it is possible for the function fusesr = in_be32(&gur->dcfg_fusesr); in yiou sample attached.

Message was edited by: Sergey Uskach

ラベル(1)
0 件の賞賛
返信
1 解決策
1,413件の閲覧回数
lunminliang
NXP Employee
NXP Employee

Hello Sergey Uskach,

The function in_be32( ) is an inline function for PowerPC defined in u-boot:

extern inline u32 in_be32(const volatile unsigned __iomem *addr)
{
      u32 ret;

     __asm__ __volatile__("sync; lwz%U1%X1 %0,%1;\n"
        "twi 0,%0,0;\n"
        "isync" : "=r" (ret) : "m" (*addr));
      return ret;
}

Have a great day,
Lunmin

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
1,414件の閲覧回数
lunminliang
NXP Employee
NXP Employee

Hello Sergey Uskach,

The function in_be32( ) is an inline function for PowerPC defined in u-boot:

extern inline u32 in_be32(const volatile unsigned __iomem *addr)
{
      u32 ret;

     __asm__ __volatile__("sync; lwz%U1%X1 %0,%1;\n"
        "twi 0,%0,0;\n"
        "isync" : "=r" (ret) : "m" (*addr));
      return ret;
}

Have a great day,
Lunmin

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信
1,413件の閲覧回数
lunminliang
NXP Employee
NXP Employee

Hello Sergey Uskach,

As it's memory-mapped CCSR register, access it at its address list in reference manual. What's your problem of reading this register?

There is code in U-boot reading this register, see attached code in board\freescale\common\vid.c

Have a great day,
Lunmin

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

                   

                   

                       

                                     

                                         
    0 件の賞賛
    返信