summaryrefslogtreecommitdiff
path: root/drivers/video/cfb_console.c
diff options
context:
space:
mode:
authorYe Li <ye.li@nxp.com>2016-08-29 13:51:01 +0800
committerYe Li <ye.li@nxp.com>2018-04-27 02:32:33 -0700
commit8a2330424ce8dff9ba9e51ccf74fa600ea93aeb1 (patch)
tree7aa724d3b979c9dead412df6c55114c079dfe3e2 /drivers/video/cfb_console.c
parent952d331f7b12ba278d4f6a68b0be2b1e6d1b31b8 (diff)
MLK-15324-1 video: cfb_console: Fix 64 bits support problem
There are some integer to pointer convert. To support 64 bits system, change the unsigned int to unsigned long. Signed-off-by: Ye Li <ye.li@nxp.com> (cherry picked from commit c3b5c2df452eac82a970ba304e94550be8e27335)
Diffstat (limited to 'drivers/video/cfb_console.c')
-rw-r--r--drivers/video/cfb_console.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c
index 0b25897062..917a5a95c5 100644
--- a/drivers/video/cfb_console.c
+++ b/drivers/video/cfb_console.c
@@ -1177,7 +1177,7 @@ static int display_rle8_bitmap(struct bmp_image *img, int xoff, int yoff,
y = __le32_to_cpu(img->header.height) - 1;
ncolors = __le32_to_cpu(img->header.colors_used);
bpp = VIDEO_PIXEL_SIZE;
- fbp = (unsigned char *) ((unsigned int) video_fb_address +
+ fbp = (unsigned char *) ((unsigned long) video_fb_address +
(y + yoff) * VIDEO_LINE_LEN +
xoff * bpp);
@@ -1232,7 +1232,7 @@ static int display_rle8_bitmap(struct bmp_image *img, int xoff, int yoff,
x = 0;
y--;
fbp = (unsigned char *)
- ((unsigned int) video_fb_address +
+ ((unsigned long) video_fb_address +
(y + yoff) * VIDEO_LINE_LEN +
xoff * bpp);
continue;
@@ -1245,7 +1245,7 @@ static int display_rle8_bitmap(struct bmp_image *img, int xoff, int yoff,
x += bm[2];
y -= bm[3];
fbp = (unsigned char *)
- ((unsigned int) video_fb_address +
+ ((unsigned long) video_fb_address +
(y + yoff) * VIDEO_LINE_LEN +
xoff * bpp);
bm += 4;
@@ -2020,7 +2020,7 @@ static int cfg_video_init(void)
if (pGD == NULL)
return -1;
- video_fb_address = (void *) VIDEO_FB_ADRS;
+ video_fb_address = (void *)(unsigned long) VIDEO_FB_ADRS;
cfb_do_flush_cache = cfb_fb_is_in_dram() && dcache_status();