summaryrefslogtreecommitdiff
path: root/board/ge
diff options
context:
space:
mode:
authorIan Ray <ian.ray@ge.com>2018-04-25 16:57:02 +0200
committerStefano Babic <sbabic@denx.de>2018-05-17 11:54:24 +0200
commit7927ff7a3af203c38ec6b4119c0fcfd194c96ff3 (patch)
treea0374793945d3a67266eafd02db492d000a5ac61 /board/ge
parent5e604e2ce7e836996103fa1e5bed4e92ce8d0bb2 (diff)
board: ge: bx50v3: use VPD instead of compile-time checks
B{46}50v3s have an internal LCD that needs to be configured, in comparison with B850v3 which has only external displays. Use VPD instead of `CONFIG_TARGET_GE_B{4,6,8}50V3' compile-time checks to correct initialize video based on the monitor type. 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>
Diffstat (limited to 'board/ge')
-rw-r--r--board/ge/bx50v3/bx50v3.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/board/ge/bx50v3/bx50v3.c b/board/ge/bx50v3/bx50v3.c
index 3de958e628..953ec60bd1 100644
--- a/board/ge/bx50v3/bx50v3.c
+++ b/board/ge/bx50v3/bx50v3.c
@@ -366,13 +366,14 @@ int board_cfb_skip(void)
return 0;
}
-static int detect_lcd(struct display_info_t const *dev)
+static int is_b850v3(void)
{
- if (IS_ENABLED(CONFIG_TARGET_GE_B450V3) ||
- IS_ENABLED(CONFIG_TARGET_GE_B650V3))
- return 1;
+ return confidx == 3;
+}
- return 0;
+static int detect_lcd(struct display_info_t const *dev)
+{
+ return !is_b850v3();
}
struct display_info_t const displays[] = {{
@@ -682,7 +683,7 @@ int board_early_init_f(void)
setup_iomux_uart();
#if defined(CONFIG_VIDEO_IPUV3)
- if (IS_ENABLED(CONFIG_TARGET_GE_B850V3))
+ if (is_b850v3())
/* Set LDB clock to Video PLL */
select_ldb_di_clock_source(MXC_PLL5_CLK);
else
@@ -720,7 +721,7 @@ int board_init(void)
gpio_direction_output(SUS_S3_OUT, 1);
gpio_direction_output(WIFI_EN, 1);
#if defined(CONFIG_VIDEO_IPUV3)
- if (IS_ENABLED(CONFIG_TARGET_GE_B850V3))
+ if (is_b850v3())
setup_display_b850v3();
else
setup_display_bx50v3();