forked from Mirrors/opensbi
lib: utils/irqchip: Automatically delegate T-HEAD PLIC access
The T-HEAD PLIC implementation requires setting a delegation bit to allow access from S-mode. Now that the T-HEAD PLIC has its own compatible string, set this bit automatically from the PLIC driver, instead of reaching into the PLIC's MMIO space from another driver. Signed-off-by: Samuel Holland <samuel@sholland.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Anup Patel <anup.patel@wdc.com>
This commit is contained in:

committed by
Anup Patel

parent
422eda499c
commit
78c2b19218
@@ -82,14 +82,6 @@ static int thead_reset_init(void *fdt, int nodeoff,
|
||||
clone_csrs(cnt);
|
||||
}
|
||||
|
||||
|
||||
/* Delegate plic enable regs for S-mode */
|
||||
val = fdt_getprop(fdt, nodeoff, "plic-delegate", &len);
|
||||
if (len > 0 && val) {
|
||||
p = (void *)(ulong)fdt64_to_cpu(*val);
|
||||
writel(BIT(0), p);
|
||||
}
|
||||
|
||||
/* Old reset method for secondary harts */
|
||||
if (fdt_getprop(fdt, nodeoff, "using-csr-reset", &len)) {
|
||||
csr_write(0x7c7, (ulong)&__thead_pre_start_warm);
|
||||
|
Reference in New Issue
Block a user