From 36c0627ba5efd602d9ca8ebaae06f30d1890a41a Mon Sep 17 00:00:00 2001 From: Sven Ebenfeld Date: Fri, 25 Nov 2016 21:42:53 +0100 Subject: arm: imx: wandboard: fix compile error if CONFIG_VIDEO is deactivated When I tried to deactivate VIDEO support for the Wandboard, it still tried to initialize the Framebuffer and so on. That is the reason for the added ifdefs. CONFIG_VIDEO is enabled in the configuration as default and therefore nothing changes for the default user. The structs mx6dl_i2c2_pad_info and mx6q_i2c2_pad_info are only available when CONFIG_IPUV3 are set and should not be tried to access, when that define is not defined. Signed-off-by: Sven Ebenfeld --- board/wandboard/wandboard.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'board/wandboard') diff --git a/board/wandboard/wandboard.c b/board/wandboard/wandboard.c index b3f3b34f44..2c9dc8b7c5 100644 --- a/board/wandboard/wandboard.c +++ b/board/wandboard/wandboard.c @@ -442,11 +442,13 @@ int board_init(void) /* address of boot parameters */ gd->bd->bi_boot_params = PHYS_SDRAM + 0x100; +#if defined(CONFIG_VIDEO_IPUV3) setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &mx6dl_i2c2_pad_info); if (is_mx6dq()) setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &mx6q_i2c2_pad_info); else setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &mx6dl_i2c2_pad_info); +#endif return 0; } -- cgit v1.2.3