[coreboot] SB600 HDA can't find codec fix

Li, Maggie Maggie.Li at amd.com
Mon Feb 2 04:47:15 CET 2009


Carl, 

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.

Best regards
Maggie li

-----Original Message-----
From: Carl-Daniel Hailfinger [mailto:c-d.hailfinger.devel.2006 at gmx.net] 
Sent: Monday, February 02, 2009 10:26 AM
To: Li, Maggie
Cc: Dan Lykowski; Marc Jones; coreboot at coreboot.org
Subject: Re: [coreboot] SB600 HDA can't find codec fix

Hi Maggie,

while your point about pci_find_device is valid, I think that
dev_find_device is the function Dan should choose. It allows us to
address the PCI devices even if their bus locations are shifted which is
possible with some AMD chipsets and may also be true for boards with
multiple chipsets.
In general, we want to use functions which can deal with non-default bus
topologies.

On 02.02.2009 02:48, Li, Maggie wrote:
> 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.
>   

I'd prefer to use dev_find_device there as well.

Regards,
Carl-Daniel

-- 
http://www.hailfinger.org/




More information about the coreboot mailing list