FSL DDR: Remove duplicate setting of cs0_bnds register on 86xx.
[oweals/u-boot.git] / cpu / mpc8xx / video.c
index 1887cfe8ab67355a3ff8d05dc2a3bdfbca77670a..ef91165602df3fcad7a1902eef8a7edb74d55484 100644 (file)
@@ -39,6 +39,8 @@
 
 #ifdef CONFIG_VIDEO
 
+DECLARE_GLOBAL_DATA_PTR;
+
 /************************************************************************/
 /* ** DEBUG SETTINGS                                                   */
 /************************************************************************/
 #define VIDEO_BURST_LEN                (VIDEO_COLS/8)
 
 #ifdef VIDEO_MODE_YUYV
-#define VIDEO_BG_COL   0x80D880D8      /* Background color in YUYV format */
+#define VIDEO_BG_COL   0x80D880D8      /* Background color in YUYV format */
 #else
-#define VIDEO_BG_COL   0xF8F8F8F8      /* Background color in RGB format */
+#define VIDEO_BG_COL   0xF8F8F8F8      /* Background color in RGB format */
 #endif
 
 /************************************************************************/
@@ -447,9 +449,9 @@ static void video_drawchars (int xx, int yy, unsigned char *s, int count)
        }
 }
 
-static inline void video_drawstring (int xx, int yy, unsigned char *s)
+static inline void video_drawstring (int xx, int yy, char *s)
 {
-       video_drawchars (xx, yy, s, strlen (s));
+       video_drawchars (xx, yy, (unsigned char *)s, strlen (s));
 }
 
 /* Relative to console plotting functions */
@@ -474,7 +476,7 @@ static void video_putchar (int xx, int yy, unsigned char c)
 
 static inline void video_putstring (int xx, int yy, unsigned char *s)
 {
-       video_putchars (xx, yy, s, strlen (s));
+       video_putchars (xx, yy, (unsigned char *)s, strlen ((char *)s));
 }
 
 /************************************************************************/
@@ -684,15 +686,15 @@ static int video_mode_generate (void)
        ADDENTRY (0, 3, 0, 3, 1, 0, VID_R , 1, 0);
        ADDENTRY (0, 3, 0, 3, 1, 0, HPW-1, 0, 0);
        ADDENTRY (3, 3, 0, 3, 1, 0, HBP, 0, 0);
-       ADDENTRY (3, 3, 0, 3, 0, 0, VIDEO_COLS*2, 0, 0); 
+       ADDENTRY (3, 3, 0, 3, 0, 0, VIDEO_COLS*2, 0, 0);
        ADDENTRY (3, 3, 0, 3, 1, 0, 72, 1, 1);
 
        ADDENTRY (0, 3, 0, 3, 1, 0, 51, 1, 0);
        ADDENTRY (0, 3, 0, 3, 1, 0, HPW-1, 0, 0);
        ADDENTRY (3, 3, 0, 3, 1, 0, HBP +(VIDEO_COLS * 2) + 72 , 1, 0);
-/* 
- * Odd field   
- */    
+/*
+ * Odd field
+ */
        ADDENTRY (0, 3, 0, 3, 1, 0, 2, 0, 0);
        ADDENTRY (0, 0, 0, 3, 1, 0, HPW, 0, 0);
        ADDENTRY (3, 0, 0, 3, 1, 0, HBP + (VIDEO_COLS * 2) + 72, 0, 0);
@@ -710,7 +712,7 @@ static int video_mode_generate (void)
        ADDENTRY (0, 3, 0, 3, 1, 0, VID_R , 1, 0);
        ADDENTRY (0, 3, 0, 3, 1, 0, HPW-1, 0, 0);
        ADDENTRY (3, 3, 0, 3, 1, 0, HBP, 0, 0);
-       ADDENTRY (3, 3, 0, 3, 0, 0, VIDEO_COLS*2, 0, 0); 
+       ADDENTRY (3, 3, 0, 3, 0, 0, VIDEO_COLS*2, 0, 0);
        ADDENTRY (3, 3, 0, 3, 1, 0, 72, 1, 1);
 
        ADDENTRY (0, 3, 0, 3, 1, 0, 51, 1, 0);
@@ -831,10 +833,10 @@ static void video_encoder_init (void)
 
                puts ("[VIDEO ENCODER] Configuring the encoder...\n");
 
-               printf ("Sending %d bytes (@ %08lX) to I2C 0x%X:\n   ",
+               printf ("Sending %zu bytes (@ %08lX) to I2C 0x%lX:\n   ",
                        sizeof(video_encoder_data),
                        (ulong)video_encoder_data,
-                       VIDEO_I2C_ADDR);
+                       (ulong)VIDEO_I2C_ADDR);
                for (i=0; i<sizeof(video_encoder_data); ++i) {
                        printf(" %02X", video_encoder_data[i]);
                }
@@ -1164,7 +1166,6 @@ static void *video_logo (void)
        u16 *screen = video_fb_address, width = VIDEO_COLS;
 #ifdef VIDEO_INFO
 # ifndef CONFIG_FADS
-       DECLARE_GLOBAL_DATA_PTR;
        char temp[32];
 # endif
        char info[80];
@@ -1282,8 +1283,6 @@ static int video_init (void *videobase)
 
 int drv_video_init (void)
 {
-       DECLARE_GLOBAL_DATA_PTR;
-
        int error, devices = 1;
 
        device_t videodev;