Commit 1fab98fb90b0350210ac6938cb61647c66dcf0f7

Authored by Rajesh Bhagat
Committed by York Sun
1 parent 75ad48153f

common: board_f: vid: Add VID specific API to adjust core voltage

Adds a VID specific API in init_sequence_f and spl code flow
namely init_func_vid which is required to adjust core voltage.

VID specific code is required in spl, hence moving flag CONFIG_VID
out of spl flags.

Signed-off-by: Ashish Kumar <Ashish.Kumar@nxp.com>
Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>

Showing 4 changed files with 17 additions and 1 deletions Side-by-side Diff

arch/arm/cpu/armv8/fsl-layerscape/spl.c
... ... @@ -85,6 +85,9 @@
85 85 #ifdef CONFIG_SPL_I2C_SUPPORT
86 86 i2c_init_all();
87 87 #endif
  88 +#ifdef CONFIG_VID
  89 + init_func_vid();
  90 +#endif
88 91 dram_init();
89 92 #ifdef CONFIG_SPL_FSL_LS_PPA
90 93 #ifndef CONFIG_SYS_MEM_RESERVE_SECURE
board/freescale/common/Makefile
... ... @@ -23,8 +23,8 @@
23 23 obj-$(CONFIG_FSL_PIXIS) += pixis.o
24 24 ifndef CONFIG_SPL_BUILD
25 25 obj-$(CONFIG_FSL_NGPIXIS) += ngpixis.o
26   -obj-$(CONFIG_VID) += vid.o
27 26 endif
  27 +obj-$(CONFIG_VID) += vid.o
28 28 obj-$(CONFIG_FSL_QIXIS) += qixis.o
29 29 obj-$(CONFIG_PQ_MDS_PIB) += pq-mds-pib.o
30 30 ifndef CONFIG_SPL_BUILD
... ... @@ -200,6 +200,13 @@
200 200 }
201 201 #endif
202 202  
  203 +#if defined(CONFIG_VID)
  204 +__weak int init_func_vid(void)
  205 +{
  206 + return 0;
  207 +}
  208 +#endif
  209 +
203 210 #if defined(CONFIG_HARD_SPI)
204 211 static int init_func_spi(void)
205 212 {
... ... @@ -800,6 +807,9 @@
800 807 INIT_FUNC_WATCHDOG_RESET
801 808 #if defined(CONFIG_SYS_I2C)
802 809 init_func_i2c,
  810 +#endif
  811 +#if defined(CONFIG_VID) && !defined(CONFIG_SPL)
  812 + init_func_vid,
803 813 #endif
804 814 #if defined(CONFIG_HARD_SPI)
805 815 init_func_spi,
... ... @@ -364,6 +364,9 @@
364 364  
365 365 int misc_init_f (void);
366 366 int misc_init_r (void);
  367 +#if defined(CONFIG_VID)
  368 +int init_func_vid(void);
  369 +#endif
367 370  
368 371 /* common/exports.c */
369 372 void jumptable_init(void);