[U-Boot-Users] SYNC definition problem

Becky Bruce becky.bruce at freescale.com
Mon Apr 14 18:39:17 CEST 2008


On Apr 11, 2008, at 5:27 PM, Yang Ronda wrote:
> Hi,
>
> I was trying to turn on I-Cache while u-boot is executing out of  
> Flash on MPC5121 ADS board, and just found the board refused to  
> boot. After debug and tried many different ways, we finally found  
> that the root of the problem is the SYNC macro definition in u-boot  
> include/ppc_asm.tmpl file. The SYNC was defined as
>
> #define SYNC \
>  sync; \
>  isync

The problem isn't the macro definition.  That macro is used all over  
the place - changing global macros to fix a single problem is not a  
good idea unless there's something inherently wrong with the macro.   
Which there isn't, in this case.

>
> By turning on I-cache on powerpc e300 core, ICE bit of HID0 needs  
> to be set. Before setting ICE, an isync operation need to be  
> issued. In the cpu/mpc512x/start.S file, this is done by using a  
> 'SYNC' statement. But we found we need to add one more sync  
> operation to guarantee isync is complete.

You should only need a single isync before writing the ICE bit.  I  
looked at that file, and everywhere I see a write to the ICE bit,  
there's no SYNC macro being used. Have you changed the code?  It's  
likely that something completely different is causing your problem,  
and the extra sync is masking the problem.

-Becky





More information about the U-Boot mailing list