Move default mainboard vendor/subsystem from Kconfig to dts.
Compile tested including boundary cases. Runtime tested on dbe62 by Ron. Works fine. 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@693 f3766cd6-281f-0410-b1cd-43a5c92072e9
This commit is contained in:
parent
0f05bd42db
commit
d9e875537b
13 changed files with 65 additions and 89 deletions
|
|
@ -50,6 +50,7 @@
|
|||
#if CONFIG_CARDBUS_PLUGIN_SUPPORT == 1
|
||||
#include <device/cardbus.h>
|
||||
#endif
|
||||
#include <statictree.h>
|
||||
|
||||
u8 pci_moving_config8(struct device *dev, unsigned int reg)
|
||||
{
|
||||
|
|
@ -627,19 +628,18 @@ void pci_dev_enable_resources(struct device *dev)
|
|||
/* Set the subsystem vendor and device ID for mainboard devices. */
|
||||
ops = ops_pci(dev);
|
||||
|
||||
#if defined(CONFIG_MAINBOARD_PCI_SUBSYSTEM_VENDOR_ID) && \
|
||||
defined(CONFIG_MAINBOARD_PCI_SUBSYSTEM_DEVICE_ID)
|
||||
#ifdef HAVE_MAINBOARD_PCI_SUBSYSTEM_ID
|
||||
if (dev->on_mainboard && ops && ops->set_subsystem) {
|
||||
printk(BIOS_DEBUG,
|
||||
"%s: Setting subsystem VID/DID to %02x/%02x\n",
|
||||
dev_path(dev), CONFIG_MAINBOARD_PCI_SUBSYSTEM_VENDOR_ID,
|
||||
CONFIG_MAINBOARD_PCI_SUBSYSTEM_DEVICE_ID);
|
||||
dev_path(dev), mainboard_pci_subsystem_vendor,
|
||||
mainboard_pci_subsystem_device);
|
||||
|
||||
ops->set_subsystem(dev,
|
||||
CONFIG_MAINBOARD_PCI_SUBSYSTEM_VENDOR_ID,
|
||||
CONFIG_MAINBOARD_PCI_SUBSYSTEM_DEVICE_ID);
|
||||
ops->set_subsystem(dev, mainboard_pci_subsystem_vendor,
|
||||
mainboard_pci_subsystem_device);
|
||||
}
|
||||
#endif
|
||||
|
||||
command = pci_read_config16(dev, PCI_COMMAND);
|
||||
command |= dev->command;
|
||||
command |= (PCI_COMMAND_PARITY + PCI_COMMAND_SERR); // Error check.
|
||||
|
|
|
|||
|
|
@ -26,19 +26,3 @@ config MAINBOARD_NAME
|
|||
help
|
||||
This is the name for the Advanced Digital Logic MSM800SEV mainboard.
|
||||
|
||||
config MAINBOARD_PCI_SUBSYSTEM_VENDOR_ID
|
||||
hex
|
||||
# TODO: Fix the PCI ID.
|
||||
default 0x1022
|
||||
depends BOARD_ADL_MSM800SEV
|
||||
help
|
||||
Mainboard specific PCI subsystem vendor ID.
|
||||
|
||||
config MAINBOARD_PCI_SUBSYSTEM_DEVICE_ID
|
||||
hex
|
||||
# TODO: Fix the PCI ID.
|
||||
default 0x2323
|
||||
depends BOARD_ADL_MSM800SEV
|
||||
help
|
||||
Mainboard specific PCI subsystem vendor ID.
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,8 @@
|
|||
/{
|
||||
mainboard-vendor = "Advanced Digital Logic";
|
||||
mainboard-name = "MSM800SEV";
|
||||
mainboard_pci_subsystem_vendor = "0x1022";
|
||||
mainboard_pci_subsystem_device = "0x2323";
|
||||
cpus { };
|
||||
apic@0 {
|
||||
/config/("northbridge/amd/geodelx/apic");
|
||||
|
|
|
|||
|
|
@ -26,19 +26,3 @@ config MAINBOARD_NAME
|
|||
help
|
||||
This is the default mainboard name.
|
||||
|
||||
config MAINBOARD_PCI_SUBSYSTEM_VENDOR_ID
|
||||
hex
|
||||
# TODO: Fix PCI ID.
|
||||
default 0x1022
|
||||
depends BOARD_AMD_DB800
|
||||
help
|
||||
Mainboard specific PCI subsystem vendor ID.
|
||||
|
||||
config MAINBOARD_PCI_SUBSYSTEM_DEVICE_ID
|
||||
hex
|
||||
# TODO: Fix PCI ID.
|
||||
default 0x2323
|
||||
depends BOARD_AMD_DB800
|
||||
help
|
||||
Mainboard specific PCI subsystem device ID.
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,8 @@
|
|||
/{
|
||||
mainboard-vendor = "AMD";
|
||||
mainboard-name = "DB800";
|
||||
mainboard_pci_subsystem_vendor = "0x1022";
|
||||
mainboard_pci_subsystem_device = "0x2323";
|
||||
cpus { };
|
||||
apic@0 {
|
||||
/config/("northbridge/amd/geodelx/apic");
|
||||
|
|
|
|||
|
|
@ -26,19 +26,3 @@ config MAINBOARD_NAME
|
|||
help
|
||||
This is the default mainboard name.
|
||||
|
||||
config MAINBOARD_PCI_SUBSYSTEM_VENDOR_ID
|
||||
hex
|
||||
# TODO: Fix PCI ID.
|
||||
default 0x1022
|
||||
depends BOARD_AMD_NORWICH
|
||||
help
|
||||
Mainboard specific PCI subsystem vendor ID.
|
||||
|
||||
config MAINBOARD_PCI_SUBSYSTEM_DEVICE_ID
|
||||
hex
|
||||
# TODO: Fix PCI ID.
|
||||
default 0x2323
|
||||
depends BOARD_AMD_NORWICH
|
||||
help
|
||||
Mainboard specific PCI subsystem device ID.
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,8 @@
|
|||
/{
|
||||
mainboard-vendor = "AMD";
|
||||
mainboard-name = "NORWICH";
|
||||
mainboard_pci_subsystem_vendor = "0x1022";
|
||||
mainboard_pci_subsystem_device = "0x2323";
|
||||
cpus { };
|
||||
apic@0 {
|
||||
/config/("northbridge/amd/geodelx/apic");
|
||||
|
|
@ -28,7 +30,7 @@
|
|||
domain@0 {
|
||||
/config/("northbridge/amd/geodelx/domain");
|
||||
/* Video RAM has to be in 2MB chunks. */
|
||||
geode_video_mb = "8";
|
||||
geode_video_mb = "8";
|
||||
pci@1,0 {
|
||||
/config/("northbridge/amd/geodelx/pci");
|
||||
};
|
||||
|
|
|
|||
|
|
@ -26,19 +26,3 @@ config MAINBOARD_NAME
|
|||
help
|
||||
This is the default mainboard name.
|
||||
|
||||
config MAINBOARD_PCI_SUBSYSTEM_VENDOR_ID
|
||||
hex
|
||||
# TODO: Fix PCI ID.
|
||||
default 0x1022
|
||||
depends BOARD_ARTECGROUP_DBE61
|
||||
help
|
||||
Mainboard specific PCI subsystem vendor ID.
|
||||
|
||||
config MAINBOARD_PCI_SUBSYSTEM_DEVICE_ID
|
||||
hex
|
||||
# TODO: Fix PCI ID.
|
||||
default 0x2323
|
||||
depends BOARD_ARTECGROUP_DBE61
|
||||
help
|
||||
Mainboard specific PCI subsystem device ID.
|
||||
|
||||
|
|
|
|||
|
|
@ -75,6 +75,8 @@ end
|
|||
/{
|
||||
mainboard-vendor = "Artec Group";
|
||||
mainboard-name = "DBE61";
|
||||
mainboard_pci_subsystem_vendor = "0x1022";
|
||||
mainboard_pci_subsystem_device = "0x2323";
|
||||
cpus { };
|
||||
apic@0 {
|
||||
/config/("northbridge/amd/geodelx/apic");
|
||||
|
|
|
|||
|
|
@ -27,17 +27,3 @@ config MAINBOARD_NAME
|
|||
help
|
||||
This is the default mainboard name.
|
||||
|
||||
config MAINBOARD_PCI_SUBSYSTEM_VENDOR_ID
|
||||
hex
|
||||
default 0x15ad
|
||||
depends BOARD_EMULATION_QEMU_X86
|
||||
help
|
||||
Mainboard specific PCI subsystem vendor ID.
|
||||
|
||||
config MAINBOARD_PCI_SUBSYSTEM_DEVICE_ID
|
||||
hex
|
||||
default 0x1976
|
||||
depends BOARD_EMULATION_QEMU_X86
|
||||
help
|
||||
Mainboard specific PCI subsystem device ID.
|
||||
|
||||
|
|
|
|||
|
|
@ -20,8 +20,6 @@ CONFIG_LOCALVERSION=""
|
|||
CONFIG_VENDOR_EMULATION=y
|
||||
# CONFIG_VENDOR_PCENGINES is not set
|
||||
CONFIG_MAINBOARD_NAME="emulation/qemu-x86"
|
||||
CONFIG_MAINBOARD_PCI_SUBSYSTEM_VENDOR_ID=0x15ad
|
||||
CONFIG_MAINBOARD_PCI_SUBSYSTEM_DEVICE_ID=0x1976
|
||||
CONFIG_BOARD_EMULATION_QEMU_X86=y
|
||||
# CONFIG_COREBOOT_ROMSIZE_KB_128 is not set
|
||||
CONFIG_COREBOOT_ROMSIZE_KB_256=y
|
||||
|
|
|
|||
|
|
@ -21,6 +21,8 @@
|
|||
/{
|
||||
mainboard-vendor = "Emulation";
|
||||
mainboard-name = "QEMU x86";
|
||||
mainboard_pci_subsystem_vendor = "0x15ad";
|
||||
mainboard_pci_subsystem_device = "0x1976";
|
||||
device_operations = "qemuvga_pci_ops_dev";
|
||||
cpus {};
|
||||
domain@0 {
|
||||
|
|
|
|||
|
|
@ -1328,7 +1328,7 @@ void dt_to_coreboot(FILE *f, struct boot_info *bi, int version, int boot_cpuid_p
|
|||
extern char *code;
|
||||
struct node *next;
|
||||
extern struct node *first_node;
|
||||
int found_mainboard_vendor = 0, found_mainboard_partnumber = 0;
|
||||
int found_mainboard_vendor = 0, found_mainboard_partnumber = 0, found_mainboard_subsys = 0;
|
||||
|
||||
labeltree(bi->dt);
|
||||
|
||||
|
|
@ -1361,6 +1361,14 @@ void dt_to_coreboot(FILE *f, struct boot_info *bi, int version, int boot_cpuid_p
|
|||
found_mainboard_partnumber = 1;
|
||||
fprintf(f, "const char *mainboard_part_number = \"%s\";\n", prop->val.val);
|
||||
}
|
||||
if (streq(prop->name, "mainboard_pci_subsystem_vendor")){
|
||||
found_mainboard_subsys++;
|
||||
fprintf(f, "const u16 mainboard_pci_subsystem_vendor = %s;\n", prop->val.val);
|
||||
}
|
||||
if (streq(prop->name, "mainboard_pci_subsystem_device")){
|
||||
found_mainboard_subsys++;
|
||||
fprintf(f, "const u16 mainboard_pci_subsystem_device = %s;\n", prop->val.val);
|
||||
}
|
||||
}
|
||||
|
||||
if (! found_mainboard_vendor){
|
||||
|
|
@ -1374,6 +1382,17 @@ void dt_to_coreboot(FILE *f, struct boot_info *bi, int version, int boot_cpuid_p
|
|||
"(and make sure there is a mainboard-vendor property too");
|
||||
}
|
||||
|
||||
switch (found_mainboard_subsys) {
|
||||
case 0:
|
||||
break;
|
||||
case 1:
|
||||
die("There is only one of mainboard_pci_subsystem_vendor and "
|
||||
"mainboard_pci_subsystem_device properties in the root. "
|
||||
"Please add the other one or remove the existing one.");
|
||||
break;
|
||||
case 2:
|
||||
break;
|
||||
}
|
||||
|
||||
/* emit the code, if any */
|
||||
if (code)
|
||||
|
|
@ -1395,6 +1414,8 @@ void dt_to_corebooth(FILE *f, struct boot_info *bi, int version, int boot_cpuid_
|
|||
char *symprefix = "dt";
|
||||
extern char *code;
|
||||
struct node *next;
|
||||
struct property *prop;
|
||||
int found_mainboard_subsys = 0;
|
||||
extern struct node *first_node;
|
||||
|
||||
labeltree(bi->dt);
|
||||
|
|
@ -1416,6 +1437,31 @@ void dt_to_corebooth(FILE *f, struct boot_info *bi, int version, int boot_cpuid_
|
|||
/* emit any includes that we need -- TODO: ONLY ONCE PER TYPE*/
|
||||
fprintf(f, "#include <device/device.h>\n#include <device/pci.h>\n");
|
||||
fprintf(f, "extern const char *mainboard_vendor, *mainboard_part_number;\n");
|
||||
|
||||
for_each_property(bi->dt, prop) {
|
||||
if (streq(prop->name, "mainboard_pci_subsystem_vendor")){
|
||||
found_mainboard_subsys++;
|
||||
}
|
||||
if (streq(prop->name, "mainboard_pci_subsystem_device")){
|
||||
found_mainboard_subsys++;
|
||||
}
|
||||
}
|
||||
|
||||
switch (found_mainboard_subsys) {
|
||||
case 0:
|
||||
break;
|
||||
case 1:
|
||||
die("There is only one of mainboard_pci_subsystem_vendor and "
|
||||
"mainboard_pci_subsystem_device properties in the root. "
|
||||
"Please add the other one or remove the existing one.");
|
||||
break;
|
||||
case 2:
|
||||
fprintf(f, "#define HAVE_MAINBOARD_PCI_SUBSYSTEM_ID\n");
|
||||
fprintf(f, "extern const u16 mainboard_pci_subsystem_vendor;\n");
|
||||
fprintf(f, "extern const u16 mainboard_pci_subsystem_device;\n");
|
||||
break;
|
||||
}
|
||||
|
||||
flatten_tree_emit_includes(bi->dt, &coreboot_emitter, f, &strbuf, vi);
|
||||
|
||||
flatten_tree_emit_structdecls(bi->dt, &coreboot_emitter, f, &strbuf, vi);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue