Skip to contentSkip to conversation

armv7: ls102xa: Fix endianness of SCFG_SPARECR8

U-Boot Biwen Li 2 participants 4 messages Sep 16, 2019 – Sep 25, 2019 Arm (32-bit)

lore
Share & tools
lore

Biwen Li

author
#0 lore raw

The patch fixes endianness of SCFG_SPARECR8 register

---
 arch/arm/cpu/armv7/ls102xa/ls102xa_psci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/cpu/armv7/ls102xa/ls102xa_psci.c +1 -1
index bb169aaaf4..00b6ad48ce 100644
@@ -72,7 +72,7 @@ static void __secure ls1_deepsleep_irq_cfg(void)
 	 * returns zero, so its value is saved to a scrachpad register to be
 	 * read, that is why we don't read it from register ippdexpcr1 itself.
 	 */
-	ippdexpcr1 = in_le32(&scfg->sparecr[7]);
+	ippdexpcr1 = in_be32(&scfg->sparecr[7]);
 	out_be32(&rcpm->ippdexpcr1, ippdexpcr1);
 
 	if (ippdexpcr0 & RCPM_IPPDEXPCR0_ETSEC)
Signature · 1 line
2.17.1
author
#1 lore raw

Add priyanka jain for the review.

Quoted 20 lines
---
 arch/arm/cpu/armv7/ls102xa/ls102xa_psci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/cpu/armv7/ls102xa/ls102xa_psci.c +1 -2
index bb169aaaf4..00b6ad48ce 100644
@@ -72,7 +72,7 @@ static void __secure ls1_deepsleep_irq_cfg(void)
 	 * returns zero, so its value is saved to a scrachpad register to be
 	 * read, that is why we don't read it from register ippdexpcr1 itself.
 	 */
-	ippdexpcr1 = in_le32(&scfg->sparecr[7]);
+	ippdexpcr1 = in_be32(&scfg->sparecr[7]);
 	out_be32(&rcpm->ippdexpcr1, ippdexpcr1);
 
 	if (ippdexpcr0 & RCPM_IPPDEXPCR0_ETSEC)
--

2.17.1

#2 lore raw
In reply to Biwen Li
Quoted 9 lines

-----Original Message-----
From: U-Boot <[email protected]> On Behalf Of Biwen Li
Sent: Monday, September 16, 2019 1:31 PM
To: albert.u.boot at aribaud.net; Ran Wang <[email protected]>; York Sun <[email protected]>
Cc: u-boot at lists.denx.de
Subject: [U-Boot] armv7: ls102xa: Fix endianness of SCFG_SPARECR8

Fix endianness means fixing endianness but here you are correcting it May be subject can be updated to something like
"armv7: ls102xa: Update endianness of SCFG_SPARECR8 read"

Quoted 2 lines

The patch fixes endianness of SCFG_SPARECR8 register

Please update description to something like "Correct endianness of SCFG_SPARECR8 register read in_le32 -> in_be32"

--priyankajain

Quoted 32 lines

---
arch/arm/cpu/armv7/ls102xa/ls102xa_psci.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/cpu/armv7/ls102xa/ls102xa_psci.c +1 -2
index bb169aaaf4..00b6ad48ce 100644
@@ -72,7 +72,7 @@ static void __secure ls1_deepsleep_irq_cfg(void)
 	 * returns zero, so its value is saved to a scrachpad register to be
 	 * read, that is why we don't read it from register ippdexpcr1 itself.
 	 */
-	ippdexpcr1 = in_le32(&scfg->sparecr[7]);
+	ippdexpcr1 = in_be32(&scfg->sparecr[7]);
 	out_be32(&rcpm->ippdexpcr1, ippdexpcr1);
 
 	if (ippdexpcr0 & RCPM_IPPDEXPCR0_ETSEC)
--

2.17.1

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.de
nx.de%2Flistinfo%2Fu- boot&amp;data=02%7C01%7Cpriyanka.jain%40nxp.com%7C4a06ae27c20740 32621608d73a802f63%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7 C637042194542343559&amp;sdata=j8WqmS7vao4EZkyG3CMianeO1M%2Fk5 gsFVUpBNQoMgUM%3D&amp;reserved=0

author
#3 lore raw
Quoted 9 lines
Quoted 1 line

Subject: [U-Boot] armv7: ls102xa: Fix endianness of SCFG_SPARECR8

Fix endianness means fixing endianness but here you are correcting it May be subject can be updated to something like
"armv7: ls102xa: Update endianness of SCFG_SPARECR8 read"

Quoted 2 lines

The patch fixes endianness of SCFG_SPARECR8 register

Please update description to something like "Correct endianness of SCFG_SPARECR8 register read
in_le32 -> in_be32"

You are right, I will correct it in v2.

Quoted 38 lines

--priyankajain

Quoted 23 lines

---
arch/arm/cpu/armv7/ls102xa/ls102xa_psci.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/cpu/armv7/ls102xa/ls102xa_psci.c +1 -2
index bb169aaaf4..00b6ad48ce 100644
@@ -72,7 +72,7 @@ static void __secure ls1_deepsleep_irq_cfg(void)
 	 * returns zero, so its value is saved to a scrachpad register to be
 	 * read, that is why we don't read it from register ippdexpcr1 itself.
 	 */
-	ippdexpcr1 = in_le32(&scfg->sparecr[7]);
+	ippdexpcr1 = in_be32(&scfg->sparecr[7]);
 	out_be32(&rcpm->ippdexpcr1, ippdexpcr1);
 
 	if (ippdexpcr0 & RCPM_IPPDEXPCR0_ETSEC)
--

2.17.1

Quoted 7 lines

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists
.de
nx.de%2Flistinfo%2Fu- boot&amp;data=02%7C01%7Cpriyanka.jain%40nxp.com%7C4a06ae27c2074

0

Quoted 1 line

32621608d73a802f63%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0

%7

Quoted 1 line

C637042194542343559&amp;sdata=j8WqmS7vao4EZkyG3CMianeO1M%2F

k5

Quoted 1 line

gsFVUpBNQoMgUM%3D&amp;reserved=0