<html>

<head>
<meta http-equiv=Content-Type content="text/html; charset=utf-8">
<meta name=Generator content="Microsoft Word 11 (filtered)">

<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:宋体;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"\@宋体";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
 /* 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;}
p
        {margin-right:0in;
        margin-left:0in;
        font-size:12.0pt;
        font-family:宋体;}
span.EmailStyle17
        {font-family:Arial;
        color:navy;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
@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'>Dan</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 think you made a mistake. It should be “</span></font><font
size=2 color=black face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:black'>sm_dev = dev_find_device(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_ATI_SB600_SM,
0)</span></font><font size=2 color=navy face=Arial><span style='font-size:10.0pt;
font-family:Arial;color:navy'>;”, not “</span></font><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>sm_dev
= pci_locate_device(PCI_ID(0x1002, 0x4385), 0);</span></font><font size=2
color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'>” in your file.</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'>In my last letter, there is a writing error.
We should say that </span></font><font size=2 color=black face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:black'>dev_find_device is more
reliable than dev_find_slot</span></font></p>

<div>

<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'>Best regards</span></font><font color=navy><span
style='color:navy'> <br>
</span></font><font size=2 color=navy face=Arial><span style='font-size:10.0pt;
font-family:Arial;color:navy'>Maggie li</span></font><font color=navy><span
style='color:navy'> </span></font></p>

</div>

<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'> Dan Lykowski [mailto:engineerguy3737@yahoo.com]
<br>
<b><span style='font-weight:bold'>Sent:</span></b> Wednesday, February 04, 2009
11:58 AM<br>
<b><span style='font-weight:bold'>To:</span></b> Li, Maggie; Carl-Daniel
Hailfinger<br>
<b><span style='font-weight:bold'>Cc:</span></b> Marc Jones;
coreboot@coreboot.org<br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [coreboot] SB600 HDA
can't find codec fix</span></font></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> </span></font></p>

<div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>Sorry for the delay.. Way too much to do and so little time..<br>
<br>
Fixed the spotted issues and added 1ms delay to match the BKDG while waiting
for BAR+0xe to set its bits.<br>
<br>
Dan Lykowski<br>
<br>
Signed-off-by: Dan Lykowski<lykowdk@gmail.com></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> </span></font></p>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>

<hr size=1 width="100%" align=center>

</span></font></div>

<p class=MsoNormal style='margin-bottom:12.0pt'><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'> "Li, Maggie" <Maggie.Li@amd.com><br>
<b><span style='font-weight:bold'>To:</span></b> Carl-Daniel Hailfinger
<c-d.hailfinger.devel.2006@gmx.net><br>
<b><span style='font-weight:bold'>Cc:</span></b> Dan Lykowski
<engineerguy3737@yahoo.com>; Marc Jones <marcj303@gmail.com>;
coreboot@coreboot.org<br>
<b><span style='font-weight:bold'>Sent:</span></b> Sunday, February 1, 2009
7:47:15 PM<br>
<b><span style='font-weight:bold'>Subject:</span></b> RE: [coreboot] SB600 HDA
can't find codec fix<br>
</span></font><font size=2 face=Arial><span style='font-size:10.0pt;font-family:
Arial'><br>
Carl, <br>
<br>
I see. Pci_find_device is more reliable than dev_find_slot. However, we didn't
use the former in our SB600 and RS690 code. There are many places to be
modified if needed.<br>
<br>
Best regards<br>
Maggie li<br>
<br>
-----Original Message-----<br>
From: Carl-Daniel Hailfinger [mailto:<a
href="mailto:c-d.hailfinger.devel.2006@gmx.net"
ymailto="mailto:c-d.hailfinger.devel.2006@gmx.net">c-d.hailfinger.devel.2006@gmx.net</a>]
<br>
Sent: Monday, February 02, 2009 10:26 AM<br>
To: Li, Maggie<br>
Cc: Dan Lykowski; Marc Jones; <a href="mailto:coreboot@coreboot.org"
ymailto="mailto:coreboot@coreboot.org">coreboot@coreboot.org</a><br>
Subject: Re: [coreboot] SB600 HDA can't find codec fix<br>
<br>
Hi Maggie,<br>
<br>
while your point about pci_find_device is valid, I think that<br>
dev_find_device is the function Dan should choose. It allows us to<br>
address the PCI devices even if their bus locations are shifted which is<br>
possible with some AMD chipsets and may also be true for boards with<br>
multiple chipsets.<br>
In general, we want to use functions which can deal with non-default bus<br>
topologies.<br>
<br>
On 02.02.2009 02:48, Li, Maggie wrote:<br>
> Dan,<br>
><br>
>  <br>
><br>
> I read the RRG spec, just as you said, you should use 0xF in file
sb600_hda.c to get the current audio codec, that is to say, <br>
><br>
> dword &= 0xF;<br>
>    if (!dword)  <br>
>        goto no_codec;<br>
><br>
>  <br>
><br>
> pci_locate_device is really should be used in early setup. Device_t is the
type of u32 at that time. After this stage, you should use dev_find_slot. In
file sb600_sata.c, “/* sm_dev = pci_locate_device(PCI_ID(0x1002, 0x4385), 0) */
“ gives you misunderstanding about how to get the SMBus and it should be removed.
You can submit a patch about sata and I will ack it. Thanks.<br>
>  <br>
<br>
I'd prefer to use dev_find_device there as well.<br>
<br>
Regards,<br>
Carl-Daniel<br>
<br>
-- <br>
<a href="http://www.hailfinger.org/" target="_blank">http://www.hailfinger.org/
</a><br>
<br>
</span></font></p>

</div>

</div>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> </span></font></p>

</div>

</body>

</html>