On 04.06.2008 16:53, ron minnich wrote: > So, I went to apply and test this patch, but I guess, on reflection, > I'm pretty uncomfortable with it. Why? Because of this: > > + hide_vpci(0x800079C4); > > This is even worse than putting stuff like this in the code > dev = dev_find_pci_device(PCI_VENDOR_ID_AMD, > PCI_DEVICE_ID_AMD_CS5536_UDC, 0); > if (dev) > pci_write_config32(dev, 0x7C, 0xDEADBEEF); > > because at least the latter form doesn't hard code pcidevfn. > > I think you are right. hide_vpci should take a dev pointer. So let's > try to rework with that change to hide_vpci and we can then bring this > patch in. > > hide_vpci then becomes pretty simple in fact ... >
Please note that my patch does only change those occurences where pci_write_config32(dev, 0x7C, 0xDEADBEEF); was unusable. The rest of the changes is just better commenting, avoidance of variable reuse and so on. My original patch had the pci_write_config32 -> hide_vpci transformation (bad), the updated patch (dated 08.05.2008 02:12) didn't, that way I can send a followup patch which introduces hide_vpci_dev and cleans up the rest once you ack this one. Regards, Carl-Daniel -- coreboot mailing list [email protected] http://www.coreboot.org/mailman/listinfo/coreboot

