spapr_pci: encode class code including Prog IF register
Current code missed the Prog IF register. All Class Code, Subclass, and Prog IF registers are needed to identify the accurate device type. For example: USB controllers use the PROG IF for denoting: USB FullSpeed, HighSpeed or SuperSpeed. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
parent
72187935b4
commit
4a7c347415
|
@ -900,8 +900,7 @@ static int spapr_populate_pci_child_dt(PCIDevice *dev, void *fdt, int offset,
|
||||||
_FDT(fdt_setprop_cell(fdt, offset, "revision-id",
|
_FDT(fdt_setprop_cell(fdt, offset, "revision-id",
|
||||||
pci_default_read_config(dev, PCI_REVISION_ID, 1)));
|
pci_default_read_config(dev, PCI_REVISION_ID, 1)));
|
||||||
_FDT(fdt_setprop_cell(fdt, offset, "class-code",
|
_FDT(fdt_setprop_cell(fdt, offset, "class-code",
|
||||||
pci_default_read_config(dev, PCI_CLASS_DEVICE, 2)
|
pci_default_read_config(dev, PCI_CLASS_PROG, 3)));
|
||||||
<< 8));
|
|
||||||
if (pci_default_read_config(dev, PCI_INTERRUPT_PIN, 1)) {
|
if (pci_default_read_config(dev, PCI_INTERRUPT_PIN, 1)) {
|
||||||
_FDT(fdt_setprop_cell(fdt, offset, "interrupts",
|
_FDT(fdt_setprop_cell(fdt, offset, "interrupts",
|
||||||
pci_default_read_config(dev, PCI_INTERRUPT_PIN, 1)));
|
pci_default_read_config(dev, PCI_INTERRUPT_PIN, 1)));
|
||||||
|
|
Loading…
Reference in a new issue