<html>
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:"MS Mincho";
        panose-1:2 2 6 9 4 2 5 8 3 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"\@MS Mincho";
        panose-1:2 2 6 9 4 2 5 8 3 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
pre
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.EmailStyle18
        {font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>
</head>
<body lang=EN-US link=blue vlink=blue>
<div class=Section1>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Ben,</span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>I work with Nishanth and he has already
presented what he added. I’ve no comment beyond that (other than it works well
for us).</span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Regards,</span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Richard W.</span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>
<div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'>
<div>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>
<hr size=2 width="100%" align=center tabindex=-1>
</span></font></div>
<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
u-boot-users-admin@lists.sourceforge.net
[mailto:u-boot-users-admin@lists.sourceforge.net] <b><span style='font-weight:
bold'>On Behalf Of </span></b>Ben Warren<br>
<b><span style='font-weight:bold'>Sent:</span></b> Tuesday, May 16, 2006 8:50
AM<br>
<b><span style='font-weight:bold'>To:</span></b> Wolfgang Denk<br>
<b><span style='font-weight:bold'>Cc:</span></b> Kumar Gala;
u-boot-users@lists.sourceforge.net<br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [U-Boot-Users] Using
a second I2C interface</span></font></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> </span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>Wolfgang,<br>
<br>
This sounds like a sensible approach. This should clean the code up
nicely (as you'll notice, the patch that I submitted yesterday adds quite a bit
of noisy code). Let's look at what Richard Woodruff submits, and we can
take it from there.<br>
<br>
Too bad I didn't get your input until this morning, even though your message
went out on Friday...<br>
<br>
regards,<br>
Ben<br>
<br>
On Fri, 2006-05-12 at 21:01 +0200, Wolfgang Denk wrote: </span></font></p>
<pre><font size=2 face="Courier New"><span style='font-size:10.0pt'> </span></font></pre><pre><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt;color:black'>Hello,</span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> </span></font></pre><pre><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt;color:black'>in message <<a
href="mailto:E541A453-EC07-4597-8D60-2EE3919C1A18@kernel.crashing.org">E541A453-EC07-4597-8D60-2EE3919C1A18@kernel.crashing.org</a>> you wrote:</span></font></pre><pre><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt;color:black'>> </span></font></pre><pre><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt;color:black'>> > The CPU I'm using (MPC8349) has two hardware I2C interfaces, and </span></font></pre><pre><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt;color:black'>> > I'd like to access the second one in U-boot. Implementing this </span></font></pre><pre><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt;color:black'>> > looks easy to me, but I don't want to reinvent the wheel if it's </span></font></pre><pre><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt;color:black'>> > already been done elsewhere. Has anyone done this? If not, I'll </span></font></pre><pre><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt;color:black'>> > follow up with a proposal.</span></font></pre><pre><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt;color:black'>> </span></font></pre><pre><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt;color:black'>> Depending on what you want to do, you can cheat and just change the </span></font></pre><pre><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt;color:black'>> pointer to the 2nd interface. If you want something more full </span></font></pre><pre><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt;color:black'>> featured up to the command level then I think some discussion would </span></font></pre><pre><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt;color:black'>> be required on how the commands should work for specifying which </span></font></pre><pre><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt;color:black'>> controller to use.</span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> </span></font></pre><pre><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt;color:black'>A clean design should allow to switch I2C busses usign a command;</span></font></pre><pre><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt;color:black'>additionally, I think we should try to stay backward-compatible with</span></font></pre><pre><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt;color:black'>the existing code. Eventually this is not too difficult: similar to</span></font></pre><pre><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt;color:black'>the "ide" or "usb" commands we could create a new command "i2c</span></font></pre><pre><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt;color:black'>device" which takes as argument the number of the I2C bus which shal</span></font></pre><pre><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt;color:black'>become the current (= active) bus. Then all existing I2C related</span></font></pre><pre><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt;color:black'>commands can be left unchanged (and "i2c device" without arguments</span></font></pre><pre><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt;color:black'>should of course print the ID of the current bus).</span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> </span></font></pre><pre><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt;color:black'>In parallel, existing I2C commands could be changed to migrate to a</span></font></pre><pre><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt;color:black'>new "i2c" group of commands: "imd" would become "i2c md", "imw"</span></font></pre><pre><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt;color:black'>becomes "i2c mw", "iprobe" becomes "i2c probe", etc. For some (long)</span></font></pre><pre><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt;color:black'>transition period old and new commands could be provided in parallel</span></font></pre><pre><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt;color:black'>(at least optionally). Later, the old syntax could be dropped.</span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> </span></font></pre><pre><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt;color:black'>Best regards,</span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> </span></font></pre><pre><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt;color:black'>Wolfgang Denk</span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> </span></font></pre></div>
</div>
</body>
</html>