mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-09 03:21:51 +00:00
ddr: imx8m: Return error values from LPDDR4 training
In cases when the same SPL should run on boards with i.MX8MM, that differ in DDR configuration, it is necessary to try different parameters and check if the training done by the firmware suceeds or not. Therefore we return the DDR training/initialization success to the upper layer in order to be able to retry with different settings if necessary. Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
This commit is contained in:
parent
162c72c804
commit
83083febf5
4 changed files with 23 additions and 11 deletions
|
@ -84,7 +84,7 @@ static inline void decode_streaming_message(void)
|
|||
debug("\n");
|
||||
}
|
||||
|
||||
void wait_ddrphy_training_complete(void)
|
||||
int wait_ddrphy_training_complete(void)
|
||||
{
|
||||
unsigned int mail;
|
||||
|
||||
|
@ -95,10 +95,10 @@ void wait_ddrphy_training_complete(void)
|
|||
decode_streaming_message();
|
||||
} else if (mail == 0x07) {
|
||||
debug("Training PASS\n");
|
||||
break;
|
||||
return 0;
|
||||
} else if (mail == 0xff) {
|
||||
printf("Training FAILED\n");
|
||||
break;
|
||||
debug("Training FAILED\n");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue