[coreboot] [RFC] v3 DTS and Kconfig

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Sat Jul 5 12:59:41 CEST 2008


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 at 0 {
		/config/("northbridge/amd/geodelx/apic");
	};
	domain at 0 {
		/config/("northbridge/amd/geodelx/domain");
		/* Video RAM has to be in 2MB chunks. */
		geode_video_mb = "8";
		pci at 1,0 {
			/config/("northbridge/amd/geodelx/pci");
		};
		pci at 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 at 15,2 {
			/config/("southbridge/amd/cs5536/ide");
			enable_ide = "1";
		};
		ioport at 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




-- 
http://www.hailfinger.org/





More information about the coreboot mailing list