<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2963" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=602505014-30082006>Hi, </SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=602505014-30082006></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=602505014-30082006>please read the following from MPC85xx UM about the
sequence on how to write CCSRBAR:</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=602505014-30082006></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=602505014-30082006>*************************************</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT><SPAN class=602505014-30082006>
<P align=left><FONT face=Arial color=#0000ff size=2>When the e500 core is
writing to CCSRBAR, it should use the following sequence:</FONT></P>
<P align=left><FONT face=Arial color=#0000ff size=2>– Read the current value of
CCSRBAR using a load word instruction followed by an</FONT></P><B>
<P align=left><FONT color=#0000ff><FONT face=Arial><FONT size=2><SPAN
class=602505014-30082006>
</SPAN>isync</FONT></FONT></FONT></B><FONT face=Arial color=#0000ff size=2>.
This forces all accesses to configuration space to complete.</FONT></P>
<P align=left><FONT face=Arial color=#0000ff size=2>– Write the new value to
CCSRBAR.</FONT></P>
<P align=left><FONT face=Arial color=#0000ff size=2>– Perform a load of an
address that does not access configuration space or the on-chip</FONT></P>
<P align=left><FONT face=Arial color=#0000ff size=2>SRAM, but has an address
mapping already in effect (for example, boot ROM).</FONT></P>
<P align=left><FONT face=Arial><FONT size=2><FONT color=#0000ff>Follow this load
with an </FONT><B><FONT color=#0000ff>isync</FONT></B><FONT
color=#0000ff>.</FONT></FONT></FONT></P>
<P align=left><FONT face=Arial><FONT size=2><FONT color=#0000ff>– Read the
contents of CCSRBAR from its new location, followed by another </FONT><B><FONT
color=#0000ff>isync</FONT></P></B></FONT></FONT>
<P align=left><FONT face=Arial color=#0000ff size=2>instruction.</FONT></P>
<P align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=602505014-30082006>****************************************</SPAN></FONT></P>
<P align=left></SPAN></FONT><SPAN class=602505014-30082006></SPAN><FONT
face=Arial><FONT size=2><FONT color=#0000ff>The code<SPAN
class=602505014-30082006>s</SPAN> </FONT> <SPAN
class=602505014-30082006><FONT color=#0000ff>between line 287-294 complete the
third step above.</FONT></SPAN></FONT></FONT></P></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=602505014-30082006></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=602505014-30082006>Haiying </SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT><FONT face=Arial color=#0000ff
size=2></FONT><BR></DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B>
linuxppc-embedded-bounces+haiying.wang=freescale.com@ozlabs.org
[mailto:linuxppc-embedded-bounces+haiying.wang=freescale.com@ozlabs.org] <B>On
Behalf Of </B>enorm<BR><B>Sent:</B> Wednesday, August 30, 2006 9:46
AM<BR><B>To:</B> linuxppc-embedded@ozlabs.org<BR><B>Subject:</B> Some problem
about code reading <BR></FONT><BR></DIV>
<DIV></DIV>
<DIV><FONT size=2>Hi,</FONT></DIV>
<DIV><FONT size=2> I met some problems when reading sourcecode of u-boot
1.1.4 (for mpc85xx)</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>file /cpu/mpc85xx/start.s line 276</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>276. #if (CFG_CCSRBAR_DEFAULT !=
CFG_CCSRBAR)<BR>277. /* Special sequence needed to update
CCSRBAR itself */<BR>278. lis r4, <A
href="mailto:CFG_CCSRBAR_DEFAULT@h">CFG_CCSRBAR_DEFAULT@h</A><BR>279.
ori r4, r4, <A
href="mailto:CFG_CCSRBAR_DEFAULT@l">CFG_CCSRBAR_DEFAULT@l</A></FONT></DIV>
<DIV><FONT size=2>280.</FONT></DIV>
<DIV><FONT size=2>281. lis r5, <A
href="mailto:CFG_CCSRBAR@h">CFG_CCSRBAR@h</A><BR>282.
ori r5, r5, <A
href="mailto:CFG_CCSRBAR@l">CFG_CCSRBAR@l</A><BR>283.
srwi r6,r5,12<BR>284. stw r6,
0(r4)<BR>285. isync</FONT></DIV>
<DIV><FONT size=2>286.</FONT></DIV>
<DIV><FONT size=2>287. lis r5,
0xffff<BR>288.
ori r5,r5,0xf000<BR>289. lwz r5,
0(r5)<BR>290. isync</FONT></DIV>
<DIV><FONT size=2>291.</FONT></DIV>
<DIV><FONT size=2>292. lis r3, <A
href="mailto:CFG_CCSRBAR@h">CFG_CCSRBAR@h</A><BR>293.
lwz r5, <A
href="mailto:CFG_CCSRBAR@l(r3">CFG_CCSRBAR@l(r3</A>)<BR>294.
isync<BR>295. #endif</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>I think it means if we don't use default CCSRBAR, we put the
CCSRBAR addr actually used to the proper place in default CCSRBAR, so that it
can jump to the addr we want to automatically.(line 276-286).</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>But, I don't know what line 287-294 does. Can some one
tell me pls? </FONT></DIV>
<DIV><FONT size=2>Thanks for your help.</FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV></BLOCKQUOTE></BODY></HTML>