From: Simon Glass Date: Tue, 19 Jan 2016 02:52:23 +0000 (-0700) Subject: dm: stdio: video: Plumb the video uclass into stdio X-Git-Tag: v2016.03-rc1~243^2~5 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e3b81c1c0dbd677338163517ed22a1b6f5cb4e07;p=u-boot dm: stdio: video: Plumb the video uclass into stdio Register video drivers with stdio so that they can be used for text output. This needs to be done explicitly for now. At some point we should be able to convert stdio itself to driver model and avoid this step. Signed-off-by: Simon Glass Acked-by: Anatolij Gustschin --- diff --git a/common/stdio.c b/common/stdio.c index 8311ac768c..7252bab1f6 100644 --- a/common/stdio.c +++ b/common/stdio.c @@ -281,12 +281,23 @@ int stdio_add_devices(void) i2c_init (CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE); #endif #endif -#ifdef CONFIG_LCD +#ifdef CONFIG_DM_VIDEO + struct udevice *vdev; + + for (ret = uclass_first_device(UCLASS_VIDEO, &vdev); + vdev; + ret = uclass_next_device(&vdev)) + ; + if (ret) + printf("%s: Video device failed (ret=%d)\n", __func__, ret); +#else +# if defined(CONFIG_LCD) drv_lcd_init (); -#endif -#if defined(CONFIG_VIDEO) || defined(CONFIG_CFB_CONSOLE) +# endif +# if defined(CONFIG_VIDEO) || defined(CONFIG_CFB_CONSOLE) drv_video_init (); -#endif +# endif +#endif /* CONFIG_DM_VIDEO */ #if defined(CONFIG_KEYBOARD) && !defined(CONFIG_DM_KEYBOARD) drv_keyboard_init (); #endif