SDRAM Calibration Failed fix for GEN5 SoCFPGA
Subsystems (3)
PATCH v3 1/1 SDRAM Calibration Failed fix for GEN5 SoCFPGA
New SPL introduce cyclic and without initial
the interrupt of SDRAM calibration could fail.
Initialize the default CYCLIC setup fix it.
--- arch/arm/mach-socfpga/Kconfig | 3 +++ 1 file changed, 3 insertions(+)
arch/arm/mach-socfpga/Kconfig +3 -0
@@ -117,6 +117,9 @@ config TARGET_SOCFPGA_CYCLONE5 config TARGET_SOCFPGA_GEN5 bool + select CMD_CYCLIC + select CYCLIC + select SPL_CYCLIC select SPL_ALTERA_SDRAM imply FPGA_SOCFPGA imply SPL_SIZE_LIMIT_SUBTRACT_GD
Signature · 1 line
2.34.1
Hi Brian,
Quoted 2 lines · Brian Sune
New SPL introduce cyclic and without initial
the interrupt of SDRAM calibration could fail.
Are you even sure SPL_CYCLIC is required? Wouldn't enabling CYCLIC be enough?
Since you have not identified the root issue yet, can you please provide the actual defconfig used before this change so we can figure out what is happening, if other boards are impacted and how to fix it properly so this possible misconfiguration cannot happen anymore?
Quoted 12 lines
Initialize the default CYCLIC setup fix it.
Signed-off-by Brian Sune <[email protected]>--- arch/arm/mach-socfpga/Kconfig | 3 +++ 1 file changed, 3 insertions(+)arch/arm/mach-socfpga/Kconfig +0
-0
arch/arm/mach-socfpga/Kconfig config TARGET_SOCFPGA_CYCLONE5 · line 120
Quoted 4 lines
arch/arm/mach-socfpga/Kconfig +1
-0@@ -117,6 +117,9 @@ config TARGET_SOCFPGA_CYCLONE5 config TARGET_SOCFPGA_GEN5 bool + select CMD_CYCLIC
I don't think you **need** a U-Boot command to be available to unbreak your device?
Cheers,
Quentin
Quoted 2 lines
Are you even sure
SPL_CYCLICis required? Wouldn't enabling CYCLIC be enough?
Short test answer is no. SPL_CYCLIC must be init with default timeout #.
Quoted 4 lines
Since you have not identified the root issue yet, can you please provide the actual defconfig used before this change so we can figure out what is happening, if other boards are impacted and how to fix it properly so this possible misconfiguration cannot happen anymore?
socfpga_cyclone5_defconfig
But my patch did not target ONE config file. Because the risk or possible hazard could happen on other GEN5 socfpga. Need others to report btw. b.c. it requires complete fresh build to trigger possibly.
New patch V4 had pushed. CMD CYCLIC seems like not a must.
Brian
Hi Brian,
Quoted 12 lines · Sune Brian
Quoted 2 lines
Are you even sure
SPL_CYCLICis required? Wouldn't enabling CYCLIC be enough?Short test answer is no.
SPL_CYCLICmust be init with default timeout #.Quoted 4 lines
Since you have not identified the root issue yet, can you please provide the actual defconfig used before this change so we can figure out what is happening, if other boards are impacted and how to fix it properly so this possible misconfiguration cannot happen anymore?
socfpga_cyclone5_defconfig
So, this does NOT enable WDT or WATCHDOG. It does force SPL_WATCHDOG on but that doesn't seem to do anything except if SPL_WDT is also set, in which case it'll then selects SPL_CYCLIC automatically. Can you walk us step by step through how you get this into this broken state?
git clone https://source.denx.de/u-boot/u-boot.git
cd u-boot
git checkout origin/master
make CROSS_COMPILE=arm-linux-gnu- socfpga_cyclone5_defconfig and then...?
Does it happen with the default socfpga_cyclone5_defconfig defconfig?
What do you do next? Do you run "make menuconfig" to enable/disable some options? Which ones?
Quoted 2 lines
But my patch did not target ONE config file. Because the risk or possible hazard could happen on other GEN5 socfpga. Need others to report btw.
Yes, but I only want at least one board this happens on so we can try figure out exactly what happens with this watchdog.
Quoted 2 lines
b.c. it requires complete fresh build to trigger possibly.
What do you mean it requires a complete fresh build?
Cheers,
Quentin
Quoted 2 lines
Yes, but I only want at least one board this happens on so we can try figure out exactly what happens with this watchdog.
I am a bit confused. Sounds like this is affecting the entire U-Boot? Isn't this just a Cyclone V GEN5 socfpga issue?
It is a very generic setup.
clone from fresh
make clean
make mrproper
make socfpga_cyclone5_defconfig
make prepare
Now please cp .config to .config_default
Ok now
make menuconfig
/WDT turn on and save
make menuconfig
turn all those you have enabled
save again.
then gvimdiff .config .config_default
You will see what I meant.
Enjoy~
Brian
Hi Brian,
Quoted 4 lines · Sune Brian
Quoted 2 lines
Yes, but I only want at least one board this happens on so we can try figure out exactly what happens with this watchdog.
I am a bit confused. Sounds like this is affecting the entire U-Boot?
I believe so.
Quoted 2 lines
Isn't this just a Cyclone V GEN5 socfpga issue?
I don't think so.
I think the issue is that CONFIG_WATCHDOG selects CYCLIC but only implies SPL_CYCLIC and CONFIG_SPL_WATCHDOG does nothing wrt SPL_CYLIC. ARCH_SOCFPGA selects SPL_WATCHDOG so it is always enabled, but SPL_CYCLIC may not always be enabled.
Quoted 8 lines
It is a very generic setup.
clone from freshmake clean
make mrproper
makesocfpga_cyclone5_defconfig
make prepare
Quoted 5 lines
Now please cp .config to .config_default
Ok now
make menuconfig
/WDT turn on and save
Only WDT or also SPL_WDT?
Quoted 2 lines
make menuconfig
turn all those you have enabled
Which ones?
Quoted 6 lines
save again.
then gvimdiff .config .config_default
You will see what I meant.
Can you run "make savedefconfig" after your "save again" step and copy the content of the file called "defconfig" that was just generated in a mail? That would really help me, thanks!
Cheers,
Quentin
Quoted 1 line
So, this does NOT enable WDT or WATCHDOG. It does force
SPL_WATCHDOGon
Comment on this.
No this is not the case.
The specific turned on are:
[] Enable U-Boot watchdog reset
[] Designware watchdog timer support
[] Enable driver model for watchdog timer drivers
Save and uncheck those back in order.
Never touch this setting from the beginning.
[] Enable driver model for watchdog timer drivers in SPL
BTW appreciate your interest on this issue and welling to debug. For my case if any issue is fixed by a solution(s) I usually just leave it as such.
Don't really worth it to spend time on s.t. had a tmperal solution. Unless it is really broken to the point that it is unbootable.
Brian