<br><font size=2 face="sans-serif">Kim,</font>
<br>
<br><font size=2 face="sans-serif">Thanks. When I defined </font><font size=2><tt>CFG_SPD_BUS_NUM</tt></font><font size=2 face="sans-serif">
1 in my header file, things are much better. &nbsp;Though I don't understand
why this definition will help. &nbsp;I read the &nbsp;</font><font size=2><tt>&quot;Initial
Stack, Global Data&quot; </tt></font><font size=2 face="sans-serif">part
in Readme, It looks that Initialized global data is read-only, if this
is the case, then It should fail when I try to set I2c bus num to 0, but
it worked. &nbsp;Could you please explain a little bit? &nbsp; Thanks </font>
<br>
<br><font size=2 face="sans-serif">dongy</font>
<br>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td>
<td><font size=1 face="sans-serif"><b>Kim Phillips &lt;kim.phillips@freescale.com&gt;</b></font>
<p><font size=1 face="sans-serif">03/27/2007 06:00 PM</font>
<td><font size=1 face="Arial">&nbsp; &nbsp; &nbsp; &nbsp; </font>
<br><font size=1 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; To:
&nbsp; &nbsp; &nbsp; &nbsp;Dongying_Xu@us.alphanetworks.com</font>
<br><font size=1 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; cc:
&nbsp; &nbsp; &nbsp; &nbsp;u-boot-users@lists.sourceforge.net</font>
<br><font size=1 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; Subject:
&nbsp; &nbsp; &nbsp; &nbsp;Re: [U-Boot-Users] i2c_set_bus_num</font></table>
<br>
<br>
<br><font size=2><tt>On Tue, 27 Mar 2007 16:48:29 -0700<br>
Dongying_Xu@us.alphanetworks.com wrote:<br>
<br>
&gt; Hi, <br>
&gt; <br>
&gt; Does anyone experienced following problem? In u-boot/drivers/fsl_i2c.c,
<br>
&gt; there are functions to set and get i2c bus number,<br>
&gt; When I set the default i2c_bus_num to 0, I can not use i2c_set_bus_num()
<br>
&gt; set bus 1 properly. &nbsp;For example, I called<br>
&gt; <br>
&gt; &gt;&gt;i2c_set_bus_num(1);<br>
&gt; &gt;&gt;printf(The bus number is %d\n&quot;, i2c_get_bus_num());<br>
&gt; <br>
&gt; &gt;&gt;&gt;&gt;The bus number is 0.<br>
&gt; <br>
&gt; I am using MPC8343. &nbsp;Thanks. Any suggestion is appreciated.<br>
&gt; <br>
See &quot;Initial Stack, Global Data&quot; in the u-boot README.<br>
<br>
If your memory controller, or whatever you want to access while unable
to write global vars, is hanging off of the 2nd bus, do something equivalent
to what the 8349ITX does (look for CFG_SPD_BUS_NUM).<br>
<br>
Kim<br>
</tt></font>
<br>
<br>