ram: k3-ddrss: Handle error properly in lpddr4_start
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.
Reported-by Andreas Dannenberg <[email protected]>
Signed-off-by Udit Kumar <[email protected]>
--- drivers/ram/k3-ddrss/lpddr4.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/ram/k3-ddrss/lpddr4.c +3 -2
@@ -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
On August 29, 2024 thus sayeth Udit Kumar:
Quoted 6 lines
In
lpddr4_startfunction error returned bylpddr4_enablepiinitiatormay go undetected due to overwrite of return code.
Add support to handle error in above case.Reported-by Andreas Dannenberg <[email protected]>Signed-off-by Udit Kumar <[email protected]>
Reviewed-by Bryan Brattlof <[email protected]>
One day I'll get around to cleaning this up. starting the controllers isn't all this complicated.
~Bryan
Quoted 5 lines · Udit Kumar
In
lpddr4_startfunction error returned bylpddr4_enablepiinitiatormay 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