[coreboot] SB600 HDA can't find codec fix

Li, Maggie Maggie.Li at amd.com
Mon Feb 2 02:48:54 CET 2009


Dan,

 

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, 

dword &= 0xF;
    if (!dword)  
        goto no_codec;

 

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.

Best regards 
Maggie li

________________________________

From: Dan Lykowski [mailto:engineerguy3737 at yahoo.com] 
Sent: Sunday, February 01, 2009 6:51 PM
To: Li, Maggie
Cc: Marc Jones; Carl-Daniel Hailfinger; coreboot at coreboot.org
Subject: Re: [coreboot] SB600 HDA can't find codec fix

 

Maggie,
 Oops, I can't convert binary to hex.. 
7 should have been 15. and it should have been bits [3..0].
Is this what you are referring to?

I don't understand what you mean by pci_locate_device is only used during early setup. I see it called in the SATA driver to find the SMBus. Is this incorrect also? What would be the best way to get the SMBus? Is the device being stored somewhere that I don't currently see?

Thanks,
Dan Lykowski 


--- On Sun, 2/1/09, Li, Maggie <Maggie.Li at amd.com> wrote:


From: Li, Maggie <Maggie.Li at amd.com>
Subject: Re: [coreboot] SB600 HDA can't find codec fix
To: "Dan Lykowski" <engineerguy3737 at yahoo.com>
Cc: "Marc Jones" <marcj303 at gmail.com>, "Carl-Daniel Hailfinger" <c-d.hailfinger.devel.2006 at gmx.net>, coreboot at coreboot.org
Date: Sunday, February 1, 2009, 3:28 AM

Hi, Dan

I have tested your patch on my dbm690t (ALC882) and pistachio (ALC885) board. It really works. However, I have a suggestion for you.

/* Read in Codec location (BAR + 0xe)[2..0]*/
    dword = readl(base + 0xe);
    dword &= 7;
    if (!dword)  
        goto no_codec;
The above phrase is not correct all the time, at lease to my pistachio board. It will give me the wrong msg "No codec!".

I would appreciate and ack the patch if you can modify it.

BTW, pci_locate_device is only used in early setup stage. So, you can remove it.

Best regards
Maggie li

-----Original Message-----
From: coreboot-bounces at coreboot.org [mailto:coreboot-bounces at coreboot.org] On Behalf Of Marc Jones
Sent: Thursday, January 29, 2009 1:10 PM
To: Dan Lykowski
Cc: Carl-Daniel Hailfinger; coreboot at coreboot.org
Subject: Re: [coreboot] SB600 HDA can't find codec fix

On Tue, Jan 27, 2009 at 11:07 AM, Dan Lykowski
<engineerguy3737 at yahoo.com> wrote:
> Diff was being silly and I wanted to get the patch posted before I left work
> for the day. I've cleaned up the patch and included it.
>
> I wasn't able to find where INTA was used so I used what the RPR lists as
> default. INTG. After looking at the mptable, I agree INTA is the correct
> answer. I've corrected it. I used dev_find_slot because I copied from the
> SATA driver. I've added the comment just like the SATA driver has. I don't
> know what the difference is, or why the SATA driver did this.
>
> The reordering was based on what order things happen in the BIOS Developers
> guide, RPR, and SATA driver. I fixed the order of the devices that didn't
> matter to clean up the change log.
> 1. Enable the Chip
> 2. Setup the SMBus registers
> 3. Setup the Device Registers
> 4. Look for Codec
> 5. Init Codec
>
> The codec init was changed to match the description in the RRG pg 235.
> Mem Reg: Base + 08h Bit 0. There were unneeded things happening.
> So here is the second try.
>
> Thanks,
> Dan Lykowski
>
> Signed-off-by: Dan Lykowski <lykowdk at gmail.com>

This looks good to me. The hda_init looks like it was writing to the
wrong device for the interrupt line setup. It would be good if the the
AMD guys or Carl-Daniel can test and ack it.

Marc

--
coreboot mailing list: coreboot at coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot

--
coreboot mailing list: coreboot at coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20090202/6810f6cd/attachment.html>


More information about the coreboot mailing list