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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

Jump to solution
1,568 Views
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

Labels (1)
0 Kudos
Reply
1 Solution
1,411 Views
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!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
Reply
2 Replies
1,412 Views
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 Kudos
Reply
1,411 Views
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 Kudos
    Reply