mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-25 07:41:42 +01:00
lib: utils/irqchip: Add wrapper for T-HEAD PLIC delegation
The delegation bit is lost along with the rest of the PLIC state when the CPU power domain in the Allwinner D1 is powered down, so the PLIC needs to be re-delegated to S-mode during the hart resume path. Reviewed-by: Anup Patel <anup@brainfault.org> Signed-off-by: Samuel Holland <samuel@sholland.org>
This commit is contained in:

committed by
Anup Patel

parent
69be3dff9d
commit
5e5675874c
@@ -151,6 +151,13 @@ static void thead_plic_plat_init(struct plic_data *pd)
|
||||
writel_relaxed(BIT(0), (char *)pd->addr + THEAD_PLIC_CTRL_REG);
|
||||
}
|
||||
|
||||
void thead_plic_restore(void)
|
||||
{
|
||||
struct plic_data *plic = plic_hartid2data[current_hartid()];
|
||||
|
||||
thead_plic_plat_init(plic);
|
||||
}
|
||||
|
||||
static const struct fdt_match irqchip_plic_match[] = {
|
||||
{ .compatible = "riscv,plic0" },
|
||||
{ .compatible = "sifive,plic-1.0.0" },
|
||||
|
Reference in New Issue
Block a user