aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/ddr/imx/phy/helper.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/ddr/imx/phy/helper.c b/drivers/ddr/imx/phy/helper.c
index 855a874..b9b2403 100644
--- a/drivers/ddr/imx/phy/helper.c
+++ b/drivers/ddr/imx/phy/helper.c
@@ -49,6 +49,13 @@ void ddr_load_train_firmware(enum fw_type type)
unsigned long imem_start = (unsigned long)_end + fw_offset;
unsigned long dmem_start;
unsigned long imem_len = IMEM_LEN, dmem_len = DMEM_LEN;
+ static enum fw_type last_type = -1;
+
+ /* If FW doesn't change, we can save the loading. */
+ if (last_type == type)
+ return;
+
+ last_type = type;
#ifdef CONFIG_SPL_OF_CONTROL
if (gd->fdt_blob && !fdt_check_header(gd->fdt_blob)) {