X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=cpu%2Fmpc8xx%2Fvideo.c;h=4a59927436c34ce372aba8bac3e6dd67c91fa128;hb=62c3ae7c6ef215b1afa614abdf61acf077752207;hp=1887cfe8ab67355a3ff8d05dc2a3bdfbca77670a;hpb=8564acf936726c5568d71e4fa93a0ae9814e0d07;p=oweals%2Fu-boot.git diff --git a/cpu/mpc8xx/video.c b/cpu/mpc8xx/video.c index 1887cfe8ab..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; @@ -684,15 +687,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 +713,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); @@ -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