imx: syscounter: allow timer_init for SPL build
Subsystems (3)
PATCH v3 1/1 imx: syscounter: allow timer_init for SPL build
From: Michael Scott <[email protected]>
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.
---
Changes in v3:
- add Reviewed-by from https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
Changes in v2:
- rebased on top of a2ac2b964b ("Convert CONFIG_SKIP_LOWLEVEL_INIT et al to Kconfig")
arch/arm/mach-imx/syscounter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-imx/syscounter.c +1 -1
@@ -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 ;
Signature · 1 line
2.40.1
PATCH v3 1/1 imx: syscounter: allow timer_init for SPL build
Quoted 10 lines
From: Michael Scott <[email protected]>
With enabledSKIP_LOWLEVEL_INIT, the weak functiontimer_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-specifictimer_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]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================