* [PATCH] riscv: andes_plic.c: use modified IPI scheme
@ 2022-10-14 7:00 Yu Chien Peter Lin
[not found] ` <HK0PR03MB299429A156D18438B90B605AC1299@HK0PR03MB2994.apcprd03.prod.outlook.com>
0 siblings, 1 reply; 2+ messages in thread
From: Yu Chien Peter Lin @ 2022-10-14 7:00 UTC (permalink / raw)
To: u-boot; +Cc: ycliang, rick, Yu Chien Peter Lin
The IPI scheme in OpenSBI has been updated to support 8-core AE350
platform, the plicsw configuration needs to be modified accordingly.
Signed-off-by: Yu Chien Peter Lin <peterlin@andestech.com>
---
arch/riscv/lib/andes_plic.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/arch/riscv/lib/andes_plic.c b/arch/riscv/lib/andes_plic.c
index 5e113ee8c9..9fe2568a16 100644
--- a/arch/riscv/lib/andes_plic.c
+++ b/arch/riscv/lib/andes_plic.c
@@ -27,17 +27,18 @@
/* claim register */
#define CLAIM_REG(base, hart) ((ulong)(base) + 0x200004 + (hart) * 0x1000)
-#define ENABLE_HART_IPI (0x80808080)
-#define SEND_IPI_TO_HART(hart) (0x80 >> (hart))
+#define ENABLE_HART_IPI (0x01010101)
+#define SEND_IPI_TO_HART(hart) (0x1 << (hart))
DECLARE_GLOBAL_DATA_PTR;
-static int enable_ipi(int hart)
+int enable_ipi(int hart)
{
unsigned int en;
- en = ENABLE_HART_IPI >> hart;
+ en = ENABLE_HART_IPI << hart;
writel(en, (void __iomem *)ENABLE_REG(gd->arch.plic, hart));
+ writel(en, (void __iomem *)ENABLE_REG(gd->arch.plic + 0x4, hart));
return 0;
}
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] riscv: andes_plic.c: use modified IPI scheme
[not found] ` <HK0PR03MB299429A156D18438B90B605AC1299@HK0PR03MB2994.apcprd03.prod.outlook.com>
@ 2022-10-17 1:32 ` Rick Chen
0 siblings, 0 replies; 2+ messages in thread
From: Rick Chen @ 2022-10-17 1:32 UTC (permalink / raw)
To: peterlin; +Cc: U-Boot Mailing List, rick, Leo Liang
> From: Peter Yu-Chien Lin(林宇謙) <peterlin@andestech.com>
> Sent: Friday, October 14, 2022 3:00 PM
> To: u-boot@lists.denx.de
> Cc: Leo Yu-Chi Liang(梁育齊) <ycliang@andestech.com>; Rick Jian-Zhi Chen(陳建志) <rick@andestech.com>; Peter Yu-Chien Lin(林宇謙) <peterlin@andestech.com>
> Subject: [PATCH] riscv: andes_plic.c: use modified IPI scheme
>
> The IPI scheme in OpenSBI has been updated to support 8-core AE350 platform, the plicsw configuration needs to be modified accordingly.
>
> Signed-off-by: Yu Chien Peter Lin <peterlin@andestech.com>
> ---
> arch/riscv/lib/andes_plic.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
Reviewed-by: Rick Chen <rick@andestech.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-10-17 1:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-14 7:00 [PATCH] riscv: andes_plic.c: use modified IPI scheme Yu Chien Peter Lin
[not found] ` <HK0PR03MB299429A156D18438B90B605AC1299@HK0PR03MB2994.apcprd03.prod.outlook.com>
2022-10-17 1:32 ` Rick Chen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox