Skip to contentSkip to conversation

ram: k3-ddrss: Handle error properly in lpddr4_start

PATCH In review Udit Kumar 3 participants 3 messages Aug 29, 2024 – Sep 24, 2024

lore
Share & tools
lore

Udit Kumar

author
#0 lore raw

PATCH 1/1 ram: k3-ddrss: Handle error properly in lpddr4_start

In lpddr4_start function error returned by lpddr4_enablepiinitiator may go undetected due to overwrite of return code.
Add support to handle error in above case.

---
 drivers/ram/k3-ddrss/lpddr4.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/ram/k3-ddrss/lpddr4.c +3 -2
index 11ef242a37..9f9abfeca4 100644
@@ -155,10 +155,11 @@ u32 lpddr4_start(const lpddr4_privatedata *pd)
 	u32 result = 0U;
 
 	result = lpddr4_startsf(pd);
-	if (result == (u32)0) {
+	if (result == (u32)0)
 		result = lpddr4_enablepiinitiator(pd);
+	if (result == (u32)0)
 		result = lpddr4_startsequencecontroller(pd);
-	}
+
 	return result;
 }
 
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw

On August 29, 2024 thus sayeth Udit Kumar:

Quoted 6 lines

In lpddr4_start function error returned by lpddr4_enablepiinitiator may go undetected due to overwrite of return code.
Add support to handle error in above case.

One day I'll get around to cleaning this up. starting the controllers isn't all this complicated.

~Bryan

#2 lore raw
In reply to Udit Kumar
Quoted 5 lines · Udit Kumar

In lpddr4_start function error returned by lpddr4_enablepiinitiator may go undetected due to overwrite of return code.
Add support to handle error in above case.

Applied to u-boot/master, thanks!

Signature · 1 line
Tom