Allow the GICv3 ACPI driver to attach to a GICv4
The same driver works on both, allow the driver to attach to a GICv4 controller with the ACPI attachment. Reported by: Andrey Fesenko <f0andrey_gmail.com> Sponsored by: Innovate UK
This commit is contained in:
parent
bd4bcd14e3
commit
a56b066600
@ -168,9 +168,15 @@ gic_v3_acpi_identify(driver_t *driver, device_t parent)
|
||||
"No gic interrupt or distributor table\n");
|
||||
goto out;
|
||||
}
|
||||
/* This is for the wrong GIC version */
|
||||
if (madt_data.dist->Version != ACPI_MADT_GIC_VERSION_V3)
|
||||
|
||||
/* Check the GIC version is supported by thiss driver */
|
||||
switch(madt_data.dist->Version) {
|
||||
case ACPI_MADT_GIC_VERSION_V3:
|
||||
case ACPI_MADT_GIC_VERSION_V4:
|
||||
break;
|
||||
default:
|
||||
goto out;
|
||||
}
|
||||
|
||||
dev = BUS_ADD_CHILD(parent, BUS_PASS_INTERRUPT + BUS_PASS_ORDER_MIDDLE,
|
||||
"gic", -1);
|
||||
@ -199,6 +205,7 @@ gic_v3_acpi_probe(device_t dev)
|
||||
|
||||
switch((uintptr_t)acpi_get_private(dev)) {
|
||||
case ACPI_MADT_GIC_VERSION_V3:
|
||||
case ACPI_MADT_GIC_VERSION_V4:
|
||||
break;
|
||||
default:
|
||||
return (ENXIO);
|
||||
|
Loading…
x
Reference in New Issue
Block a user