Hi,
v3 currently has hardware information scattered between DTS and Kconfig. I'd like to use the DTC in v3 to create a #define for every component type in the tree. That way, all hardware description could be removed from Kconfig files. Besides the obvious stuff (no CPU specified in the DTS, etc.) this looks doable. The question is, however, for which property/key type we want to emit a #define.
The following device tree
/{ mainboard-vendor = "PC Engines"; mainboard-name = "ALIX1.C"; cpus { }; apic@0 { /config/("northbridge/amd/geodelx/apic"); }; domain@0 { /config/("northbridge/amd/geodelx/domain"); /* Video RAM has to be in 2MB chunks. */ geode_video_mb = "8"; pci@1,0 { /config/("northbridge/amd/geodelx/pci"); }; pci@15,0 { /config/("southbridge/amd/cs5536/dts"); /* Interrupt enables for LPC bus. * Each bit is an IRQ 0-15. */ lpc_serirq_enable = "0x0000105A"; /* LPC IRQ polarity. Each bit is an IRQ 0-15. */ lpc_serirq_polarity = "0x0000EFA5"; /* 0:continuous 1:quiet */ lpc_serirq_mode = "1"; /* GPIO(0-0x20) for INT D:C:B:A, 0xFF=none. * See virtual PIC spec. */ enable_gpio_int_route = "0x0D0C0700"; }; pci@15,2 { /config/("southbridge/amd/cs5536/ide"); enable_ide = "1"; }; ioport@46 { /config/("superio/winbond/w83627hf/dts"); com1enable = "1"; }; }; };
would lead to the following #defines emitted from a special DTC mode:
#define CONFIG_NORTHBRIDGE_AMD_GEODELX_APIC #define CONFIG_NORTHBRIDGE_AMD_GEODELX_DOMAIN #define CONFIG_NORTHBRIDGE_AMD_GEODELX_PCI #define CONFIG_SOUTHBRIDGE_AMD_CS5536_DTS #define CONFIG_SOUTHBRIDGE_AMD_CS5536_IDE #define CONFIG_SUPERIO_WINBOND_W83627HF_DTS
Comments? Thoughts?
Regards,
Carl-Daniel
I like it.
ron
On 05.07.2008 22:19, ron minnich wrote:
I like it.
Great. Getting this coded up depends somewhat on a review/commit of [coreboot] [PATCH] v3: Move default mainboard vendor/subsystem from Kconfig to dts
And, of course, we'll have to decide how fine the granularity should be. - One #define per included DTS? - One #define per component?
Regards, Carl-Daniel
On 06.07.2008 01:24, Carl-Daniel Hailfinger wrote:
On 05.07.2008 22:19, ron minnich wrote:
I like it.
Great.
And, of course, we'll have to decide how fine the granularity should be.
- One #define per included DTS?
- One #define per component?
The biggest hurdle right now is that the CPU type is completely missing from the device tree. I believe that's an oversight. The instruction architecture is missing as well, but it can be deduced from the CPU type.
Thoughts?
Regards, Carl-Daniel