[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v7 2/6] spapr_pci: encode class code including Prog
From: |
Nikunj A Dadhania |
Subject: |
[Qemu-devel] [PATCH v7 2/6] spapr_pci: encode class code including Prog IF register |
Date: |
Thu, 11 Jun 2015 16:32:25 +0530 |
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 <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>
---
hw/ppc/spapr_pci.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
index 3ebbcd5..33254b3 100644
--- a/hw/ppc/spapr_pci.c
+++ b/hw/ppc/spapr_pci.c
@@ -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",
pci_default_read_config(dev, PCI_REVISION_ID, 1)));
_FDT(fdt_setprop_cell(fdt, offset, "class-code",
- pci_default_read_config(dev, PCI_CLASS_DEVICE, 2)
- << 8));
+ pci_default_read_config(dev, PCI_CLASS_PROG, 3)));
if (pci_default_read_config(dev, PCI_INTERRUPT_PIN, 1)) {
_FDT(fdt_setprop_cell(fdt, offset, "interrupts",
pci_default_read_config(dev, PCI_INTERRUPT_PIN, 1)));
--
1.8.3.1
- [Qemu-devel] [PATCH v7 0/6] spapr_pci: DT field fixes and PCI DT node creation in QEMU, Nikunj A Dadhania, 2015/06/11
- [Qemu-devel] [PATCH v7 2/6] spapr_pci: encode class code including Prog IF register,
Nikunj A Dadhania <=
- [Qemu-devel] [PATCH v7 6/6] spapr_pci: drop redundant args in spapr_populate_pci_child_dt, Nikunj A Dadhania, 2015/06/11
- [Qemu-devel] [PATCH v7 5/6] spapr_pci: populate ibm,loc-code, Nikunj A Dadhania, 2015/06/11
- [Qemu-devel] [PATCH v7 1/6] spapr_pci: encode missing 64-bit memory address space, Nikunj A Dadhania, 2015/06/11
- [Qemu-devel] [PATCH v7 3/6] spapr_pci: enumerate and add PCI device tree, Nikunj A Dadhania, 2015/06/11
- [Qemu-devel] [PATCH v7 4/6] spapr_pci: set device node unit address as hex, Nikunj A Dadhania, 2015/06/11