]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/video/mxc_ipuv3_fb.c
video: mxc_ipuv3_fb: stash frame buffer pointer in global data.
[karo-tx-uboot.git] / drivers / video / mxc_ipuv3_fb.c
index 3e21fb23067c0dc41c16f35fc58964db806eae07..f75d77064ea5334c6211130f367987c61bd742cd 100644 (file)
@@ -13,6 +13,7 @@
 
 #include <common.h>
 #include <asm/errno.h>
+#include <asm/global_data.h>
 #include <linux/string.h>
 #include <linux/list.h>
 #include <linux/fb.h>
@@ -24,6 +25,8 @@
 #include "mxcfb.h"
 #include "ipu_regs.h"
 
+DECLARE_GLOBAL_DATA_PTR;
+
 static int mxcfb_map_video_memory(struct fb_info *fbi);
 static int mxcfb_unmap_video_memory(struct fb_info *fbi);
 
@@ -415,6 +418,8 @@ static int mxcfb_map_video_memory(struct fb_info *fbi)
 
        fbi->screen_size = fbi->fix.smem_len;
 
+       gd->fb_base = fbi->fix.smem_start;
+
        /* Clear the screen */
        memset((char *)fbi->screen_base, 0, fbi->fix.smem_len);