X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=cpu%2Fmpc8xx%2Fvideo.c;h=4a59927436c34ce372aba8bac3e6dd67c91fa128;hb=281dfb0c0c531194f99e60d6285cca4e2a9fb1b6;hp=f2b8814c83112b2131b0ca55b5c364dc22df9d97;hpb=945af8d723a29e9b6289d84250745ed0dc16fc81;p=oweals%2Fu-boot.git diff --git a/cpu/mpc8xx/video.c b/cpu/mpc8xx/video.c index f2b8814c83..4a59927436 100644 --- a/cpu/mpc8xx/video.c +++ b/cpu/mpc8xx/video.c @@ -33,12 +33,15 @@ #include #include #include +#include #include #include #include #ifdef CONFIG_VIDEO +DECLARE_GLOBAL_DATA_PTR; + /************************************************************************/ /* ** DEBUG SETTINGS */ /************************************************************************/ @@ -113,9 +116,9 @@ #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 +450,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 +477,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)); } /************************************************************************/ @@ -515,7 +518,7 @@ static void inline video_mode_addentry (VRAM * vr, static int video_mode_generate (void) { - immap_t *immap = (immap_t *) CFG_IMMR; + immap_t *immap = (immap_t *) CONFIG_SYS_IMMR; VRAM *vr = (VRAM *) (((void *) immap) + 0xb00); /* Pointer to the VRAM table */ int DX, X1, X2, DY, Y1, Y2, entry = 0, fifo; @@ -806,7 +809,7 @@ static void video_encoder_init (void) /* Initialize the I2C */ debug ("[VIDEO ENCODER] Initializing I2C bus...\n"); - i2c_init (CFG_I2C_SPEED, CFG_I2C_SLAVE); + i2c_init (CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE); #ifdef CONFIG_FADS /* Reset ADV7176 chip */ @@ -831,10 +834,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