From: Ian Ray Date: Thu, 31 Jan 2019 14:21:18 +0000 (+0200) Subject: board: ge: store version information in fdt X-Git-Tag: v2019.07-rc1~21^2~110 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=61c4c2bf1e648bdf49d58a5388f1414f3906b62f;p=oweals%2Fu-boot.git board: ge: store version information in fdt Add board-specific FDT function to store U-Boot version in device tree. Signed-off-by: Ian Ray --- diff --git a/board/ge/bx50v3/bx50v3.c b/board/ge/bx50v3/bx50v3.c index b69b9e727b..f42d2ceb79 100644 --- a/board/ge/bx50v3/bx50v3.c +++ b/board/ge/bx50v3/bx50v3.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -27,6 +28,7 @@ #include #include #include +#include #include #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 diff --git a/board/ge/mx53ppd/mx53ppd.c b/board/ge/mx53ppd/mx53ppd.c index 9e13a24755..5411e422ac 100644 --- a/board/ge/mx53ppd/mx53ppd.c +++ b/board/ge/mx53ppd/mx53ppd.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -30,6 +31,7 @@ #include #include #include +#include #include #include "ppd_gpio.h" #include @@ -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 diff --git a/configs/ge_bx50v3_defconfig b/configs/ge_bx50v3_defconfig index 14114acbce..354c61fd6b 100644 --- a/configs/ge_bx50v3_defconfig +++ b/configs/ge_bx50v3_defconfig @@ -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 diff --git a/configs/mx53ppd_defconfig b/configs/mx53ppd_defconfig index ec3bc10f6d..db31d817aa 100644 --- a/configs/mx53ppd_defconfig +++ b/configs/mx53ppd_defconfig @@ -50,3 +50,4 @@ CONFIG_DM_MMC=y CONFIG_BLK=y CONFIG_PINCTRL=y CONFIG_PINCTRL_IMX5=y +CONFIG_OF_BOARD_SETUP=y