switch-coreboot/util
Ronald G. Minnich 643d952c5b In the current version of dtc, if one has the line:
/config/ = "northbridge/amd/geodelx";

Then the file northbridge/amd/geodelx/dts is read in and processed. 
Magic(TM) appends the name "/dts" to the path. 

This hack is fine with chips that only do one thing. 
But some (all) northbridge parts play several roles: APIC cluster, PCI domain
device, and PCI device. The result is a need for more than one dts, since
there are three possible devices, with three types of IDs, and so on. 

To keep things sane, I am proposing to enable multiple dts files in a
directory, names (e.g., nothing required here):
domaindts
pcidts
apicdts

(of course these names can be anything, this is just an example).
This change will require a change to the dtc, since we can no longer
assume just one dts file, and hence need a way to name these different 
files. 

The proposed change is very simple. We now require the full path name 
for the file, and eliminate the Magic(TM).

So, 
/config/ = "northbridge/amd/geodelx/pcidts";

will open the pcidts file. 
/config/ = "northbridge/amd/geodelx/domaindts";
will open the domain dts. 

Maybe we should just call it domain and pci and apic? works for me.
/config/ = "northbridge/amd/geodelx/domain";
/config/ = "northbridge/amd/geodelx/pcibridge";
/config/ = "northbridge/amd/geodelx/apic";

Changes: 
dtc.c: create a new function, fopenfile, that will only open a path if it 
really is a file. Modify dtc_open_file to use this function. fopenfile
assumes "-" means stdin; should it, or should I move that assumption back
to dtc_open_file?
dtc.h: add prototypes
dtc-parser.y: Given a config path, open the path.
southbridge/amd/cs5536/cs5536.c: example of how C code changes


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

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

Please see the comments below, but they do not have to be addressed for
this commit, just keep them in mind for future commits in that area.



git-svn-id: svn://coreboot.org/repository/coreboot-v3@566 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-01-29 17:48:10 +00:00
..
doxygen Now version 3: LinuxBIOS -> coreboot rename. 2008-01-27 18:54:57 +00:00
dtc In the current version of dtc, if one has the line: 2008-01-29 17:48:10 +00:00
kconfig Now version 3: LinuxBIOS -> coreboot rename. 2008-01-27 18:54:57 +00:00
lar Now version 3: LinuxBIOS -> coreboot rename. 2008-01-27 18:54:57 +00:00
lzma Now version 3: LinuxBIOS -> coreboot rename. 2008-01-27 18:54:57 +00:00
nrv2b Now version 3: LinuxBIOS -> coreboot rename. 2008-01-27 18:54:57 +00:00
options Now version 3: LinuxBIOS -> coreboot rename. 2008-01-27 18:54:57 +00:00
x86emu Now version 3: LinuxBIOS -> coreboot rename. 2008-01-27 18:54:57 +00:00
xcompile Now version 3: LinuxBIOS -> coreboot rename. 2008-01-27 18:54:57 +00:00
Makefile Now version 3: LinuxBIOS -> coreboot rename. 2008-01-27 18:54:57 +00:00