board: ge: bx50v3: configure video arguments using VPD
authorIan Ray <ian.ray@ge.com>
Wed, 25 Apr 2018 14:57:03 +0000 (16:57 +0200)
committerStefano Babic <sbabic@denx.de>
Thu, 17 May 2018 09:54:24 +0000 (11:54 +0200)
Configure video arguments at run-time instead of at compile-time.

Signed-off-by: Ian Ray <ian.ray@ge.com>
Signed-off-by: Nandor Han <nandor.han@ge.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
board/ge/bx50v3/bx50v3.c
include/configs/ge_bx50v3.h

index 953ec60bd1c40a20ada0ddbd3b1a55bba552d7ef..b2d065c1b801244e01216ff637032390718dc3cd 100644 (file)
@@ -803,6 +803,9 @@ int board_late_init(void)
        add_board_boot_modes(board_boot_modes);
 #endif
 
+       if (is_b850v3())
+               env_set("videoargs", "video=DP-1:1024x768@60 video=HDMI-A-1:1024x768@60");
+
        /* board specific pmic init */
        pmic_init();
 
index 32631a20c3583bd0ab3009092caa68092dbafc03..f10ff26bb99d5c36836ded066160218307727507 100644 (file)
@@ -14,7 +14,6 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/mach-imx/gpio.h>
 
-#define BX50V3_BOOTARGS_EXTRA
 #if defined(CONFIG_TARGET_GE_B450V3)
 #define CONFIG_BOARD_NAME      "General Electric B450v3"
 #elif defined(CONFIG_TARGET_GE_B650V3)
@@ -22,8 +21,6 @@
 #elif defined(CONFIG_TARGET_GE_B850V3)
 #define CONFIG_BOARD_NAME      "General Electric B850v3"
 #undef BX50V3_BOOTARGS_EXTRA
-#define BX50V3_BOOTARGS_EXTRA  "video=DP-1:1024x768@60 " \
-                               "video=HDMI-A-1:1024x768@60 "
 #else
 #define CONFIG_BOARD_NAME      "General Electric BA16 Generic"
 #endif
                "ro rootwait cma=128M " \
                "bootcause=${bootcause} " \
                "${quiet} console=${console} ${rtc_status} " \
-               BX50V3_BOOTARGS_EXTRA "\0" \
+               "${videoargs}" "\0" \
        "doquiet=" \
                "if ext2load ${dev} ${devnum}:5 0x7000A000 /boot/console; " \
                        "then setenv quiet; fi\0" \