mirror of
https://github.com/revyos/thead-opensbi.git
synced 2026-06-21 09:12:28 +02:00
lib: utils: reset: thead: add back "plic-delegate" handling
When backporting commit 78c2b19218bd ("lib: utils/irqchip:
Automatically delegate T-HEAD PLIC access"), we removed the delegate
property handling as upstream does, but it will break sdk linux
kernel which still relies on "plic-delegate" property, add back
it.
This commit is contained in:
@@ -82,6 +82,13 @@ 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