]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
freescale: Drop call to init_func_vid() in the init sequence
authorSimon Glass <sjg@chromium.org>
Tue, 22 Aug 2023 03:17:00 +0000 (21:17 -0600)
committerTom Rini <trini@konsulko.com>
Thu, 31 Aug 2023 17:16:55 +0000 (13:16 -0400)
Use the misc_init_f event instead, which is designed for this purpose.

All boards with CONFIG_VID already enable CONFIG_EVENT.

Signed-off-by: Simon Glass <sjg@chromium.org>
arch/arm/cpu/armv8/fsl-layerscape/spl.c
board/freescale/ls1088a/ls1088a.c
board/freescale/lx2160a/lx2160a.c
common/board_f.c
include/init.h

index 61fced451eb5d28a194303f78dc595b49d1381d7..033f48d04b907f518f47543c2a319b0169f41fd6 100644 (file)
@@ -78,6 +78,11 @@ void tzpc_init(void)
 #endif
 }
 
+__weak int init_func_vid(void)
+{
+       return 0;
+}
+
 void board_init_f(ulong dummy)
 {
        int ret;
index 7a1047a77f732c8840ae6e71c8796c02390bc58d..f2b8bec03729b24da521078d9a8376a020f5f117 100644 (file)
@@ -181,13 +181,14 @@ unsigned long long get_qixis_addr(void)
 #endif
 
 #if defined(CONFIG_VID)
-int init_func_vid(void)
+static int setup_core_voltage(void)
 {
        if (adjust_vdd(0) < 0)
                printf("core voltage not adjusted\n");
 
        return 0;
 }
+EVENT_SPY_SIMPLE(EVT_MISC_INIT_F, setup_core_voltage);
 
 u16 soc_get_fuse_vid(int vid_index)
 {
index d631a11ff667dbcccd630dd1c34d66c78c60511f..2883848550af17494ac0cc474e6277b8e1e3f382 100644 (file)
@@ -13,6 +13,7 @@
 #include <i2c.h>
 #include <malloc.h>
 #include <errno.h>
+#include <event.h>
 #include <netdev.h>
 #include <fsl_ddr.h>
 #include <asm/io.h>
@@ -242,6 +243,7 @@ int init_func_vid(void)
        return 0;
 }
 #endif
+EVENT_SPY_SIMPLE(EVT_MISC_INIT_F, init_func_vid);
 
 int checkboard(void)
 {
index 46008bac65959270df11639bb81990a5f2dc5a64..aef395b1354eeb8a1f84b9aafc89e62d56b5ee3e 100644 (file)
@@ -280,13 +280,6 @@ static int init_func_i2c(void)
 }
 #endif
 
-#if defined(CONFIG_VID)
-__weak int init_func_vid(void)
-{
-       return 0;
-}
-#endif
-
 static int setup_mon_len(void)
 {
 #if defined(__ARM__) || defined(__MICROBLAZE__)
@@ -896,9 +889,6 @@ static const init_fnc_t init_sequence_f[] = {
        INIT_FUNC_WATCHDOG_RESET
 #if CONFIG_IS_ENABLED(SYS_I2C_LEGACY)
        init_func_i2c,
-#endif
-#if defined(CONFIG_VID) && !defined(CONFIG_SPL)
-       init_func_vid,
 #endif
        announce_dram_init,
        dram_init,              /* configure available RAM banks */
index 1bf76e4eff7256679ccc14f9f21630e4bf1f0003..13579db7590039c3521b00ba9095ed1aa843ad0b 100644 (file)
@@ -276,9 +276,6 @@ int set_cpu_clk_info(void);
 int update_flash_size(int flash_size);
 int arch_early_init_r(void);
 int misc_init_r(void);
-#if defined(CONFIG_VID)
-int init_func_vid(void);
-#endif
 
 /* common/board_info.c */
 int checkboard(void);