[PATCH V5 11/17] arm: mach-k3: am625_init: Convert rtc_erratumi2327_init to static

Mattijs Korpershoek mkorpershoek at baylibre.com
Thu Aug 24 10:36:18 CEST 2023


On mer., août 23, 2023 at 22:10, Nishanth Menon <nm at ti.com> wrote:

> The erratum is called locally, make it static, drop the #ifdeffery since
> it will only be called in R5 build and mark it potentially unused to
> stop compiler screaming at us.
>
> While at this, drop the redundant return for a void function.
>
> Signed-off-by: Nishanth Menon <nm at ti.com>

Reviewed-by: Mattijs Korpershoek <mkorpershoek at baylibre.com>

> ---
> new patch (cleanup before modifying for adding UDA-FS)
>
>  arch/arm/mach-k3/am625_init.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/arch/arm/mach-k3/am625_init.c b/arch/arm/mach-k3/am625_init.c
> index 165bca6885ef..499cb57267b9 100644
> --- a/arch/arm/mach-k3/am625_init.c
> +++ b/arch/arm/mach-k3/am625_init.c
> @@ -80,8 +80,6 @@ static __maybe_unused void enable_mcu_esm_reset(void)
>  	writel(stat, CTRLMMR_MCU_RST_CTRL);
>  }
>  
> -#if defined(CONFIG_CPU_V7R)
> -
>  /*
>   * RTC Erratum i2327 Workaround for Silicon Revision 1
>   *
> @@ -94,7 +92,7 @@ static __maybe_unused void enable_mcu_esm_reset(void)
>   *
>   * https://www.ti.com/lit/er/sprz487c/sprz487c.pdf
>   */
> -void rtc_erratumi2327_init(void)
> +static __maybe_unused void rtc_erratumi2327_init(void)
>  {
>  	u32 counter;
>  
> @@ -112,9 +110,7 @@ void rtc_erratumi2327_init(void)
>  	 */
>  	writel(K3RTC_KICK0_UNLOCK_VALUE, REG_K3RTC_KICK0);
>  	writel(K3RTC_KICK1_UNLOCK_VALUE, REG_K3RTC_KICK1);
> -	return;
>  }
> -#endif
>  
>  void board_init_f(ulong dummy)
>  {
> -- 
> 2.40.0


More information about the U-Boot mailing list