Add arm,gic-400 support to GIC driver

This commit is contained in:
Jeremy Soller
2024-10-29 08:00:17 -06:00
parent e4e55103ad
commit 15b0133b7b
2 changed files with 5 additions and 2 deletions
+4 -1
View File
@@ -43,7 +43,10 @@ impl GenericInterruptController {
}
}
pub fn parse(fdt: &Fdt) -> Result<(usize, usize, usize, usize)> {
if let Some(node) = fdt.find_compatible(&["arm,cortex-a15-gic"]) {
if let Some(node) = fdt.find_compatible(&[
"arm,cortex-a15-gic",
"arm,gic-400",
]) {
return GenericInterruptController::parse_inner(&node);
} else {
return Err(Error::new(EINVAL));
+1 -1
View File
@@ -10,7 +10,7 @@ mod irq_bcm2836;
pub(crate) fn new_irqchip(ic_str: &str) -> Option<Box<dyn InterruptController>> {
if ic_str.contains("arm,gic-v3") {
Some(Box::new(gicv3::GicV3::new()))
} else if ic_str.contains("arm,cortex-a15-gic") {
} else if ic_str.contains("arm,cortex-a15-gic") || ic_str.contains("arm,gic-400") {
Some(Box::new(gic::GenericInterruptController::new()))
} else if ic_str.contains("brcm,bcm2836-l1-intc") {
Some(Box::new(irq_bcm2836::Bcm2836ArmInterruptController::new()))