]> git.sur5r.net Git - u-boot/blobdiff - drivers/video/sunxi/sunxi_de2.c
sunxi: video: add LCD support to DE2 driver
[u-boot] / drivers / video / sunxi / sunxi_de2.c
index 67b937098c337344cddc33a0bf74528544f6d9a7..e8903400ec7e3a327d2f895d49b8b10e50f44e10 100644 (file)
@@ -235,6 +235,23 @@ static int sunxi_de2_probe(struct udevice *dev)
        if (!(gd->flags & GD_FLG_RELOC))
                return 0;
 
+       ret = uclass_find_device_by_name(UCLASS_DISPLAY,
+                                        "sunxi_lcd", &disp);
+       if (!ret) {
+               int mux;
+
+               mux = 0;
+
+               ret = sunxi_de2_init(dev, plat->base, VIDEO_BPP32, disp, mux,
+                                    false);
+               if (!ret) {
+                       video_set_flush_dcache(dev, 1);
+                       return 0;
+               }
+       }
+
+       debug("%s: lcd display not found (ret=%d)\n", __func__, ret);
+
        ret = uclass_find_device_by_name(UCLASS_DISPLAY,
                                         "sunxi_dw_hdmi", &disp);
        if (!ret) {