board: ge: store version information in fdt
authorIan Ray <ian.ray@ge.com>
Thu, 31 Jan 2019 14:21:18 +0000 (16:21 +0200)
committerStefano Babic <sbabic@denx.de>
Sat, 13 Apr 2019 18:30:08 +0000 (20:30 +0200)
Add board-specific FDT function to store U-Boot version in device tree.

Signed-off-by: Ian Ray <ian.ray@ge.com>
board/ge/bx50v3/bx50v3.c
board/ge/mx53ppd/mx53ppd.c
configs/ge_bx50v3_defconfig
configs/mx53ppd_defconfig

index b69b9e727ba1d4ddcbcfd3c5cdcac43b846e5d0e..f42d2ceb79dc2c299ee95753fde5872b93421c19 100644 (file)
@@ -10,6 +10,7 @@
 #include <asm/arch/iomux.h>
 #include <asm/arch/mx6-pins.h>
 #include <linux/errno.h>
+#include <linux/libfdt.h>
 #include <asm/gpio.h>
 #include <asm/mach-imx/mxc_i2c.h>
 #include <asm/mach-imx/iomux-v3.h>
@@ -27,6 +28,7 @@
 #include <i2c.h>
 #include <input.h>
 #include <pwm.h>
+#include <version.h>
 #include <stdlib.h>
 #include "../common/ge_common.h"
 #include "../common/vpd_reader.h"
@@ -689,6 +691,15 @@ int checkboard(void)
        return 0;
 }
 
+#ifdef CONFIG_OF_BOARD_SETUP
+int ft_board_setup(void *blob, bd_t *bd)
+{
+       fdt_setprop(blob, 0, "ge,boot-ver", version_string,
+                                           strlen(version_string) + 1);
+       return 0;
+}
+#endif
+
 static int do_backlight_enable(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
 #ifdef CONFIG_VIDEO_IPUV3
index 9e13a2475558bd99e8f4b8936cbbeb9a2ab50cda..5411e422acd9b53e5d7cb3d3ab4af593a4e20958 100644 (file)
@@ -17,6 +17,7 @@
 #include <asm/arch/iomux-mx53.h>
 #include <asm/arch/clock.h>
 #include <linux/errno.h>
+#include <linux/libfdt.h>
 #include <asm/mach-imx/mxc_i2c.h>
 #include <asm/mach-imx/mx5_video.h>
 #include <environment.h>
@@ -30,6 +31,7 @@
 #include <fsl_pmic.h>
 #include <linux/fb.h>
 #include <ipu_pixfmt.h>
+#include <version.h>
 #include <watchdog.h>
 #include "ppd_gpio.h"
 #include <stdlib.h>
@@ -307,3 +309,12 @@ int checkboard(void)
 
        return 0;
 }
+
+#ifdef CONFIG_OF_BOARD_SETUP
+int ft_board_setup(void *blob, bd_t *bd)
+{
+       fdt_setprop(blob, 0, "ge,boot-ver", version_string,
+                                           strlen(version_string) + 1);
+       return 0;
+}
+#endif
index 14114acbcefaaad9a0edf02c4dcedf25101eae71..354c61fd6b5668b83bd03a033f192db7c9b4ca73 100644 (file)
@@ -61,3 +61,4 @@ CONFIG_PINCTRL_IMX6=y
 CONFIG_DM_GPIO=y
 CONFIG_DM_SPI=y
 CONFIG_DM_SPI_FLASH=y
+CONFIG_OF_BOARD_SETUP=y
index ec3bc10f6d56338145d9b6e1a9778776359ef43f..db31d817aa23a9a6808e17670d0ba4ec38a8f239 100644 (file)
@@ -50,3 +50,4 @@ CONFIG_DM_MMC=y
 CONFIG_BLK=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_IMX5=y
+CONFIG_OF_BOARD_SETUP=y