summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Scott <[email protected]>2023-08-03 18:25:20 +0300
committerStefano Babic <[email protected]>2023-10-16 08:46:01 +0200
commit43b1e83a73dd14cfd58941a77907c028c5b9f26e (patch)
treeae385c6cd0ef75c1fd3ec841a22c323edb13cf59
parent3c3f1626919cd93cbe6c56e3849937de5be18dbb (diff)
imx: syscounter: allow timer_init for SPL build
With enabled SKIP_LOWLEVEL_INIT, the weak function timer_init() is used in the SPL build. For iMX6 SoC, this leads MMC to fail once u-boot proper is booted due to a timing issue. Always use iMX-specific timer_init() in SPL to fix timing issues. Fixes: be277c3a89 ("imx: mx7: avoid some initialization if low level is skipped") Signed-off-by: Michael Scott <[email protected]> Co-developed-by: Oleksandr Suvorov <[email protected]> Signed-off-by: Oleksandr Suvorov <[email protected]> Reviewed-by: Peng Fan <[email protected]>
-rw-r--r--arch/arm/mach-imx/syscounter.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mach-imx/syscounter.c b/arch/arm/mach-imx/syscounter.c
index 129efac6fa6..16df1186759 100644
--- a/arch/arm/mach-imx/syscounter.c
+++ b/arch/arm/mach-imx/syscounter.c
@@ -59,7 +59,7 @@ static inline unsigned long long us_to_tick(unsigned long long usec)
return usec;
}
-#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT)
+#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) || IS_ENABLED(CONFIG_SPL_BUILD)
int timer_init(void)
{
struct sctr_regs *sctr = (struct sctr_regs *)SCTR_BASE_ADDR;