* [PATCH v3] imx: syscounter: allow timer_init for SPL build
@ 2023-08-03 15:25 Oleksandr Suvorov
2023-10-16 9:22 ` sbabic
0 siblings, 1 reply; 2+ messages in thread
From: Oleksandr Suvorov @ 2023-08-03 15:25 UTC (permalink / raw)
To: u-boot
Cc: Peng Fan, Michael Scott, Oleksandr Suvorov, Bryan O'Donoghue,
Fabio Estevam, NXP i.MX U-Boot Team, Rui Miguel Silva,
Stefano Babic
From: Michael Scott <mike@foundries.io>
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 <mike@foundries.io>
Co-developed-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io>
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
---
Changes in v3:
- add Reviewed-by from https://patchwork.ozlabs.org/project/uboot/patch/20210925151812.58480-1-oleksandr.suvorov@foundries.io/
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(-)
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;
--
2.40.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH v3] imx: syscounter: allow timer_init for SPL build
2023-08-03 15:25 [PATCH v3] imx: syscounter: allow timer_init for SPL build Oleksandr Suvorov
@ 2023-10-16 9:22 ` sbabic
0 siblings, 0 replies; 2+ messages in thread
From: sbabic @ 2023-10-16 9:22 UTC (permalink / raw)
To: Oleksandr Suvorov, u-boot
> From: Michael Scott <mike@foundries.io>
> 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 <mike@foundries.io>
> Co-developed-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io>
> Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io>
> Reviewed-by: Peng Fan <peng.fan@nxp.com>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
--
=====================================================================
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: sbabic@denx.de
=====================================================================
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-10-16 9:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-03 15:25 [PATCH v3] imx: syscounter: allow timer_init for SPL build Oleksandr Suvorov
2023-10-16 9:22 ` sbabic
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox