[U-Boot] removing bit reversing for SCFG in immap_ls102xa.h

Huan Wang alison.wang at freescale.com
Fri Jan 23 10:06:05 CET 2015


Hi, Sinan Akman,

	As the comment of commit c207ff612903389f8b32e377fe32be43e6efd8f7 said, we removes the bit reversing for SCFG registers in u-boot. It is implemented through PBI command in RCW.
.pbi
write 0x570200, 0xffffffff
.end

	Through this way, other SCFG registers could be written in big-endian mode in u-boot or kernel directly. No other bit reversing is needed. For example, we only need to set SCFG_ETSECDMAMCR register as follows.
out_be32(&scfg->etsecdmamcr, SCFG_ETSECDMAMCR_LE_BD_FR);

	According to your test, I think your RCW is very old and the above PBI command is not added. So I suggest you to add this PBI command in RCW, it will make Ethernet work.

Best Regards,
Alison Wang

> -----Original Message-----
> From: Sinan Akman [mailto:sinan at writeme.com]
> Sent: Friday, January 23, 2015 3:11 PM
> To: U-Boot-Denx
> Cc: Wang Huan-B18965; Sun York-R58495
> Subject: removing bit reversing for SCFG in immap_ls102xa.h
> 
> 
>    Hi Alison
> 
>    I was just testing out ls1021atwr board with NOR boot using
> rcw_1000.bin.
> 
>    I noticed that Ethernet is not working.
> 
>    In ls1021atwr.c we have :
> 
>    out_be32(&scfg->etsecdmamcr, SCFG_ETSECDMAMCR_LE_BD_FR);
>    out_be32(&scfg->etsecmcr, SCFG_ETSECCMCR_GE2_CLK125);
> 
>    In your earlier commit c207ff612903389f8b32e377fe32be43e6efd8f7
> you removed the bit reversing around this but those defines are not in
> big-endian. By setting bit reversing before those lines as before makes
> Ethernet working.
> 
>    Could you please take a look at this. Should we reverse your commit
> since we are accessing SCFG registers directly in the board specific
> files ?
> 
>    Regards
> 
>    Sinan Akman


More information about the U-Boot mailing list