Skip to contentSkip to conversation

platform: andes/ae350: Cosmetic fixes in plicsw.c

PATCH New Bin Meng 2 participants 8 messages Jun 4, 2021 – Jun 11, 2021

lore
Share & tools
lore

Bin Meng

author
#0 lore raw

PATCH v2 1/4 platform: andes/ae350: Cosmetic fixes in plicsw.c

- %s/CLINT/PLICSW
- replace '.' with a space
- add a space around * in plicsw_cold_ipi_init()

---

Changes in v2:
- andex => andes in the commit title
- add a space around *

 platform/andes/ae350/plicsw.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
platform/andes/ae350/plicsw.c +3 -3
index d07df28..4df7317 100644
@@ -83,7 +83,7 @@ void plicsw_ipi_clear(u32 target_hart)
 	if (plicsw_ipi_hart_count <= target_hart)
 		return;
 
-	/* Clear CLINT IPI */
+	/* Clear PLICSW IPI */
 	plicsw_claim();
 	plicsw_complete();
 }
@@ -108,10 +108,10 @@ int plicsw_cold_ipi_init(unsigned long base, u32 hart_count)
 	/* Setup source priority */
 	uint32_t *priority = (void *)base + PLICSW_PRIORITY_BASE;
 
-	for (int i = 0; i < AE350_HART_COUNT*PLICSW_PENDING_PER_HART; i++)
+	for (int i = 0; i < AE350_HART_COUNT * PLICSW_PENDING_PER_HART; i++)
 		writel(1, &priority[i]);
 
-	/* Setup target enable.*/
+	/* Setup target enable */
 	uint32_t enable_mask = PLICSW_HART_MASK;
 
 	for (int i = 0; i < AE350_HART_COUNT; i++) {
Signature · 1 line
2.25.1
author
#1 lore raw

PATCH v2 2/4 docs/platform: andes-ae350: Fix missing spaces

Fix several places in the docmentation that are missing spaces.

---

(no changes since v1)

 docs/platform/andes-ae350.md | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
docs/platform/andes-ae350.md +3 -3
index 46889a1..1cf83cf 100644
@@ -1,9 +1,9 @@
 Andes AE350 SoC Platform
 ========================
 The AE350 AXI/AHB-based platform N25(F)/NX25(F)/D25F/A25/AX25 CPU with level-one
-memories,interrupt controller, debug module, AXI and AHB Bus Matrix Controller,
-AXI-to-AHB Bridge and a collection of fundamentalAHB/APB bus IP components
-pre-integrated together as a system design.The high-quality and configurable
+memories, interrupt controller, debug module, AXI and AHB Bus Matrix Controller,
+AXI-to-AHB Bridge and a collection of fundamental AHB/APB bus IP components
+pre-integrated together as a system design. The high-quality and configurable
 AHB/APB IPs suites a majority embedded systems, and the verified platform serves
 as a starting point to jump start SoC designs.
 
Signature · 1 line
2.25.1
Applied
#2 lore raw

PATCH v2 2/4 docs/platform: andes-ae350: Fix missing spaces

Quoted 9 lines

-----Original Message-----
From: Bin Meng <[email protected]>
Sent: 04 June 2021 21:06
To: Anup Patel <[email protected]>; opensbi at lists.infradead.org
Cc: Bin Meng <[email protected]>
Subject: [PATCH v2 2/4] docs/platform: andes-ae350: Fix missing spaces

Quoted 3 lines

Fix several places in the docmentation that are missing spaces.

Looks good to me.

Applied this patch to the riscv/opensbi repo

Thanks,
Anup

Quoted 28 lines

---

(no changes since v1)

 docs/platform/andes-ae350.md | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
docs/platform/andes-ae350.md +0 -0
index 46889a1..1cf83cf 100644
@@ -1,9 +1,9 @@
 Andes AE350 SoC Platform
 ========================
 The AE350 AXI/AHB-based platform N25(F)/NX25(F)/D25F/A25/AX25 CPU

with level-one -memories,interrupt controller, debug module, AXI and AHB Bus Matrix Controller, -AXI-to-AHB Bridge and a collection of fundamentalAHB/APB bus IP components -pre-integrated together as a system design.The high-quality and configurable

docs/platform/andes-ae350.md +4 -0
+memories, interrupt controller, debug module, AXI and AHB Bus Matrix
+Controller, AXI-to-AHB Bridge and a collection of fundamental AHB/APB
+bus IP components pre-integrated together as a system design. The
+high-quality and configurable
 AHB/APB IPs suites a majority embedded systems, and the verified platform

serves as a starting point to jump start SoC designs.

--
2.25.1

author
#3 lore raw

PATCH v2 3/4 platform: andes/ae350: Drop plicsw_get_pending()

In reply to Bin Meng

This is not used anywhere. Drop it.

---

Changes in v2:
- new patch: Drop plicsw_get_pending()

 platform/andes/ae350/plicsw.c | 6 ------
 1 file changed, 6 deletions(-)
platform/andes/ae350/plicsw.c +0 -6
index 4df7317..edbbb11 100644
@@ -33,12 +33,6 @@ static inline void plicsw_complete(void)
 	writel(source, plicsw_dev[source_hart].plicsw_claim);
 }
 
-static inline u32 plicsw_get_pending(u32 source_hart, u32 target_hart)
-{
-	return readl(plicsw_dev[source_hart].plicsw_pending)
-	       & (PLICSW_HART_MASK >> target_hart);
-}
-
 static inline void plic_sw_pending(u32 target_hart)
 {
 	/*
Signature · 1 line
2.25.1
Applied
#4 lore raw

PATCH v2 3/4 platform: andes/ae350: Drop plicsw_get_pending()

Quoted 9 lines

-----Original Message-----
From: Bin Meng <[email protected]>
Sent: 04 June 2021 21:06
To: Anup Patel <[email protected]>; opensbi at lists.infradead.org
Cc: Bin Meng <[email protected]>
Subject: [PATCH v2 3/4] platform: andes/ae350: Drop plicsw_get_pending()

Quoted 4 lines

This is not used anywhere. Drop it.

Looks good to me.

Applied this patch to the riscv/opensbi repo

Thanks,
Anup

Quoted 25 lines

---

Changes in v2:
- new patch: Drop plicsw_get_pending()

 platform/andes/ae350/plicsw.c | 6 ------
 1 file changed, 6 deletions(-)
platform/andes/ae350/plicsw.c +0 -6
index 4df7317..edbbb11 100644
@@ -33,12 +33,6 @@ static inline void plicsw_complete(void)
 	writel(source, plicsw_dev[source_hart].plicsw_claim);
 }
 
-static inline u32 plicsw_get_pending(u32 source_hart, u32 target_hart) -{
-	return readl(plicsw_dev[source_hart].plicsw_pending)
-	       & (PLICSW_HART_MASK >> target_hart);
-}
-
 static inline void plic_sw_pending(u32 target_hart)  {
 	/*
--

2.25.1

author
#5 lore raw

PATCH v2 4/4 platform: andes/ae350: Drop plicsw_ipi_sync()

In reply to Bin Meng

plicsw_ipi_sync() is a forward declaration but without the actual implementation. Drop it.

---

Changes in v2:
- new patch: Drop plicsw_ipi_sync()

 platform/andes/ae350/plicsw.h | 2 --
 1 file changed, 2 deletions(-)
platform/andes/ae350/plicsw.h +0 -2
index 8be6194..58728f6 100644
@@ -35,8 +35,6 @@ struct plicsw {
 
 void plicsw_ipi_send(u32 target_hart);
 
-void plicsw_ipi_sync(u32 target_hart);
-
 void plicsw_ipi_clear(u32 target_hart);
 
 int plicsw_warm_ipi_init(void);
Signature · 1 line
2.25.1
Applied
#6 lore raw

PATCH v2 4/4 platform: andes/ae350: Drop plicsw_ipi_sync()

Quoted 9 lines

-----Original Message-----
From: Bin Meng <[email protected]>
Sent: 04 June 2021 21:06
To: Anup Patel <[email protected]>; opensbi at lists.infradead.org
Cc: Bin Meng <[email protected]>
Subject: [PATCH v2 4/4] platform: andes/ae350: Drop plicsw_ipi_sync()

Quoted 5 lines

plicsw_ipi_sync() is a forward declaration but without the actual implementation. Drop it.

Looks good to me.

Applied this patch to the riscv/opensbi repo

Thanks,
Anup

Quoted 23 lines

---

Changes in v2:
- new patch: Drop plicsw_ipi_sync()

 platform/andes/ae350/plicsw.h | 2 --
 1 file changed, 2 deletions(-)
platform/andes/ae350/plicsw.h +0 -3
index 8be6194..58728f6 100644
@@ -35,8 +35,6 @@ struct plicsw {
 
 void plicsw_ipi_send(u32 target_hart);
 
-void plicsw_ipi_sync(u32 target_hart);
-
 void plicsw_ipi_clear(u32 target_hart);
 
 int plicsw_warm_ipi_init(void);
--

2.25.1

Applied
#7 lore raw

PATCH v2 1/4 platform: andes/ae350: Cosmetic fixes in plicsw.c

In reply to Bin Meng
Quoted 9 lines

-----Original Message-----
From: Bin Meng <[email protected]>
Sent: 04 June 2021 21:06
To: Anup Patel <[email protected]>; opensbi at lists.infradead.org
Cc: Bin Meng <[email protected]>
Subject: [PATCH v2 1/4] platform: andes/ae350: Cosmetic fixes in plicsw.c

Quoted 5 lines

- %s/CLINT/PLICSW
- replace '.' with a space
- add a space around * in plicsw_cold_ipi_init()

Looks good to me.

Applied this patch to the riscv/opensbi repo

Thanks,
Anup

Quoted 41 lines

---

Changes in v2:
- andex => andes in the commit title
- add a space around *

 platform/andes/ae350/plicsw.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
platform/andes/ae350/plicsw.c +3 -3
index d07df28..4df7317 100644
@@ -83,7 +83,7 @@ void plicsw_ipi_clear(u32 target_hart)
 	if (plicsw_ipi_hart_count <= target_hart)
 		return;
 
-	/* Clear CLINT IPI */
+	/* Clear PLICSW IPI */
 	plicsw_claim();
 	plicsw_complete();
 }
@@ -108,10 +108,10 @@ int plicsw_cold_ipi_init(unsigned long base, u32
 hart_count)
 	/* Setup source priority */
 	uint32_t *priority = (void *)base + PLICSW_PRIORITY_BASE;
 
-	for (int i = 0; i < AE350_HART_COUNT*PLICSW_PENDING_PER_HART;
 i++)
+	for (int i = 0; i < AE350_HART_COUNT *
 PLICSW_PENDING_PER_HART; i++)
 		writel(1, &priority[i]);
 
-	/* Setup target enable.*/
+	/* Setup target enable */
platform/andes/ae350/plicsw.c +0 -1
 	uint32_t enable_mask = PLICSW_HART_MASK;
 
 	for (int i = 0; i < AE350_HART_COUNT; i++) {
--

2.25.1