Dan
I think you made a mistake. It should be “sm_dev = dev_find_device(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_ATI_SB600_SM, 0);”, not “sm_dev = pci_locate_device(PCI_ID(0x1002, 0x4385), 0);” in your file.
In my last letter, there is a writing error. We should say that dev_find_device is more reliable than dev_find_slot
Best regards Maggie li
________________________________
From: Dan Lykowski [mailto:engineerguy3737@yahoo.com] Sent: Wednesday, February 04, 2009 11:58 AM To: Li, Maggie; Carl-Daniel Hailfinger Cc: Marc Jones; coreboot@coreboot.org Subject: Re: [coreboot] SB600 HDA can't find codec fix
Sorry for the delay.. Way too much to do and so little time..
Fixed the spotted issues and added 1ms delay to match the BKDG while waiting for BAR+0xe to set its bits.
Dan Lykowski
Signed-off-by: Dan Lykowskilykowdk@gmail.com
________________________________
From: "Li, Maggie" Maggie.Li@amd.com To: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net Cc: Dan Lykowski engineerguy3737@yahoo.com; Marc Jones marcj303@gmail.com; coreboot@coreboot.org Sent: Sunday, February 1, 2009 7:47:15 PM Subject: RE: [coreboot] SB600 HDA can't find codec fix
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@gmx.net] Sent: Monday, February 02, 2009 10:26 AM To: Li, Maggie Cc: Dan Lykowski; Marc Jones; coreboot@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