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>
#endif
}
+__weak int init_func_vid(void)
+{
+ return 0;
+}
+
void board_init_f(ulong dummy)
{
int ret;
#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)
{
#include <i2c.h>
#include <malloc.h>
#include <errno.h>
+#include <event.h>
#include <netdev.h>
#include <fsl_ddr.h>
#include <asm/io.h>
return 0;
}
#endif
+EVENT_SPY_SIMPLE(EVT_MISC_INIT_F, init_func_vid);
int checkboard(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__)
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 */
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);