coreboot/util/dtc
Carl-Daniel Hailfinger c2084e9de3 I managed to break dtc while working on PCI bridges:
dtc only uses dev_fn as identifier for a PCI device. That gets us a name
collision if we have the same dev_fn combination on multiple buses.
Either we add a random unique ID to the struct name or we integrate the
path to the parent device as well.
I decided to go for integration of parent device path.

With the following device tree

/{
        cpus {};
        domain@0 {
                bus@0 {
                        pci@0,0 {
                        };
                        pci@1,1 {
                        };
                        pci@f,0 {
                                bus@1 {
                                        pci@0,0 {
                                        };
                                };
                        };
                };
        };
};


we get the old names:
dev_root
dev_cpus
dev_domain_0
dev_bus_0
dev_pci_0_0
dev_pci_1_1
dev_pci_f_0
dev_bus_1
dev_pci_0_0 COLLISION!!!

and the new names:
dev_root
dev_cpus
dev_domain_0
dev_domain_0_bus_0
dev_domain_0_bus_0_pci_0_0
dev_domain_0_bus_0_pci_1_1
dev_domain_0_bus_0_pci_f_0
dev_domain_0_bus_0_pci_f_0_bus_1
dev_domain_0_bus_0_pci_f_0_bus_1_pci_0_0

Ron would like shorter names because they only have to be
machine-readable. That's left for another patch.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>


git-svn-id: svn://coreboot.org/repository/coreboot-v3@860 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-09-06 20:39:25 +00:00
..
Documentation filling in 2006-10-06 19:19:14 +00:00
tests filling in 2006-10-06 19:19:14 +00:00
comment-test.dts filling in 2006-10-06 19:19:14 +00:00
COPYING filling in 2006-10-06 19:19:14 +00:00
data.c Add generic array support to the coreboot dts output code. 2008-04-17 16:13:58 +00:00
dtc-lexer.l This is the dtc update by itself. 2007-06-27 19:13:18 +00:00
dtc-parser.y Add support for dtc files that end in .dtc, e.g. ide.dtc. 2008-08-11 16:05:53 +00:00
dtc.c In the current version of dtc, if one has the line: 2008-01-29 17:48:10 +00:00
dtc.h Add generic array support to the coreboot dts output code. 2008-04-17 16:13:58 +00:00
endian.h Now version 3: LinuxBIOS -> coreboot rename. 2008-01-27 18:54:57 +00:00
flat_dt.h filling in 2006-10-06 19:19:14 +00:00
flattree.c I managed to break dtc while working on PCI bridges: 2008-09-06 20:39:25 +00:00
fstree.c Changes to allow us to use the dtc to create C structures for the static 2007-06-19 07:03:35 +00:00
ftdump.c This patch fixes compilation on OS X 2007-07-16 22:42:21 +00:00
libdt.c This patch fixes compilation on OS X 2007-07-16 22:42:21 +00:00
livetree.c Fix code warning - val.type is a char, and NULL is not. 2008-04-26 12:05:08 +00:00
Makefile * move post_code() to a seperate file 2007-07-23 16:49:00 +00:00
test.dts filling in 2006-10-06 19:19:14 +00:00
TODO filling in 2006-10-06 19:19:14 +00:00
treesource.c Clean up nasty dtc warnings 2007-02-23 10:13:24 +00:00