mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-05-05 12:46:14 +02:00
riscv: aclint_ipi: Support T-Head C900 CLINT
Although timer component of the CLINT isn't fully compatible with the generic RISC-V ACLINT, the IPI component behaves the same. As the CLINT doesn't have corresponding riscv_aclint_timer driver available, let's try looking for a compatible SYSCON device directly when no riscv_aclint_timer device could be found on IPI initialization. Signed-off-by: Yao Zi <ziyao@disroot.org> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
This commit is contained in:
parent
c405bab766
commit
4153ceb0fe
@ -29,6 +29,10 @@ int riscv_init_ipi(void)
|
||||
|
||||
ret = uclass_get_device_by_driver(UCLASS_TIMER,
|
||||
DM_DRIVER_GET(riscv_aclint_timer), &dev);
|
||||
if (ret == -ENODEV)
|
||||
ret = uclass_get_device_by_driver(UCLASS_SYSCON,
|
||||
DM_DRIVER_GET(riscv_aclint_swi), &dev);
|
||||
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
@ -66,6 +70,7 @@ int riscv_get_ipi(int hart, int *pending)
|
||||
|
||||
static const struct udevice_id riscv_aclint_swi_ids[] = {
|
||||
{ .compatible = "riscv,aclint-mswi", .data = RISCV_SYSCON_ACLINT },
|
||||
{ .compatible = "thead,c900-clint", .data = RISCV_SYSCON_ACLINT },
|
||||
{ }
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user