board: bsh: imx6ulz_smm_m2: Add delay between DRAM read access
authorMichael Bode <michael.bode@bshg.com>
Wed, 21 May 2025 09:47:32 +0000 (11:47 +0200)
committerFabio Estevam <festevam@gmail.com>
Wed, 21 May 2025 10:53:13 +0000 (07:53 -0300)
A small delay between DRAM read access with wrong parameters and
reconfiguration is necessary.
Without a delay between DRAM read access and a following reconfiguration
this reconfiguration fails for certain DRAM chips (Nanya).

Signed-off-by: Michael Bode <michael.bode@bshg.com>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
board/bsh/imx6ulz_smm_m2/spl.c

index e8255b6..c330e4d 100644 (file)
@@ -13,6 +13,7 @@
 #include <asm/gpio.h>
 #include <asm/mach-imx/iomux-v3.h>
 #include <asm/mach-imx/boot_mode.h>
+#include <linux/delay.h>
 #include <linux/libfdt.h>
 #include <spl.h>
 #include <asm/arch/mx6-ddr.h>
@@ -65,10 +66,12 @@ static void spl_dram_init(void)
                /* Already configured, nothing to do */
                break;
        case SZ_256M:
+               udelay(1);
                ddr_cfg_write(&bsh_dram_timing_256mb);
                break;
        case SZ_128M:
        default:
+               udelay(1);
                ddr_cfg_write(&bsh_dram_timing_128mb);
                break;
        }