Message ID | 1512023457-20571-10-git-send-email-rajesh.bhagat@nxp.com |
---|---|
State | Superseded |
Delegated to: | York Sun |
Headers | show |
Series | Add VID support for QDS and RDB platforms | expand |
On 11/29/2017 10:31 PM, Rajesh Bhagat wrote: > 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> > --- > arch/arm/cpu/armv8/fsl-layerscape/spl.c | 3 +++ > board/freescale/common/Makefile | 2 +- > common/board_f.c | 10 ++++++++++ > include/common.h | 3 +++ > 4 files changed, 17 insertions(+), 1 deletion(-) > Did you gather the information about size increase for SPL image? I am concerned how much it creases. York
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/spl.c b/arch/arm/cpu/armv8/fsl-layerscape/spl.c index 1c694e7..4093d15 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/spl.c +++ b/arch/arm/cpu/armv8/fsl-layerscape/spl.c @@ -85,6 +85,9 @@ void board_init_f(ulong dummy) #ifdef CONFIG_SPL_I2C_SUPPORT i2c_init_all(); #endif +#ifdef CONFIG_VID + init_func_vid(); +#endif dram_init(); #ifdef CONFIG_SPL_FSL_LS_PPA #ifndef CONFIG_SYS_MEM_RESERVE_SECURE diff --git a/board/freescale/common/Makefile b/board/freescale/common/Makefile index 1c53fb6..afacc90 100644 --- a/board/freescale/common/Makefile +++ b/board/freescale/common/Makefile @@ -23,8 +23,8 @@ obj-$(CONFIG_FMAN_ENET) += fman.o obj-$(CONFIG_FSL_PIXIS) += pixis.o ifndef CONFIG_SPL_BUILD obj-$(CONFIG_FSL_NGPIXIS) += ngpixis.o -obj-$(CONFIG_VID) += vid.o endif +obj-$(CONFIG_VID) += vid.o obj-$(CONFIG_FSL_QIXIS) += qixis.o obj-$(CONFIG_PQ_MDS_PIB) += pq-mds-pib.o ifndef CONFIG_SPL_BUILD diff --git a/common/board_f.c b/common/board_f.c index 9220815..c62e778 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -201,6 +201,13 @@ static int init_func_i2c(void) } #endif +#if defined(CONFIG_VID) +__weak int init_func_vid(void) +{ + return 0; +} +#endif + #if defined(CONFIG_HARD_SPI) static int init_func_spi(void) { @@ -815,6 +822,9 @@ static const init_fnc_t init_sequence_f[] = { #if defined(CONFIG_SYS_I2C) init_func_i2c, #endif +#if defined(CONFIG_VID) && !defined(CONFIG_SPL) + init_func_vid, +#endif #if defined(CONFIG_HARD_SPI) init_func_spi, #endif diff --git a/include/common.h b/include/common.h index e14e1da..8df7e6d 100644 --- a/include/common.h +++ b/include/common.h @@ -407,6 +407,9 @@ int embedded_dtb_select(void); int misc_init_f (void); int misc_init_r (void); +#if defined(CONFIG_VID) +int init_func_vid (void); +#endif /* common/exports.c */ void jumptable_init(void);