mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-24 15:31:22 +01:00
lib: sbi_irqchip: Call driver warm_init from SBI core
Currently, each platform keeps track of which irqchip driver is in use and calls its warm init function. Since the generic platform may use multiple irqchip drivers, it has logic to track an array of drivers. The code is simplified and made common across platforms by treating warm init and exit as properties of the driver, not the platform. Then the platform's only role is to select and prepare a driver during cold boot. For now, only add a .warm_init hook, since none of the existing drivers need an .exit hook. It could be added in the future if needed. Signed-off-by: Samuel Holland <samuel.holland@sifive.com> Reviewed-by: Anup Patel <anup@brainfault.org>
This commit is contained in:

committed by
Anup Patel

parent
e3e5686ef9
commit
2dd6eaf680
@@ -110,7 +110,7 @@ static int ariane_irqchip_init(bool cold_boot)
|
||||
return ret;
|
||||
}
|
||||
|
||||
return plic_warm_irqchip_init();
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@@ -143,7 +143,7 @@ static int openpiton_irqchip_init(bool cold_boot)
|
||||
return ret;
|
||||
}
|
||||
|
||||
return plic_warm_irqchip_init();
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@@ -146,7 +146,7 @@ static int k210_irqchip_init(bool cold_boot)
|
||||
return rc;
|
||||
}
|
||||
|
||||
return plic_warm_irqchip_init();
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int k210_ipi_init(void)
|
||||
|
@@ -200,7 +200,7 @@ static int ux600_irqchip_init(bool cold_boot)
|
||||
return rc;
|
||||
}
|
||||
|
||||
return plic_warm_irqchip_init();
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ux600_ipi_init(void)
|
||||
|
@@ -100,7 +100,7 @@ static int platform_irqchip_init(bool cold_boot)
|
||||
return ret;
|
||||
}
|
||||
|
||||
return plic_warm_irqchip_init();
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user