switch-coreboot/util/dtc
Ronald G. Minnich 28ecbeab88 The K8 is one example, but there are other devices (e.g. I2C) that also have
multiple links. The way this was done in v2 was a big confusing; this way is 
less so. 

The changes are easy. Getting them right has been hard :-)

First, for a k8 north that has three links, you can name each one as follows:
pci0@18,0
pci1@18,0
pci2@18,0

We have to have the same pcidevfn on these because that is how the k8 works. 
But the unit numbers (pci0, pci1, etc.) distinguish them. 

The dts will properly generate a "v3 device code" 
compatible static tree that puts the links in the right place in the 
data structure. 

The changes to dts are trivial. 
As before, dts nodes with children are understood to be a bridge. 
But what if there is a dts entry like this:
pci1@18,0 {/config/("northbridge/amd/k8/pci");};


This entry has no children in the dts. 
How does dt compiler know it is a bridge? It can not know unless 
we add information to the dts for that northbridge part. 
To ensure that all bridge devices are detected, we support the following: 
if a dts node for a device has a bridge property, e.g.: 
 {
        device_operations = "k8_ops";
       bridge;
 };

The dt compiler will treat it as a bridge whether it has children or not. 

Why would a device not have children? Because it might be attached to a
pci or other socket, and we don't know at build time if the socket is empty, 
or what might be in the socket. 

This code has been tested on dbe62 and k8 simnow, and works on each. 
It is minimal in size and it does what we need. I hope it resolves our 
discussion for now. We might want to improve or change the device code
later but, at this point, forward motion is important -- I'm on a deadline for
a very important demo Oct. 22!

Also included in this patch are new debug prints in k8 north. 

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

Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


git-svn-id: svn://coreboot.org/repository/coreboot-v3@865 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-09-17 16:36:20 +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 The K8 is one example, but there are other devices (e.g. I2C) that also have 2008-09-17 16:36:20 +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 The K8 is one example, but there are other devices (e.g. I2C) that also have 2008-09-17 16:36:20 +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