* [PATCH] imx: syscounter: allow timer_init for SPL build
@ 2021-09-25 15:18 Oleksandr Suvorov
2021-09-26 9:50 ` Peng Fan (OSS)
0 siblings, 1 reply; 2+ messages in thread
From: Oleksandr Suvorov @ 2021-09-25 15:18 UTC (permalink / raw)
To: u-boot
Cc: Michael Scott, Oleksandr Suvorov, Bryan O'Donoghue,
Fabio Estevam, NXP i.MX U-Boot Team, Peng Fan, Rui Miguel Silva,
Stefano Babic
From: Michael Scott <mike@foundries.io>
If we enable SPL and SKIP_LOWLEVEL_INIT, this results in the weak
function timer_init() being used in the SPL build. This is not
desirable as on iMX6 SoC, MMC will then fail once u-boot proper is
booted due to timing issue.
Fixes: be277c3a89 ("imx: mx7: avoid some initialization if low level is skipped")
Signed-off-by: Michael Scott <mike@foundries.io>
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io>
---
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 6dfed365d2..e69a168a95 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;
}
-#ifndef CONFIG_SKIP_LOWLEVEL_INIT
+#if !defined(CONFIG_SKIP_LOWLEVEL_INIT) || defined(CONFIG_SPL_BUILD)
int timer_init(void)
{
struct sctr_regs *sctr = (struct sctr_regs *)SCTR_BASE_ADDR;
--
2.31.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] imx: syscounter: allow timer_init for SPL build
2021-09-25 15:18 [PATCH] imx: syscounter: allow timer_init for SPL build Oleksandr Suvorov
@ 2021-09-26 9:50 ` Peng Fan (OSS)
0 siblings, 0 replies; 2+ messages in thread
From: Peng Fan (OSS) @ 2021-09-26 9:50 UTC (permalink / raw)
To: Oleksandr Suvorov, u-boot
Cc: Michael Scott, Bryan O'Donoghue, Fabio Estevam, dl-uboot-imx,
Peng Fan, Rui Miguel Silva, Stefano Babic
On 2021/9/25 23:18, Oleksandr Suvorov wrote:
> From: Michael Scott <mike@foundries.io>
>
> If we enable SPL and SKIP_LOWLEVEL_INIT, this results in the weak
> function timer_init() being used in the SPL build. This is not
> desirable as on iMX6 SoC, MMC will then fail once u-boot proper is
> booted due to timing issue.
>
> Fixes: be277c3a89 ("imx: mx7: avoid some initialization if low level is skipped")
> Signed-off-by: Michael Scott <mike@foundries.io>
> Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io>
> ---
>
> 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 6dfed365d2..e69a168a95 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;
> }
>
> -#ifndef CONFIG_SKIP_LOWLEVEL_INIT
> +#if !defined(CONFIG_SKIP_LOWLEVEL_INIT) || defined(CONFIG_SPL_BUILD)
> int timer_init(void)
> {
> struct sctr_regs *sctr = (struct sctr_regs *)SCTR_BASE_ADDR;
>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-09-26 9:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-25 15:18 [PATCH] imx: syscounter: allow timer_init for SPL build Oleksandr Suvorov
2021-09-26 9:50 ` Peng Fan (OSS)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).