ARM Sunxi Platform Development
 help / color / mirror / Atom feed
* [PATCH 0/3] sunxi: FEL boot fixes
@ 2022-07-13 15:27 Andre Przywara
  2022-07-13 15:27 ` [PATCH 1/3] sunxi: armv8: fel: load only 32-bit values Andre Przywara
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Andre Przywara @ 2022-07-13 15:27 UTC (permalink / raw)
  To: Jagan Teki; +Cc: Samuel Holland, Jernej Skrabec, linux-sunxi, u-boot

While investigating a FEL boot failure on the OrangePi Zero 2 board
(with an H616 SoC), I stared at our FEL code and found some issues,
which this series fixes.

Unfortunately those didn't fix the H616 problem, but they are worth
having anyway.

For the records on the FEL failure: with certain H616 DRAM parameters,
newer GCCs (starting with GCC 11, GCC 10 is fine) generate an SPL binary
that doesn't properly return to the BootROM after the SPL code has
finished. This does not occur on other H616 boards using different DRAM
parameters. Staring at the disassemblies from the different compiler
versions for a while didn't show anything obvious, the best theory so
far is that it's due to a subtle timing issue in the DRAM initialisation
code. Inserting a "udelay(0);" at the beginning of
mctl_phy_read_calibration() seems to avoid the problem, but is obviously
not a proper fix. I will keep looking.

However the issues addressed in this series should be fixed, regardless.

Cheers,
Andre

Andre Przywara (3):
  sunxi: armv8: fel: load only 32-bit values
  sunxi: h616: lower SPL stack address to avoid BROM data
  sunxi: fel: drop redundant "control register" save/restore

 arch/arm/cpu/armv7/sunxi/fel_utils.S | 4 ----
 arch/arm/cpu/armv8/fel_utils.S       | 8 ++++----
 arch/arm/mach-sunxi/board.c          | 1 -
 include/configs/sunxi-common.h       | 2 +-
 4 files changed, 5 insertions(+), 10 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-01-08 20:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-13 15:27 [PATCH 0/3] sunxi: FEL boot fixes Andre Przywara
2022-07-13 15:27 ` [PATCH 1/3] sunxi: armv8: fel: load only 32-bit values Andre Przywara
2023-01-08 20:39   ` Samuel Holland
2022-07-13 15:27 ` [PATCH 2/3] sunxi: h616: lower SPL stack address to avoid BROM data Andre Przywara
2023-01-08 20:49   ` Samuel Holland
2022-07-13 15:27 ` [PATCH 3/3] sunxi: fel: drop redundant "control register" save/restore Andre Przywara
2023-01-08 20:40   ` Samuel Holland

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox