]> git.sur5r.net Git - u-boot/blobdiff - drivers/video/video-uclass.c
Merge branch 'master' of git://git.denx.de/u-boot-video
[u-boot] / drivers / video / video-uclass.c
index 1615889626d80e2b400a6adfa19708a1334c3aff..24d537e6c44ff37236e1b8b41049417c8f13147f 100644 (file)
  */
 DECLARE_GLOBAL_DATA_PTR;
 
+void video_set_flush_dcache(struct udevice *dev, bool flush)
+{
+       struct video_priv *priv = dev_get_uclass_priv(dev);
+
+       priv->flush_dcache = flush;
+}
+
 static ulong alloc_fb(struct udevice *dev, ulong *addrp)
 {
        struct video_uc_platdata *plat = dev_get_uclass_platdata(dev);
@@ -189,6 +196,27 @@ static int video_post_probe(struct udevice *dev)
 #endif
        video_clear(dev);
 
+       /*
+        * Create a text console devices. For now we always do this, although
+        * it might be useful to support only bitmap drawing on the device
+        * for boards that don't need to display text.
+        */
+       snprintf(name, sizeof(name), "%s.vidconsole", dev->name);
+       str = strdup(name);
+       if (!str)
+               return -ENOMEM;
+       snprintf(drv, sizeof(drv), "vidconsole%d", priv->rot);
+       ret = device_bind_driver(dev, drv, str, &cons);
+       if (ret) {
+               debug("%s: Cannot bind console driver\n", __func__);
+               return ret;
+       }
+       ret = device_probe(cons);
+       if (ret) {
+               debug("%s: Cannot probe console driver\n", __func__);
+               return ret;
+       }
+
        return 0;
 };