]> git.sur5r.net Git - u-boot/commitdiff
common: board_f: vid: Add VID specific API to adjust core voltage
authorRajesh Bhagat <rajesh.bhagat@nxp.com>
Wed, 17 Jan 2018 10:43:08 +0000 (16:13 +0530)
committerYork Sun <york.sun@nxp.com>
Tue, 23 Jan 2018 19:20:46 +0000 (11:20 -0800)
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>
arch/arm/cpu/armv8/fsl-layerscape/spl.c
board/freescale/common/Makefile
common/board_f.c
include/common.h

index 1c694e7c67dbc20daada5ca80dd2c7653f088d80..4093d15e56983d864564ed7000526b4db8a8fe86 100644 (file)
@@ -84,6 +84,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
index e13cb2063ce047c30fea44eaa202615522626410..939e9c66a564e3ecf557762c47af55d7b1d5ccee 100644 (file)
@@ -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
index 0bdce64ca583731c3ede6dc6c45ee75ebab4e0f7..7f594d9eaf9d54634ce1797218659f42a3b4d24c 100644 (file)
@@ -200,6 +200,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)
 {
@@ -801,6 +808,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
index 436200044f3272be4ed1a19f5575d2a4cb8270f7..0fe9439a933c7d22b0340345c74e1cf4a8b8f52c 100644 (file)
@@ -364,6 +364,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);