diff mbox series

[U-Boot,PATCHv1,6/7] board: ge: bx50v3: configure video arguments using VPD

Message ID 20180425145704.30841-7-sebastian.reichel@collabora.co.uk
State Accepted
Commit 06a3e4389c0c01cf8dbe57ed3a051104282090a1
Delegated to: Stefano Babic
Headers show
Series Merge B850v3, B650v3 and B450v3 targets | expand

Commit Message

Sebastian Reichel April 25, 2018, 2:57 p.m. UTC
From: Ian Ray <ian.ray@ge.com>

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    | 3 +++
 include/configs/ge_bx50v3.h | 5 +----
 2 files changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/board/ge/bx50v3/bx50v3.c b/board/ge/bx50v3/bx50v3.c
index b969d6255808..33f7ee6e3be5 100644
--- a/board/ge/bx50v3/bx50v3.c
+++ b/board/ge/bx50v3/bx50v3.c
@@ -804,6 +804,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();
 
diff --git a/include/configs/ge_bx50v3.h b/include/configs/ge_bx50v3.h
index 44c92f9d480b..ac54485080ef 100644
--- a/include/configs/ge_bx50v3.h
+++ b/include/configs/ge_bx50v3.h
@@ -15,7 +15,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)
@@ -23,8 +22,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
@@ -114,7 +111,7 @@ 
 		"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" \