Commit Graph

8 Commits

Author SHA1 Message Date
Jisheng Zhang
d16b0e0a00 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.
2023-09-26 21:55:29 +08:00
Jisheng Zhang
58bc661d74 lib: utils/timer: add T-HEAD C9xx plic support
For upstream linux kernel usage
2023-09-26 21:55:29 +08:00
Icenowy Zheng
2a01b611c9 lib: utils/ipi: add T-Head C9xx CLINT compatible
backport commit a8ee82cd8c008f09c91b5c307de4c9b37660ff71 upstream

Althoug the MTIMER part of a C9xx CLINT differs from a SiFive one, the
MSWI part is compliant.

Add T-Head C9xx CLINT compatible string to fdt_ipi_mswi code, sharing
the same codepath with SiFive CLINT.

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Reviewed-by: Anup Patel <anup@brainfault.org>
2023-09-26 21:55:29 +08:00
Samuel Holland
400de74755 lib: utils/irqchip: Automatically delegate T-HEAD PLIC access
commit 78c2b19218bd62653b9fb31623a42ced45f38ea6 upstream

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>
2023-09-26 21:55:29 +08:00
Heinrich Schuchardt
ab383936e1 lib: utils: missing initialization in thead_reset_init
commit 360ab88569201f8d282cf98546b86b8576b6f2ad upstream

If property csr-copy does not exist, fdt_getprop() will return NULL and cnt
will have a random value from the stack.

Call clone_csrs() only if cnt is initialized to a non-zero value.

Fixes: 49e422c5ad7a ("lib: utils: reset: Add T-HEAD sample platform reset driver")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Anup Patel <anup.patel@wdc.com>
2023-09-26 21:55:29 +08:00
Robert Nelson
44fe1cd431 fdt_serial_uart8250.c: add .compatible = "snps,dw-apb-uart", from Drew and Fu Wei
Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
2023-08-01 23:56:19 +08:00
Han Gao
574b950215 fix: maybe-uninitialized resovled
Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
2023-07-24 06:12:36 +08:00
thead_admin
c0919a898e Linux_SDK_V0.9.5 2022-09-13 11:10:36 +08:00