[coreboot] dtc patch: make all names unique, misc. cleanup, more to come

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Thu Sep 4 05:05:34 CEST 2008

On 04.09.2008 02:30, ron minnich wrote:
> This resolves the "unique name" problem. It sets up for k8 CPUs with
> multiple busses per chip.
> Comments welcome. I realize this code is not ideal :-)
> Cleanup. Not totally yet. But it's better and it works with dbe62. 
> Basically, variables such as domain, bus, etc. are now inherited from the parent. 
> Label_tree has been fixed to do lots of tree annotation and cleanup. 
> One whole un-needed function is gone.

But the patch added 90 lines of code in total. We may need to trim that

> We're going to soon be able to do stuff like bus at 3{} bus at 2{} etc. which we 
> need to support k8. 
> This code "needs more love" as ward puts it but this is an improvement. 
> Also, names are now unique:
> struct device dev_pci_0_0_1_0
> which is domain 0, bus 0, dev 1, fn 0.

My personal preferences for the name would be:
struct device dev_pci_domain_0_bus_0_dev_1_fn_0
struct device dev_pci_domain_0_bus_0_devfn_1_0
struct device dev_pci_domain0_bus0_dev1_fn0

Basically, pci_0_0_1_0 is not that intuitive.

> Signed-off-by: Ronald G. Minnich <rminnich at gmail.com>

I have not reviewed the code itself yet, but the output (except problems
with lots of additional linebreaks in inopportune places) is definitely
an improvement.
It would be cool if you could write in the changelog that your patch
initializes the dev.path for CPU devices (was zero before).

Once I fully understand your patch and its side effects, I'll probably ack.



More information about the coreboot mailing list