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
已解决! 转到解答。
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!
-----------------------------------------------------------------------------------------------------------------------
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!
-----------------------------------------------------------------------------------------------------------------------
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!
-----------------------------------------------------------------------------------------------------------------------