Use field compat from pci_dev_t to fill "compatible" property. (Laurent Vivier)

git-svn-id: svn://coreboot.org/openbios/openbios-devel@353 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
Blue Swirl
2009-01-05 20:14:07 +00:00
parent ccb9456516
commit 7d6c9b0e78
3 changed files with 4 additions and 2 deletions

View File

@@ -1287,7 +1287,6 @@ ob_ide_ctrl_initialize(int *idx)
props[0]=14; props[1]=0; props[0]=14; props[1]=0;
set_property(ph, "interrupts", (char *)&props, 2*sizeof(int)); set_property(ph, "interrupts", (char *)&props, 2*sizeof(int));
set_property(ph, "compatible", "pci1095,646\0pci1095,646\0pciclass,01018f", 40);
set_int_property(ph, "#address-cells", 1); set_int_property(ph, "#address-cells", 1);
set_int_property(ph, "#size-cells", 0); set_int_property(ph, "#size-cells", 0);

View File

@@ -185,6 +185,9 @@ static void ob_pci_add_properties(pci_addr addr, const pci_dev_t *pci_dev,
push_str("model"); push_str("model");
fword("property"); fword("property");
} }
if (pci_dev->compat)
set_property(dev, "compatible",
pci_dev->compat, pci_compat_len(pci_dev));
push_str(pci_dev->name); push_str(pci_dev->name);
fword("encode-string"); fword("encode-string");
push_str("class"); push_str("class");

View File

@@ -26,7 +26,7 @@ extern int eth_config_cb(const pci_config_t *config);
extern int macio_config_cb(const pci_config_t *config); extern int macio_config_cb(const pci_config_t *config);
extern int vga_config_cb(const pci_config_t *config); extern int vga_config_cb(const pci_config_t *config);
static inline int pci_compat_len(pci_dev_t *dev) static inline int pci_compat_len(const pci_dev_t *dev)
{ {
int len, ret; int len, ret;
const char *path = dev->compat; const char *path = dev->compat;