mirror of
https://gitlab.com/qemu-project/openbios.git
synced 2024-02-13 08:34:06 +08:00
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:
@@ -1287,7 +1287,6 @@ ob_ide_ctrl_initialize(int *idx)
|
||||
props[0]=14; props[1]=0;
|
||||
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, "#size-cells", 0);
|
||||
|
||||
|
||||
@@ -185,6 +185,9 @@ static void ob_pci_add_properties(pci_addr addr, const pci_dev_t *pci_dev,
|
||||
push_str("model");
|
||||
fword("property");
|
||||
}
|
||||
if (pci_dev->compat)
|
||||
set_property(dev, "compatible",
|
||||
pci_dev->compat, pci_compat_len(pci_dev));
|
||||
push_str(pci_dev->name);
|
||||
fword("encode-string");
|
||||
push_str("class");
|
||||
|
||||
@@ -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 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;
|
||||
const char *path = dev->compat;
|
||||
|
||||
Reference in New Issue
Block a user