diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c
index b56197f..917bba6 100644
--- a/drivers/video/cfb_console.c
+++ b/drivers/video/cfb_console.c
@@ -29,76 +29,83 @@
  * At the moment only the 8x16 font is tested and the font fore- and
  * background color is limited to black/white/gray colors. The Linux
  * logo can be placed in the upper left corner and additional board
- * information strings (that normaly goes to serial port) can be drawed.
+ * information strings (that normally goes to serial port) can be drawn.
  *
  * The console driver can use the standard PC keyboard interface (i8042)
  * for character input. Character output goes to a memory mapped video
  * framebuffer with little or big-endian organisation.
  * With environment setting 'console=serial' the console i/o can be
  * forced to serial port.
-
- The driver uses graphic specific defines/parameters/functions:
-
- (for SMI LynxE graphic chip)
-
- CONFIG_VIDEO_SMI_LYNXEM - use graphic driver for SMI 710,712,810
- VIDEO_FB_LITTLE_ENDIAN	 - framebuffer organisation default: big endian
- VIDEO_HW_RECTFILL	 - graphic driver supports hardware rectangle fill
- VIDEO_HW_BITBLT	 - graphic driver supports hardware bit blt
-
- Console Parameters are set by graphic drivers global struct:
-
- VIDEO_VISIBLE_COLS	     - x resolution
- VIDEO_VISIBLE_ROWS	     - y resolution
- VIDEO_PIXEL_SIZE	     - storage size in byte per pixel
- VIDEO_DATA_FORMAT	     - graphical data format GDF
- VIDEO_FB_ADRS		     - start of video memory
-
- CONFIG_I8042_KBD	     - AT Keyboard driver for i8042
- VIDEO_KBD_INIT_FCT	     - init function for keyboard
- VIDEO_TSTC_FCT		     - keyboard_tstc function
- VIDEO_GETC_FCT		     - keyboard_getc function
-
- CONFIG_CONSOLE_CURSOR	     - on/off drawing cursor is done with delay
-			       loop in VIDEO_TSTC_FCT (i8042)
- CONFIG_SYS_CONSOLE_BLINK_COUNT     - value for delay loop - blink rate
- CONFIG_CONSOLE_TIME	     - display time/date in upper right corner,
-			       needs CONFIG_CMD_DATE and CONFIG_CONSOLE_CURSOR
- CONFIG_VIDEO_LOGO	     - display Linux Logo in upper left corner
- CONFIG_VIDEO_BMP_LOGO	     - use bmp_logo instead of linux_logo
- CONFIG_CONSOLE_EXTRA_INFO   - display additional board information strings
-			       that normaly goes to serial port. This define
-			       requires a board specific function:
-			       video_drawstring (VIDEO_INFO_X,
-						 VIDEO_INFO_Y + i*VIDEO_FONT_HEIGHT,
-						 info);
-			       that fills a info buffer at i=row.
-			       s.a: board/eltec/bab7xx.
-CONFIG_VGA_AS_SINGLE_DEVICE  - If set the framebuffer device will be initialised
-			       as an output only device. The Keyboard driver
-			       will not be set-up. This may be used, if you
-			       have none or more than one Keyboard devices
-			       (USB Keyboard, AT Keyboard).
-
-CONFIG_VIDEO_SW_CURSOR:	     - Draws a cursor after the last character. No
-			       blinking is provided. Uses the macros CURSOR_SET
-			       and CURSOR_OFF.
-CONFIG_VIDEO_HW_CURSOR:	     - Uses the hardware cursor capability of the
-			       graphic chip. Uses the macro CURSOR_SET.
-			       ATTENTION: If booting an OS, the display driver
-			       must disable the hardware register of the graphic
-			       chip. Otherwise a blinking field is displayed
-*/
+ *
+ * The driver uses graphic specific defines/parameters/functions:
+ *
+ * (for SMI LynxE graphic chip)
+ *
+ * CONFIG_VIDEO_SMI_LYNXEM    - use graphic driver for SMI 710,712,810
+ * VIDEO_FB_LITTLE_ENDIAN     - framebuffer organisation default: big endian
+ * VIDEO_HW_RECTFILL	      - graphic driver supports hardware rectangle fill
+ * VIDEO_HW_BITBLT	      - graphic driver supports hardware bit blt
+ *
+ * Console Parameters are set by graphic drivers global struct:
+ *
+ * VIDEO_VISIBLE_COLS	      - x resolution
+ * VIDEO_VISIBLE_ROWS	      - y resolution
+ * VIDEO_PIXEL_SIZE	      - storage size in byte per pixel
+ * VIDEO_DATA_FORMAT	      - graphical data format GDF
+ * VIDEO_FB_ADRS	      - start of video memory
+ *
+ * CONFIG_I8042_KBD	      - AT Keyboard driver for i8042
+ * VIDEO_KBD_INIT_FCT	      - init function for keyboard
+ * VIDEO_TSTC_FCT	      - keyboard_tstc function
+ * VIDEO_GETC_FCT	      - keyboard_getc function
+ *
+ * CONFIG_CONSOLE_CURSOR      - on/off drawing cursor is done with
+ *				delay loop in VIDEO_TSTC_FCT (i8042)
+ *
+ * CONFIG_SYS_CONSOLE_BLINK_COUNT - value for delay loop - blink rate
+ * CONFIG_CONSOLE_TIME	      - display time/date in upper right
+ *				corner, needs CONFIG_CMD_DATE and
+ *				CONFIG_CONSOLE_CURSOR
+ * CONFIG_VIDEO_LOGO	      - display Linux Logo in upper left corner
+ * CONFIG_VIDEO_BMP_LOGO      - use bmp_logo instead of linux_logo
+ * CONFIG_CONSOLE_EXTRA_INFO  - display additional board information
+ *				strings that normaly goes to serial
+ *				port.  This define requires a board
+ *				specific function:
+ *				video_drawstring (VIDEO_INFO_X,
+ *					VIDEO_INFO_Y + i*VIDEO_FONT_HEIGHT,
+ *					info);
+ *				that fills a info buffer at i=row.
+ *				s.a: board/eltec/bab7xx.
+ * CONFIG_VGA_AS_SINGLE_DEVICE - If set the framebuffer device will be
+ *				initialized as an output only device.
+ *				The Keyboard driver will not be
+ *				set-up.  This may be used, if you have
+ *				no or more than one Keyboard devices
+ *				(USB Keyboard, AT Keyboard).
+ *
+ * CONFIG_VIDEO_SW_CURSOR:    - Draws a cursor after the last
+ *				character. No blinking is provided.
+ *				Uses the macros CURSOR_SET and
+ *				CURSOR_OFF.
+ *
+ * CONFIG_VIDEO_HW_CURSOR:    - Uses the hardware cursor capability
+ *				of the graphic chip. Uses the macro
+ *				CURSOR_SET. ATTENTION: If booting an
+ *				OS, the display driver must disable
+ *				the hardware register of the graphic
+ *				chip. Otherwise a blinking field is
+ *				displayed.
+ */
 
 #include <common.h>
 #include <version.h>
-
 #include <malloc.h>
 
-/*****************************************************************************/
-/* Console device defines with SMI graphic				     */
-/* Any other graphic must change this section				     */
-/*****************************************************************************/
+/*
+ * Console device defines with SMI graphic
+ * Any other graphic must change this section
+ */
 
 #ifdef	CONFIG_VIDEO_SMI_LYNXEM
 
@@ -107,9 +114,9 @@
 #define VIDEO_HW_BITBLT
 #endif
 
-/*****************************************************************************/
-/* Defines for the CT69000 driver					     */
-/*****************************************************************************/
+/*
+ * Defines for the CT69000 driver
+ */
 #ifdef	CONFIG_VIDEO_CT69000
 
 #define VIDEO_FB_LITTLE_ENDIAN
@@ -117,9 +124,9 @@
 #define VIDEO_HW_BITBLT
 #endif
 
-/*****************************************************************************/
-/* Defines for the SED13806 driver					     */
-/*****************************************************************************/
+/*
+ * Defines for the SED13806 driver
+ */
 #ifdef CONFIG_VIDEO_SED13806
 
 #ifndef CONFIG_TOTAL5200
@@ -129,9 +136,9 @@
 #define VIDEO_HW_BITBLT
 #endif
 
-/*****************************************************************************/
-/* Defines for the SED13806 driver					     */
-/*****************************************************************************/
+/*
+ * Defines for the SED13806 driver
+ */
 #ifdef CONFIG_VIDEO_SM501
 
 #ifdef CONFIG_HH405
@@ -139,9 +146,9 @@
 #endif
 #endif
 
-/*****************************************************************************/
-/* Defines for the MB862xx driver					     */
-/*****************************************************************************/
+/*
+ * Defines for the MB862xx driver
+ */
 #ifdef CONFIG_VIDEO_MB862xx
 
 #ifdef CONFIG_VIDEO_CORALP
@@ -153,24 +160,24 @@
 #endif
 #endif
 
-/*****************************************************************************/
-/* Include video_fb.h after definitions of VIDEO_HW_RECTFILL etc	     */
-/*****************************************************************************/
+/*
+ * Include video_fb.h after definitions of VIDEO_HW_RECTFILL etc.
+ */
 #include <video_fb.h>
 
-/*****************************************************************************/
-/* some Macros								     */
-/*****************************************************************************/
+/*
+ * some Macros
+ */
 #define VIDEO_VISIBLE_COLS	(pGD->winSizeX)
 #define VIDEO_VISIBLE_ROWS	(pGD->winSizeY)
 #define VIDEO_PIXEL_SIZE	(pGD->gdfBytesPP)
 #define VIDEO_DATA_FORMAT	(pGD->gdfIndex)
 #define VIDEO_FB_ADRS		(pGD->frameAdrs)
 
-/*****************************************************************************/
-/* Console device defines with i8042 keyboard controller		     */
-/* Any other keyboard controller must change this section		     */
-/*****************************************************************************/
+/*
+ * Console device defines with i8042 keyboard controller
+ * Any other keyboard controller must change this section
+ */
 
 #ifdef	CONFIG_I8042_KBD
 #include <i8042.h>
@@ -180,9 +187,9 @@
 #define VIDEO_GETC_FCT		i8042_getc
 #endif
 
-/*****************************************************************************/
-/* Console device							     */
-/*****************************************************************************/
+/*
+ * Console device
+ */
 
 #include <version.h>
 #include <linux/types.h>
@@ -203,20 +210,20 @@
 
 #endif
 
-/*****************************************************************************/
-/* Cursor definition:							     */
-/* CONFIG_CONSOLE_CURSOR:  Uses a timer function (see drivers/input/i8042.c) */
-/*                         to let the cursor blink. Uses the macros	     */
-/*                         CURSOR_OFF and CURSOR_ON.			     */
-/* CONFIG_VIDEO_SW_CURSOR: Draws a cursor after the last character. No	     */
-/*			   blinking is provided. Uses the macros CURSOR_SET  */
-/*			   and CURSOR_OFF.				     */
-/* CONFIG_VIDEO_HW_CURSOR: Uses the hardware cursor capability of the	     */
-/*			   graphic chip. Uses the macro CURSOR_SET.	     */
-/*			   ATTENTION: If booting an OS, the display driver   */
-/*			   must disable the hardware register of the graphic */
-/*			   chip. Otherwise a blinking field is displayed     */
-/*****************************************************************************/
+/*
+ * Cursor definition:
+ * CONFIG_CONSOLE_CURSOR:  Uses a timer function (see drivers/input/i8042.c)
+ *			   to let the cursor blink. Uses the macros
+ *			   CURSOR_OFF and CURSOR_ON.
+ * CONFIG_VIDEO_SW_CURSOR: Draws a cursor after the last character. No
+ *			   blinking is provided. Uses the macros CURSOR_SET
+ *			   and CURSOR_OFF.
+ * CONFIG_VIDEO_HW_CURSOR: Uses the hardware cursor capability of the
+ *			   graphic chip. Uses the macro CURSOR_SET.
+ *			   ATTENTION: If booting an OS, the display driver
+ *			   must disable the hardware register of the graphic
+ *			   chip. Otherwise a blinking field is displayed
+ */
 #if !defined(CONFIG_CONSOLE_CURSOR) && \
     !defined(CONFIG_VIDEO_SW_CURSOR) && \
     !defined(CONFIG_VIDEO_HW_CURSOR)
@@ -228,9 +235,11 @@
 
 #ifdef	CONFIG_CONSOLE_CURSOR
 #ifdef	CURSOR_ON
-#error	only one of CONFIG_CONSOLE_CURSOR,CONFIG_VIDEO_SW_CURSOR,CONFIG_VIDEO_HW_CURSOR can be defined
+#error	only one of CONFIG_CONSOLE_CURSOR, CONFIG_VIDEO_SW_CURSOR, \
+	or CONFIG_VIDEO_HW_CURSOR can be defined
 #endif
-void	console_cursor (int state);
+void console_cursor(int state);
+
 #define CURSOR_ON  console_cursor(1)
 #define CURSOR_OFF console_cursor(0)
 #define CURSOR_SET
@@ -245,7 +254,8 @@
 
 #ifdef	CONFIG_VIDEO_SW_CURSOR
 #ifdef	CURSOR_ON
-#error	only one of CONFIG_CONSOLE_CURSOR,CONFIG_VIDEO_SW_CURSOR,CONFIG_VIDEO_HW_CURSOR can be defined
+#error	only one of CONFIG_CONSOLE_CURSOR, CONFIG_VIDEO_SW_CURSOR, \
+	or CONFIG_VIDEO_HW_CURSOR can be defined
 #endif
 #define CURSOR_ON
 #define CURSOR_OFF video_putchar(console_col * VIDEO_FONT_WIDTH,\
@@ -256,13 +266,14 @@
 
 #ifdef CONFIG_VIDEO_HW_CURSOR
 #ifdef	CURSOR_ON
-#error	only one of CONFIG_CONSOLE_CURSOR,CONFIG_VIDEO_SW_CURSOR,CONFIG_VIDEO_HW_CURSOR can be defined
+#error	only one of CONFIG_CONSOLE_CURSOR, CONFIG_VIDEO_SW_CURSOR, \
+	or CONFIG_VIDEO_HW_CURSOR can be defined
 #endif
 #define CURSOR_ON
 #define CURSOR_OFF
 #define CURSOR_SET video_set_hw_cursor(console_col * VIDEO_FONT_WIDTH, \
 		  (console_row * VIDEO_FONT_HEIGHT) + video_logo_height)
-#endif	/* CONFIG_VIDEO_HW_CURSOR */
+#endif /* CONFIG_VIDEO_HW_CURSOR */
 
 #ifdef	CONFIG_VIDEO_LOGO
 #ifdef	CONFIG_VIDEO_BMP_LOGO
@@ -272,7 +283,7 @@
 #define VIDEO_LOGO_LUT_OFFSET	BMP_LOGO_OFFSET
 #define VIDEO_LOGO_COLORS	BMP_LOGO_COLORS
 
-#else	/* CONFIG_VIDEO_BMP_LOGO */
+#else  /* CONFIG_VIDEO_BMP_LOGO */
 #define LINUX_LOGO_WIDTH	80
 #define LINUX_LOGO_HEIGHT	80
 #define LINUX_LOGO_COLORS	214
@@ -283,13 +294,13 @@
 #define VIDEO_LOGO_HEIGHT	LINUX_LOGO_HEIGHT
 #define VIDEO_LOGO_LUT_OFFSET	LINUX_LOGO_LUT_OFFSET
 #define VIDEO_LOGO_COLORS	LINUX_LOGO_COLORS
-#endif	/* CONFIG_VIDEO_BMP_LOGO */
+#endif /* CONFIG_VIDEO_BMP_LOGO */
 #define VIDEO_INFO_X		(VIDEO_LOGO_WIDTH)
 #define VIDEO_INFO_Y		(VIDEO_FONT_HEIGHT/2)
-#else	/* CONFIG_VIDEO_LOGO */
+#else  /* CONFIG_VIDEO_LOGO */
 #define VIDEO_LOGO_WIDTH	0
 #define VIDEO_LOGO_HEIGHT	0
-#endif	/* CONFIG_VIDEO_LOGO */
+#endif /* CONFIG_VIDEO_LOGO */
 
 #define VIDEO_COLS		VIDEO_VISIBLE_COLS
 #define VIDEO_ROWS		VIDEO_VISIBLE_ROWS
@@ -314,101 +325,114 @@
 
 /* Macros */
 #ifdef	VIDEO_FB_LITTLE_ENDIAN
-#define SWAP16(x)	 ((((x) & 0x00ff) << 8) | ( (x) >> 8))
-#define SWAP32(x)	 ((((x) & 0x000000ff) << 24) | (((x) & 0x0000ff00) << 8)|\
-			  (((x) & 0x00ff0000) >>  8) | (((x) & 0xff000000) >> 24) )
-#define SHORTSWAP32(x)	 ((((x) & 0x000000ff) <<  8) | (((x) & 0x0000ff00) >> 8)|\
-			  (((x) & 0x00ff0000) <<  8) | (((x) & 0xff000000) >> 8) )
+#define SWAP16(x)		((((x) & 0x00ff) << 8) | \
+				  ((x) >> 8) \
+				)
+#define SWAP32(x)		((((x) & 0x000000ff) << 24) | \
+				 (((x) & 0x0000ff00) <<  8) | \
+				 (((x) & 0x00ff0000) >>  8) | \
+				 (((x) & 0xff000000) >> 24)   \
+				)
+#define SHORTSWAP32(x)		((((x) & 0x000000ff) <<  8) | \
+				 (((x) & 0x0000ff00) >>  8) | \
+				 (((x) & 0x00ff0000) <<  8) | \
+				 (((x) & 0xff000000) >>  8)   \
+				)
 #else
-#define SWAP16(x)	 (x)
-#define SWAP32(x)	 (x)
+#define SWAP16(x)		(x)
+#define SWAP32(x)		(x)
 #if defined(VIDEO_FB_16BPP_WORD_SWAP)
-#define SHORTSWAP32(x)	 ( ((x) >> 16) | ((x) << 16) )
+#define SHORTSWAP32(x)		(((x) >> 16) | ((x) << 16))
 #else
-#define SHORTSWAP32(x)	 (x)
+#define SHORTSWAP32(x)		(x)
 #endif
 #endif
 
 #if defined(DEBUG) || defined(DEBUG_CFB_CONSOLE)
-#define PRINTD(x)	  printf(x)
+#define PRINTD(x)		printf(x)
 #else
 #define PRINTD(x)
 #endif
 
 
 #ifdef CONFIG_CONSOLE_EXTRA_INFO
-extern void video_get_info_str (    /* setup a board string: type, speed, etc. */
-    int line_number,	    /* location to place info string beside logo */
-    char *info		    /* buffer for info string */
-    );
-
+/*
+ * setup a board string: type, speed, etc.
+ *
+ * line_number:	location to place info string beside logo
+ * info:	buffer for info string
+ */
+extern void video_get_info_str(int line_number,	char *info);
 #endif
 
 /* Locals */
 static GraphicDevice *pGD;	/* Pointer to Graphic array */
 
-static void *video_fb_address;		/* frame buffer address */
+static void *video_fb_address;	/* frame buffer address */
 static void *video_console_address;	/* console buffer start address */
 
 static int video_logo_height = VIDEO_LOGO_HEIGHT;
 
-static int console_col = 0; /* cursor col */
-static int console_row = 0; /* cursor row */
+static int console_col = 0;	/* cursor col */
+static int console_row = 0;	/* cursor row */
 
-static u32 eorx, fgx, bgx;  /* color pats */
+static u32 eorx, fgx, bgx;	/* color pats */
 
 static const int video_font_draw_table8[] = {
-	    0x00000000, 0x000000ff, 0x0000ff00, 0x0000ffff,
-	    0x00ff0000, 0x00ff00ff, 0x00ffff00, 0x00ffffff,
-	    0xff000000, 0xff0000ff, 0xff00ff00, 0xff00ffff,
-	    0xffff0000, 0xffff00ff, 0xffffff00, 0xffffffff };
+	0x00000000, 0x000000ff, 0x0000ff00, 0x0000ffff,
+	0x00ff0000, 0x00ff00ff, 0x00ffff00, 0x00ffffff,
+	0xff000000, 0xff0000ff, 0xff00ff00, 0xff00ffff,
+	0xffff0000, 0xffff00ff, 0xffffff00, 0xffffffff
+};
 
 static const int video_font_draw_table15[] = {
-	    0x00000000, 0x00007fff, 0x7fff0000, 0x7fff7fff };
+	0x00000000, 0x00007fff, 0x7fff0000, 0x7fff7fff
+};
 
 static const int video_font_draw_table16[] = {
-	    0x00000000, 0x0000ffff, 0xffff0000, 0xffffffff };
+	0x00000000, 0x0000ffff, 0xffff0000, 0xffffffff
+};
 
 static const int video_font_draw_table24[16][3] = {
-	    { 0x00000000, 0x00000000, 0x00000000 },
-	    { 0x00000000, 0x00000000, 0x00ffffff },
-	    { 0x00000000, 0x0000ffff, 0xff000000 },
-	    { 0x00000000, 0x0000ffff, 0xffffffff },
-	    { 0x000000ff, 0xffff0000, 0x00000000 },
-	    { 0x000000ff, 0xffff0000, 0x00ffffff },
-	    { 0x000000ff, 0xffffffff, 0xff000000 },
-	    { 0x000000ff, 0xffffffff, 0xffffffff },
-	    { 0xffffff00, 0x00000000, 0x00000000 },
-	    { 0xffffff00, 0x00000000, 0x00ffffff },
-	    { 0xffffff00, 0x0000ffff, 0xff000000 },
-	    { 0xffffff00, 0x0000ffff, 0xffffffff },
-	    { 0xffffffff, 0xffff0000, 0x00000000 },
-	    { 0xffffffff, 0xffff0000, 0x00ffffff },
-	    { 0xffffffff, 0xffffffff, 0xff000000 },
-	    { 0xffffffff, 0xffffffff, 0xffffffff } };
+	{0x00000000, 0x00000000, 0x00000000},
+	{0x00000000, 0x00000000, 0x00ffffff},
+	{0x00000000, 0x0000ffff, 0xff000000},
+	{0x00000000, 0x0000ffff, 0xffffffff},
+	{0x000000ff, 0xffff0000, 0x00000000},
+	{0x000000ff, 0xffff0000, 0x00ffffff},
+	{0x000000ff, 0xffffffff, 0xff000000},
+	{0x000000ff, 0xffffffff, 0xffffffff},
+	{0xffffff00, 0x00000000, 0x00000000},
+	{0xffffff00, 0x00000000, 0x00ffffff},
+	{0xffffff00, 0x0000ffff, 0xff000000},
+	{0xffffff00, 0x0000ffff, 0xffffffff},
+	{0xffffffff, 0xffff0000, 0x00000000},
+	{0xffffffff, 0xffff0000, 0x00ffffff},
+	{0xffffffff, 0xffffffff, 0xff000000},
+	{0xffffffff, 0xffffffff, 0xffffffff}
+};
 
 static const int video_font_draw_table32[16][4] = {
-	    { 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
-	    { 0x00000000, 0x00000000, 0x00000000, 0x00ffffff },
-	    { 0x00000000, 0x00000000, 0x00ffffff, 0x00000000 },
-	    { 0x00000000, 0x00000000, 0x00ffffff, 0x00ffffff },
-	    { 0x00000000, 0x00ffffff, 0x00000000, 0x00000000 },
-	    { 0x00000000, 0x00ffffff, 0x00000000, 0x00ffffff },
-	    { 0x00000000, 0x00ffffff, 0x00ffffff, 0x00000000 },
-	    { 0x00000000, 0x00ffffff, 0x00ffffff, 0x00ffffff },
-	    { 0x00ffffff, 0x00000000, 0x00000000, 0x00000000 },
-	    { 0x00ffffff, 0x00000000, 0x00000000, 0x00ffffff },
-	    { 0x00ffffff, 0x00000000, 0x00ffffff, 0x00000000 },
-	    { 0x00ffffff, 0x00000000, 0x00ffffff, 0x00ffffff },
-	    { 0x00ffffff, 0x00ffffff, 0x00000000, 0x00000000 },
-	    { 0x00ffffff, 0x00ffffff, 0x00000000, 0x00ffffff },
-	    { 0x00ffffff, 0x00ffffff, 0x00ffffff, 0x00000000 },
-	    { 0x00ffffff, 0x00ffffff, 0x00ffffff, 0x00ffffff } };
-
+	{0x00000000, 0x00000000, 0x00000000, 0x00000000},
+	{0x00000000, 0x00000000, 0x00000000, 0x00ffffff},
+	{0x00000000, 0x00000000, 0x00ffffff, 0x00000000},
+	{0x00000000, 0x00000000, 0x00ffffff, 0x00ffffff},
+	{0x00000000, 0x00ffffff, 0x00000000, 0x00000000},
+	{0x00000000, 0x00ffffff, 0x00000000, 0x00ffffff},
+	{0x00000000, 0x00ffffff, 0x00ffffff, 0x00000000},
+	{0x00000000, 0x00ffffff, 0x00ffffff, 0x00ffffff},
+	{0x00ffffff, 0x00000000, 0x00000000, 0x00000000},
+	{0x00ffffff, 0x00000000, 0x00000000, 0x00ffffff},
+	{0x00ffffff, 0x00000000, 0x00ffffff, 0x00000000},
+	{0x00ffffff, 0x00000000, 0x00ffffff, 0x00ffffff},
+	{0x00ffffff, 0x00ffffff, 0x00000000, 0x00000000},
+	{0x00ffffff, 0x00ffffff, 0x00000000, 0x00ffffff},
+	{0x00ffffff, 0x00ffffff, 0x00ffffff, 0x00000000},
+	{0x00ffffff, 0x00ffffff, 0x00ffffff, 0x00ffffff}
+};
 
-/******************************************************************************/
 
-static void video_drawchars (int xx, int yy, unsigned char *s, int count)
+static void video_drawchars(int xx, int yy, unsigned char *s, int count)
 {
 	u8 *cdat, *dest, *dest0;
 	int rows, offset, c;
@@ -423,12 +447,15 @@
 			c = *s;
 			cdat = video_fontdata + c * VIDEO_FONT_HEIGHT;
 			for (rows = VIDEO_FONT_HEIGHT, dest = dest0;
-			     rows--;
-			     dest += VIDEO_LINE_LEN) {
+			     rows--; dest += VIDEO_LINE_LEN) {
 				u8 bits = *cdat++;
 
-				((u32 *) dest)[0] = (video_font_draw_table8[bits >> 4] & eorx) ^ bgx;
-				((u32 *) dest)[1] = (video_font_draw_table8[bits & 15] & eorx) ^ bgx;
+				((u32 *) dest)[0] =
+					(video_font_draw_table8[bits >> 4] &
+					 eorx) ^ bgx;
+				((u32 *) dest)[1] =
+					(video_font_draw_table8[bits & 15] &
+					 eorx) ^ bgx;
 			}
 			dest0 += VIDEO_FONT_WIDTH * VIDEO_PIXEL_SIZE;
 			s++;
@@ -440,14 +467,25 @@
 			c = *s;
 			cdat = video_fontdata + c * VIDEO_FONT_HEIGHT;
 			for (rows = VIDEO_FONT_HEIGHT, dest = dest0;
-			     rows--;
-			     dest += VIDEO_LINE_LEN) {
+			     rows--; dest += VIDEO_LINE_LEN) {
 				u8 bits = *cdat++;
 
-				((u32 *) dest)[0] = SHORTSWAP32 ((video_font_draw_table15 [bits >> 6] & eorx) ^ bgx);
-				((u32 *) dest)[1] = SHORTSWAP32 ((video_font_draw_table15 [bits >> 4 & 3] & eorx) ^ bgx);
-				((u32 *) dest)[2] = SHORTSWAP32 ((video_font_draw_table15 [bits >> 2 & 3] & eorx) ^ bgx);
-				((u32 *) dest)[3] = SHORTSWAP32 ((video_font_draw_table15 [bits & 3] & eorx) ^ bgx);
+				((u32 *) dest)[0] =
+					SHORTSWAP32((video_font_draw_table15
+						     [bits >> 6] & eorx) ^
+						    bgx);
+				((u32 *) dest)[1] =
+					SHORTSWAP32((video_font_draw_table15
+						     [bits >> 4 & 3] & eorx) ^
+						    bgx);
+				((u32 *) dest)[2] =
+					SHORTSWAP32((video_font_draw_table15
+						     [bits >> 2 & 3] & eorx) ^
+						    bgx);
+				((u32 *) dest)[3] =
+					SHORTSWAP32((video_font_draw_table15
+						     [bits & 3] & eorx) ^
+						    bgx);
 			}
 			dest0 += VIDEO_FONT_WIDTH * VIDEO_PIXEL_SIZE;
 			s++;
@@ -459,14 +497,25 @@
 			c = *s;
 			cdat = video_fontdata + c * VIDEO_FONT_HEIGHT;
 			for (rows = VIDEO_FONT_HEIGHT, dest = dest0;
-			     rows--;
-			     dest += VIDEO_LINE_LEN) {
+			     rows--; dest += VIDEO_LINE_LEN) {
 				u8 bits = *cdat++;
 
-				((u32 *) dest)[0] = SHORTSWAP32 ((video_font_draw_table16 [bits >> 6] & eorx) ^ bgx);
-				((u32 *) dest)[1] = SHORTSWAP32 ((video_font_draw_table16 [bits >> 4 & 3] & eorx) ^ bgx);
-				((u32 *) dest)[2] = SHORTSWAP32 ((video_font_draw_table16 [bits >> 2 & 3] & eorx) ^ bgx);
-				((u32 *) dest)[3] = SHORTSWAP32 ((video_font_draw_table16 [bits & 3] & eorx) ^ bgx);
+				((u32 *) dest)[0] =
+					SHORTSWAP32((video_font_draw_table16
+						     [bits >> 6] & eorx) ^
+						    bgx);
+				((u32 *) dest)[1] =
+					SHORTSWAP32((video_font_draw_table16
+						     [bits >> 4 & 3] & eorx) ^
+						    bgx);
+				((u32 *) dest)[2] =
+					SHORTSWAP32((video_font_draw_table16
+						     [bits >> 2 & 3] & eorx) ^
+						    bgx);
+				((u32 *) dest)[3] =
+					SHORTSWAP32((video_font_draw_table16
+						     [bits & 3] & eorx) ^
+						    bgx);
 			}
 			dest0 += VIDEO_FONT_WIDTH * VIDEO_PIXEL_SIZE;
 			s++;
@@ -478,18 +527,33 @@
 			c = *s;
 			cdat = video_fontdata + c * VIDEO_FONT_HEIGHT;
 			for (rows = VIDEO_FONT_HEIGHT, dest = dest0;
-			     rows--;
-			     dest += VIDEO_LINE_LEN) {
+			     rows--; dest += VIDEO_LINE_LEN) {
 				u8 bits = *cdat++;
 
-				((u32 *) dest)[0] = SWAP32 ((video_font_draw_table32 [bits >> 4][0] & eorx) ^ bgx);
-				((u32 *) dest)[1] = SWAP32 ((video_font_draw_table32 [bits >> 4][1] & eorx) ^ bgx);
-				((u32 *) dest)[2] = SWAP32 ((video_font_draw_table32 [bits >> 4][2] & eorx) ^ bgx);
-				((u32 *) dest)[3] = SWAP32 ((video_font_draw_table32 [bits >> 4][3] & eorx) ^ bgx);
-				((u32 *) dest)[4] = SWAP32 ((video_font_draw_table32 [bits & 15][0] & eorx) ^ bgx);
-				((u32 *) dest)[5] = SWAP32 ((video_font_draw_table32 [bits & 15][1] & eorx) ^ bgx);
-				((u32 *) dest)[6] = SWAP32 ((video_font_draw_table32 [bits & 15][2] & eorx) ^ bgx);
-				((u32 *) dest)[7] = SWAP32 ((video_font_draw_table32 [bits & 15][3] & eorx) ^ bgx);
+				((u32 *) dest)[0] =
+					SWAP32((video_font_draw_table32
+						[bits >> 4][0] & eorx) ^ bgx);
+				((u32 *) dest)[1] =
+					SWAP32((video_font_draw_table32
+						[bits >> 4][1] & eorx) ^ bgx);
+				((u32 *) dest)[2] =
+					SWAP32((video_font_draw_table32
+						[bits >> 4][2] & eorx) ^ bgx);
+				((u32 *) dest)[3] =
+					SWAP32((video_font_draw_table32
+						[bits >> 4][3] & eorx) ^ bgx);
+				((u32 *) dest)[4] =
+					SWAP32((video_font_draw_table32
+						[bits & 15][0] & eorx) ^ bgx);
+				((u32 *) dest)[5] =
+					SWAP32((video_font_draw_table32
+						[bits & 15][1] & eorx) ^ bgx);
+				((u32 *) dest)[6] =
+					SWAP32((video_font_draw_table32
+						[bits & 15][2] & eorx) ^ bgx);
+				((u32 *) dest)[7] =
+					SWAP32((video_font_draw_table32
+						[bits & 15][3] & eorx) ^ bgx);
 			}
 			dest0 += VIDEO_FONT_WIDTH * VIDEO_PIXEL_SIZE;
 			s++;
@@ -501,16 +565,27 @@
 			c = *s;
 			cdat = video_fontdata + c * VIDEO_FONT_HEIGHT;
 			for (rows = VIDEO_FONT_HEIGHT, dest = dest0;
-			     rows--;
-			     dest += VIDEO_LINE_LEN) {
+			     rows--; dest += VIDEO_LINE_LEN) {
 				u8 bits = *cdat++;
 
-				((u32 *) dest)[0] = (video_font_draw_table24[bits >> 4][0] & eorx) ^ bgx;
-				((u32 *) dest)[1] = (video_font_draw_table24[bits >> 4][1] & eorx) ^ bgx;
-				((u32 *) dest)[2] = (video_font_draw_table24[bits >> 4][2] & eorx) ^ bgx;
-				((u32 *) dest)[3] = (video_font_draw_table24[bits & 15][0] & eorx) ^ bgx;
-				((u32 *) dest)[4] = (video_font_draw_table24[bits & 15][1] & eorx) ^ bgx;
-				((u32 *) dest)[5] = (video_font_draw_table24[bits & 15][2] & eorx) ^ bgx;
+				((u32 *) dest)[0] =
+					(video_font_draw_table24[bits >> 4][0]
+					 & eorx) ^ bgx;
+				((u32 *) dest)[1] =
+					(video_font_draw_table24[bits >> 4][1]
+					 & eorx) ^ bgx;
+				((u32 *) dest)[2] =
+					(video_font_draw_table24[bits >> 4][2]
+					 & eorx) ^ bgx;
+				((u32 *) dest)[3] =
+					(video_font_draw_table24[bits & 15][0]
+					 & eorx) ^ bgx;
+				((u32 *) dest)[4] =
+					(video_font_draw_table24[bits & 15][1]
+					 & eorx) ^ bgx;
+				((u32 *) dest)[5] =
+					(video_font_draw_table24[bits & 15][2]
+					 & eorx) ^ bgx;
 			}
 			dest0 += VIDEO_FONT_WIDTH * VIDEO_PIXEL_SIZE;
 			s++;
@@ -519,23 +594,18 @@
 	}
 }
 
-/*****************************************************************************/
-
-static inline void video_drawstring (int xx, int yy, unsigned char *s)
+static inline void video_drawstring(int xx, int yy, unsigned char *s)
 {
-	video_drawchars (xx, yy, s, strlen ((char *)s));
+	video_drawchars(xx, yy, s, strlen((char *) s));
 }
 
-/*****************************************************************************/
-
-static void video_putchar (int xx, int yy, unsigned char c)
+static void video_putchar(int xx, int yy, unsigned char c)
 {
-	video_drawchars (xx, yy + video_logo_height, &c, 1);
+	video_drawchars(xx, yy + video_logo_height, &c, 1);
 }
 
-/*****************************************************************************/
 #if defined(CONFIG_CONSOLE_CURSOR) || defined(CONFIG_VIDEO_SW_CURSOR)
-static void video_set_cursor (void)
+static void video_set_cursor(void)
 {
 	/* swap drawing colors */
 	eorx = fgx;
@@ -543,9 +613,8 @@
 	bgx = eorx;
 	eorx = fgx ^ bgx;
 	/* draw cursor */
-	video_putchar (console_col * VIDEO_FONT_WIDTH,
-		       console_row * VIDEO_FONT_HEIGHT,
-		       ' ');
+	video_putchar(console_col * VIDEO_FONT_WIDTH,
+		      console_row * VIDEO_FONT_HEIGHT, ' ');
 	/* restore drawing colors */
 	eorx = fgx;
 	fgx = bgx;
@@ -553,9 +622,9 @@
 	eorx = fgx ^ bgx;
 }
 #endif
-/*****************************************************************************/
+
 #ifdef CONFIG_CONSOLE_CURSOR
-void console_cursor (int state)
+void console_cursor(int state)
 {
 	static int last_state = 0;
 
@@ -565,92 +634,88 @@
 
 	/* time update only if cursor is on (faster scroll) */
 	if (state) {
-		rtc_get (&tm);
+		rtc_get(&tm);
 
-		sprintf (info, " %02d:%02d:%02d ", tm.tm_hour, tm.tm_min,
-			 tm.tm_sec);
-		video_drawstring (VIDEO_VISIBLE_COLS - 10 * VIDEO_FONT_WIDTH,
-				  VIDEO_INFO_Y, (uchar *)info);
+		sprintf(info, " %02d:%02d:%02d ", tm.tm_hour, tm.tm_min,
+			tm.tm_sec);
+		video_drawstring(VIDEO_VISIBLE_COLS - 10 * VIDEO_FONT_WIDTH,
+				 VIDEO_INFO_Y, (uchar *) info);
 
-		sprintf (info, "%02d.%02d.%04d", tm.tm_mday, tm.tm_mon,
-			 tm.tm_year);
-		video_drawstring (VIDEO_VISIBLE_COLS - 10 * VIDEO_FONT_WIDTH,
-				  VIDEO_INFO_Y + 1 * VIDEO_FONT_HEIGHT, (uchar *)info);
+		sprintf(info, "%02d.%02d.%04d", tm.tm_mday, tm.tm_mon,
+			tm.tm_year);
+		video_drawstring(VIDEO_VISIBLE_COLS - 10 * VIDEO_FONT_WIDTH,
+				 VIDEO_INFO_Y + 1 * VIDEO_FONT_HEIGHT,
+				 (uchar *) info);
 	}
 #endif
 
 	if (state && (last_state != state)) {
-		video_set_cursor ();
+		video_set_cursor();
 	}
 
 	if (!state && (last_state != state)) {
 		/* clear cursor */
-		video_putchar (console_col * VIDEO_FONT_WIDTH,
-			       console_row * VIDEO_FONT_HEIGHT,
-			       ' ');
+		video_putchar(console_col * VIDEO_FONT_WIDTH,
+			      console_row * VIDEO_FONT_HEIGHT, ' ');
 	}
 
 	last_state = state;
 }
 #endif
 
-/*****************************************************************************/
-
 #ifndef VIDEO_HW_RECTFILL
-static void memsetl (int *p, int c, int v)
+static void memsetl(int *p, int c, int v)
 {
 	while (c--)
 		*(p++) = v;
 }
 #endif
 
-/*****************************************************************************/
-
 #ifndef VIDEO_HW_BITBLT
-static void memcpyl (int *d, int *s, int c)
+static void memcpyl(int *d, int *s, int c)
 {
 	while (c--)
 		*(d++) = *(s++);
 }
 #endif
 
-/*****************************************************************************/
-
-static void console_scrollup (void)
+static void console_scrollup(void)
 {
 	/* copy up rows ignoring the first one */
 
 #ifdef VIDEO_HW_BITBLT
-	video_hw_bitblt (VIDEO_PIXEL_SIZE,	/* bytes per pixel */
-			 0,	/* source pos x */
-			 video_logo_height + VIDEO_FONT_HEIGHT, /* source pos y */
-			 0,	/* dest pos x */
-			 video_logo_height,	/* dest pos y */
-			 VIDEO_VISIBLE_COLS,	/* frame width */
-			 VIDEO_VISIBLE_ROWS - video_logo_height - VIDEO_FONT_HEIGHT	/* frame height */
+	video_hw_bitblt(VIDEO_PIXEL_SIZE,	/* bytes per pixel */
+			0,			/* source pos x */
+			video_logo_height +
+				VIDEO_FONT_HEIGHT, /* source pos y */
+			0,			/* dest pos x */
+			video_logo_height,	/* dest pos y */
+			VIDEO_VISIBLE_COLS,	/* frame width */
+			VIDEO_VISIBLE_ROWS
+			- video_logo_height
+			- VIDEO_FONT_HEIGHT	/* frame height */
 		);
 #else
-	memcpyl (CONSOLE_ROW_FIRST, CONSOLE_ROW_SECOND,
-		 CONSOLE_SCROLL_SIZE >> 2);
+	memcpyl(CONSOLE_ROW_FIRST, CONSOLE_ROW_SECOND,
+		CONSOLE_SCROLL_SIZE >> 2);
 #endif
 
 	/* clear the last one */
 #ifdef VIDEO_HW_RECTFILL
-	video_hw_rectfill (VIDEO_PIXEL_SIZE,	/* bytes per pixel */
-			   0,	/* dest pos x */
-			   VIDEO_VISIBLE_ROWS - VIDEO_FONT_HEIGHT,	/* dest pos y */
-			   VIDEO_VISIBLE_COLS,	/* frame width */
-			   VIDEO_FONT_HEIGHT,	/* frame height */
-			   CONSOLE_BG_COL	/* fill color */
+	video_hw_rectfill(VIDEO_PIXEL_SIZE,	/* bytes per pixel */
+			  0,			/* dest pos x */
+			  VIDEO_VISIBLE_ROWS
+			  - VIDEO_FONT_HEIGHT,	/* dest pos y */
+			  VIDEO_VISIBLE_COLS,	/* frame width */
+			  VIDEO_FONT_HEIGHT,	/* frame height */
+			  CONSOLE_BG_COL	/* fill color */
 		);
 #else
-	memsetl (CONSOLE_ROW_LAST, CONSOLE_ROW_SIZE >> 2, CONSOLE_BG_COL);
+	memsetl(CONSOLE_ROW_LAST, CONSOLE_ROW_SIZE >> 2, CONSOLE_BG_COL);
 #endif
 }
 
-/*****************************************************************************/
-
-static void console_back (void)
+static void console_back(void)
 {
 	CURSOR_OFF;
 	console_col--;
@@ -661,14 +726,11 @@
 		if (console_row < 0)
 			console_row = 0;
 	}
-	video_putchar (console_col * VIDEO_FONT_WIDTH,
-		       console_row * VIDEO_FONT_HEIGHT,
-		       ' ');
+	video_putchar(console_col * VIDEO_FONT_WIDTH,
+		      console_row * VIDEO_FONT_HEIGHT, ' ');
 }
 
-/*****************************************************************************/
-
-static void console_newline (void)
+static void console_newline(void)
 {
 	/* Check if last character in the line was just drawn. If so, cursor was
 	   overwriten and need not to be cleared. Cursor clearing without this
@@ -683,33 +745,31 @@
 	/* Check if we need to scroll the terminal */
 	if (console_row >= CONSOLE_ROWS) {
 		/* Scroll everything up */
-		console_scrollup ();
+		console_scrollup();
 
 		/* Decrement row number */
 		console_row--;
 	}
 }
 
-static void console_cr (void)
+static void console_cr(void)
 {
 	CURSOR_OFF;
 	console_col = 0;
 }
 
-/*****************************************************************************/
-
-void video_putc (const char c)
+void video_putc(const char c)
 {
 	static int nl = 1;
 
 	switch (c) {
 	case 13:		/* back to first column */
-		console_cr ();
+		console_cr();
 		break;
 
 	case '\n':		/* next line */
 		if (console_col || (!console_col && nl))
-			console_newline ();
+			console_newline();
 		nl = 1;
 		break;
 
@@ -719,52 +779,47 @@
 		console_col &= ~0x0007;
 
 		if (console_col >= CONSOLE_COLS)
-			console_newline ();
+			console_newline();
 		break;
 
 	case 8:		/* backspace */
-		console_back ();
+		console_back();
 		break;
 
 	default:		/* draw the char */
-		video_putchar (console_col * VIDEO_FONT_WIDTH,
-			       console_row * VIDEO_FONT_HEIGHT,
-			       c);
+		video_putchar(console_col * VIDEO_FONT_WIDTH,
+			      console_row * VIDEO_FONT_HEIGHT, c);
 		console_col++;
 
 		/* check for newline */
 		if (console_col >= CONSOLE_COLS) {
-			console_newline ();
+			console_newline();
 			nl = 0;
 		}
 	}
 	CURSOR_SET;
 }
 
-
-/*****************************************************************************/
-
-void video_puts (const char *s)
+void video_puts(const char *s)
 {
-	int count = strlen (s);
+	int count = strlen(s);
 
 	while (count--)
-		video_putc (*s++);
+		video_putc(*s++);
 }
 
-/*****************************************************************************/
-
 /*
  * Do not enforce drivers (or board code) to provide empty
  * video_set_lut() if they do not support 8 bpp format.
  * Implement weak default function instead.
  */
-void __video_set_lut (unsigned int index, unsigned char r,
-		      unsigned char g, unsigned char b)
+void __video_set_lut(unsigned int index, unsigned char r,
+		     unsigned char g, unsigned char b)
 {
 }
-void video_set_lut (unsigned int, unsigned char, unsigned char, unsigned char)
-			__attribute__((weak, alias("__video_set_lut")));
+
+void video_set_lut(unsigned int, unsigned char, unsigned char, unsigned char)
+	__attribute__ ((weak, alias("__video_set_lut")));
 
 #if defined(CONFIG_CMD_BMP) || defined(CONFIG_SPLASH_SCREEN)
 
@@ -774,17 +829,26 @@
 }
 
 #define FILL_15BIT_555RGB(r,g,b) {			\
-	*(unsigned short *)fb = SWAP16((unsigned short)(((r>>3)<<10) | ((g>>3)<<5) | (b>>3))); \
+	*(unsigned short *)fb =				\
+		SWAP16((unsigned short)(((r>>3)<<10) |	\
+					((g>>3)<<5)  |	\
+					 (b>>3)));	\
 	fb += 2;					\
 }
 
 #define FILL_16BIT_565RGB(r,g,b) {			\
-	*(unsigned short *)fb = SWAP16((unsigned short)((((r)>>3)<<11) | (((g)>>2)<<5) | ((b)>>3))); \
+	*(unsigned short *)fb =				\
+		SWAP16((unsigned short)((((r)>>3)<<11)| \
+					(((g)>>2)<<5) | \
+					 ((b)>>3)));	\
 	fb += 2;					\
 }
 
 #define FILL_32BIT_X888RGB(r,g,b) {			\
-	*(unsigned long *)fb = SWAP32((unsigned long)(((r<<16) | (g<<8) | b))); \
+	*(unsigned long *)fb =				\
+		SWAP32((unsigned long)(((r<<16) |	\
+					(g<<8)  |	\
+					 b)));		\
 	fb += 4;					\
 }
 
@@ -805,13 +869,12 @@
 #endif
 
 #if defined(VIDEO_FB_16BPP_PIXEL_SWAP)
-static void inline fill_555rgb_pswap(uchar *fb, int x,
-				     u8 r, u8 g, u8 b)
+static inline void fill_555rgb_pswap(uchar *fb, int x, u8 r, u8 g, u8 b)
 {
-	ushort *dst = (ushort *)fb;
-	ushort color = (ushort)(((r >> 3) << 10) |
-				((g >> 3) << 5) |
-				(b >> 3));
+	ushort *dst = (ushort *) fb;
+	ushort color = (ushort) (((r >> 3) << 10) |
+				 ((g >> 3) <<  5) |
+				  (b >> 3));
 	if (x & 1)
 		*(--dst) = color;
 	else
@@ -827,18 +890,18 @@
 /* Pre-calculated color table entry */
 struct palette {
 	union {
-		unsigned short	w;	/* word */
-		unsigned int	dw;	/* double word */
-	} ce; /* color entry */
+		unsigned short w;	/* word */
+		unsigned int dw;	/* double word */
+	} ce;				/* color entry */
 };
 
 /*
  * Helper to draw encoded/unencoded run.
  */
-static void draw_bitmap (uchar **fb, uchar *bm, struct palette *p,
-			 int cnt, int enc)
+static void draw_bitmap(uchar **fb, uchar *bm, struct palette *p,
+			int cnt, int enc)
 {
-	ulong addr = (ulong)*fb;
+	ulong addr = (ulong) *fb;
 	int *off;
 	int enc_off = 1;
 	int i;
@@ -852,28 +915,28 @@
 	switch (VIDEO_DATA_FORMAT) {
 	case GDF__8BIT_INDEX:
 		for (i = 0; i < cnt; i++)
-			*(unsigned char *)addr++ = bm[*off];
+			*(unsigned char *) addr++ = bm[*off];
 		break;
 	case GDF_15BIT_555RGB:
 	case GDF_16BIT_565RGB:
 		/* differences handled while pre-calculating palette */
 		for (i = 0; i < cnt; i++) {
-			*(unsigned short *)addr = p[bm[*off]].ce.w;
+			*(unsigned short *) addr = p[bm[*off]].ce.w;
 			addr += 2;
 		}
 		break;
 	case GDF_32BIT_X888RGB:
 		for (i = 0; i < cnt; i++) {
-			*(unsigned long *)addr = p[bm[*off]].ce.dw;
+			*(unsigned long *) addr = p[bm[*off]].ce.dw;
 			addr += 4;
 		}
 		break;
 	}
-	*fb = (uchar *)addr; /* return modified address */
+	*fb = (uchar *) addr;	/* return modified address */
 }
 
-static int display_rle8_bitmap (bmp_image_t *img, int xoff, int yoff,
-				int width, int height)
+static int display_rle8_bitmap(bmp_image_t *img, int xoff, int yoff,
+			       int width, int height)
 {
 	unsigned char *bm;
 	unsigned char *fbp;
@@ -890,17 +953,17 @@
 	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 +
-				(((y + yoff) * VIDEO_COLS) + xoff) * bpp);
+	fbp = (unsigned char *) ((unsigned int) video_fb_address +
+				 (((y + yoff) * VIDEO_COLS) + xoff) * bpp);
 
-	bm = (uchar *)img + __le32_to_cpu(img->header.data_offset);
+	bm = (uchar *) img + __le32_to_cpu(img->header.data_offset);
 
 	/* pre-calculate and setup palette */
 	switch (VIDEO_DATA_FORMAT) {
 	case GDF__8BIT_INDEX:
 		for (i = 0; i < ncolors; i++) {
 			cte = img->color_table[i];
-			video_set_lut (i, cte.red, cte.green, cte.blue);
+			video_set_lut(i, cte.red, cte.green, cte.blue);
 		}
 		break;
 	case GDF_15BIT_555RGB:
@@ -923,13 +986,14 @@
 	case GDF_32BIT_X888RGB:
 		for (i = 0; i < ncolors; i++) {
 			cte = img->color_table[i];
-			p[i].ce.dw = SWAP32((cte.red << 16) | (cte.green << 8) |
+			p[i].ce.dw = SWAP32((cte.red << 16) |
+					    (cte.green << 8) |
 					     cte.blue);
 		}
 		break;
 	default:
 		printf("RLE Bitmap unsupported in video mode 0x%x\n",
-			VIDEO_DATA_FORMAT);
+		       VIDEO_DATA_FORMAT);
 		return -1;
 	}
 
@@ -943,7 +1007,7 @@
 				x = 0;
 				y--;
 				fbp = (unsigned char *)
-					((unsigned int)video_fb_address +
+					((unsigned int) video_fb_address +
 					 (((y + yoff) * VIDEO_COLS) +
 					  xoff) * bpp);
 				continue;
@@ -956,7 +1020,7 @@
 				x += bm[2];
 				y -= bm[3];
 				fbp = (unsigned char *)
-					((unsigned int)video_fb_address +
+					((unsigned int) video_fb_address +
 					 (((y + yoff) * VIDEO_COLS) +
 					  x + xoff) * bpp);
 				bm += 4;
@@ -977,13 +1041,13 @@
 					}
 					if (x + runlen > width)
 						cnt = width - x;
-					draw_bitmap (&fbp, bm, p, cnt, 0);
+					draw_bitmap(&fbp, bm, p, cnt, 0);
 					x += runlen;
 				}
 next_run:
 				bm += runlen;
 				if (runlen & 1)
-					bm++; /* 0 padding if length is odd */
+					bm++;	/* 0 padding if length is odd */
 			}
 			break;
 		default:
@@ -994,7 +1058,7 @@
 			if (pixels > limit)
 				goto error;
 
-			if (y < height) { /* only draw into visible area */
+			if (y < height) {     /* only draw into visible area */
 				if (x >= width) {
 					x += runlen;
 					bm += 2;
@@ -1002,7 +1066,7 @@
 				}
 				if (x + runlen > width)
 					cnt = width - x;
-				draw_bitmap (&fbp, bm, p, cnt, 1);
+				draw_bitmap(&fbp, bm, p, cnt, 1);
 				x += runlen;
 			}
 			bm += 2;
@@ -1019,7 +1083,7 @@
 /*
  * Display the BMP file located at address bmp_image.
  */
-int video_display_bitmap (ulong bmp_image, int x, int y)
+int video_display_bitmap(ulong bmp_image, int x, int y)
 {
 	ushort xcount, ycount;
 	uchar *fb;
@@ -1030,12 +1094,13 @@
 	unsigned colors;
 	unsigned long compression;
 	bmp_color_table_entry_t cte;
+
 #ifdef CONFIG_VIDEO_BMP_GZIP
 	unsigned char *dst = NULL;
 	ulong len;
 #endif
 
-	WATCHDOG_RESET ();
+	WATCHDOG_RESET();
 
 	if (!((bmp->header.signature[0] == 'B') &&
 	      (bmp->header.signature[1] == 'M'))) {
@@ -1048,50 +1113,55 @@
 		dst = malloc(CONFIG_SYS_VIDEO_LOGO_MAX_SIZE);
 		if (dst == NULL) {
 			printf("Error: malloc in gunzip failed!\n");
-			return(1);
+			return 1;
 		}
-		if (gunzip(dst, CONFIG_SYS_VIDEO_LOGO_MAX_SIZE, (uchar *)bmp_image, &len) != 0) {
-			printf ("Error: no valid bmp or bmp.gz image at %lx\n", bmp_image);
+		if (gunzip(dst, CONFIG_SYS_VIDEO_LOGO_MAX_SIZE,
+			   (uchar *) bmp_image,
+			   &len) != 0) {
+			printf("Error: no valid bmp or bmp.gz image at %lx\n",
+			       bmp_image);
 			free(dst);
 			return 1;
 		}
 		if (len == CONFIG_SYS_VIDEO_LOGO_MAX_SIZE) {
-			printf("Image could be truncated (increase CONFIG_SYS_VIDEO_LOGO_MAX_SIZE)!\n");
+			printf("Image could be truncated "
+				"(increase CONFIG_SYS_VIDEO_LOGO_MAX_SIZE)!\n");
 		}
 
 		/*
 		 * Set addr to decompressed image
 		 */
-		bmp = (bmp_image_t *)dst;
+		bmp = (bmp_image_t *) dst;
 
 		if (!((bmp->header.signature[0] == 'B') &&
 		      (bmp->header.signature[1] == 'M'))) {
-			printf ("Error: no valid bmp.gz image at %lx\n", bmp_image);
+			printf("Error: no valid bmp.gz image at %lx\n",
+			       bmp_image);
 			free(dst);
 			return 1;
 		}
 #else
-		printf ("Error: no valid bmp image at %lx\n", bmp_image);
+		printf("Error: no valid bmp image at %lx\n", bmp_image);
 		return 1;
 #endif /* CONFIG_VIDEO_BMP_GZIP */
 	}
 
-	width = le32_to_cpu (bmp->header.width);
-	height = le32_to_cpu (bmp->header.height);
-	bpp = le16_to_cpu (bmp->header.bit_count);
-	colors = le32_to_cpu (bmp->header.colors_used);
-	compression = le32_to_cpu (bmp->header.compression);
+	width = le32_to_cpu(bmp->header.width);
+	height = le32_to_cpu(bmp->header.height);
+	bpp = le16_to_cpu(bmp->header.bit_count);
+	colors = le32_to_cpu(bmp->header.colors_used);
+	compression = le32_to_cpu(bmp->header.compression);
 
-	debug ("Display-bmp: %d x %d  with %d colors\n",
-	       width, height, colors);
+	debug("Display-bmp: %d x %d  with %d colors\n",
+	      width, height, colors);
 
 	if (compression != BMP_BI_RGB
 #ifdef CONFIG_VIDEO_BMP_RLE8
 	    && compression != BMP_BI_RLE8
 #endif
-	   ) {
-		printf ("Error: compression type %ld not supported\n",
-			compression);
+		) {
+		printf("Error: compression type %ld not supported\n",
+		       compression);
 #ifdef CONFIG_VIDEO_BMP_GZIP
 		if (dst)
 			free(dst);
@@ -1118,20 +1188,19 @@
 	if ((y + height) > VIDEO_VISIBLE_ROWS)
 		height = VIDEO_VISIBLE_ROWS - y;
 
-	bmap = (uchar *) bmp + le32_to_cpu (bmp->header.data_offset);
+	bmap = (uchar *) bmp + le32_to_cpu(bmp->header.data_offset);
 	fb = (uchar *) (video_fb_address +
 			((y + height - 1) * VIDEO_COLS * VIDEO_PIXEL_SIZE) +
 			x * VIDEO_PIXEL_SIZE);
 
 #ifdef CONFIG_VIDEO_BMP_RLE8
 	if (compression == BMP_BI_RLE8) {
-		return display_rle8_bitmap(bmp,
-					   x, y, width, height);
+		return display_rle8_bitmap(bmp, x, y, width, height);
 	}
 #endif
 
 	/* We handle only 4, 8, or 24 bpp bitmaps */
-	switch (le16_to_cpu (bmp->header.bit_count)) {
+	switch (le16_to_cpu(bmp->header.bit_count)) {
 	case 4:
 		padded_line -= width / 2;
 		ycount = height;
@@ -1139,7 +1208,7 @@
 		switch (VIDEO_DATA_FORMAT) {
 		case GDF_32BIT_X888RGB:
 			while (ycount--) {
-				WATCHDOG_RESET ();
+				WATCHDOG_RESET();
 				/*
 				 * Don't assume that 'width' is an
 				 * even number
@@ -1158,7 +1227,7 @@
 				}
 				bmap += padded_line;
 				fb -= (VIDEO_VISIBLE_COLS + width) *
-				      VIDEO_PIXEL_SIZE;
+					VIDEO_PIXEL_SIZE;
 			}
 			break;
 		default:
@@ -1174,32 +1243,36 @@
 			/* Copy colormap */
 			for (xcount = 0; xcount < colors; ++xcount) {
 				cte = bmp->color_table[xcount];
-				video_set_lut (xcount, cte.red, cte.green, cte.blue);
+				video_set_lut(xcount, cte.red, cte.green,
+					      cte.blue);
 			}
 		}
 		ycount = height;
 		switch (VIDEO_DATA_FORMAT) {
 		case GDF__8BIT_INDEX:
 			while (ycount--) {
-				WATCHDOG_RESET ();
+				WATCHDOG_RESET();
 				xcount = width;
 				while (xcount--) {
 					*fb++ = *bmap++;
 				}
 				bmap += padded_line;
-				fb -= (VIDEO_VISIBLE_COLS + width) * VIDEO_PIXEL_SIZE;
+				fb -= (VIDEO_VISIBLE_COLS + width) *
+							VIDEO_PIXEL_SIZE;
 			}
 			break;
 		case GDF__8BIT_332RGB:
 			while (ycount--) {
-				WATCHDOG_RESET ();
+				WATCHDOG_RESET();
 				xcount = width;
 				while (xcount--) {
 					cte = bmp->color_table[*bmap++];
-					FILL_8BIT_332RGB (cte.red, cte.green, cte.blue);
+					FILL_8BIT_332RGB(cte.red, cte.green,
+							 cte.blue);
 				}
 				bmap += padded_line;
-				fb -= (VIDEO_VISIBLE_COLS + width) * VIDEO_PIXEL_SIZE;
+				fb -= (VIDEO_VISIBLE_COLS + width) *
+							VIDEO_PIXEL_SIZE;
 			}
 			break;
 		case GDF_15BIT_555RGB:
@@ -1207,56 +1280,65 @@
 #if defined(VIDEO_FB_16BPP_PIXEL_SWAP)
 				int xpos = x;
 #endif
-				WATCHDOG_RESET ();
+				WATCHDOG_RESET();
 				xcount = width;
 				while (xcount--) {
 					cte = bmp->color_table[*bmap++];
 #if defined(VIDEO_FB_16BPP_PIXEL_SWAP)
-					fill_555rgb_pswap (fb, xpos++, cte.red,
-							   cte.green, cte.blue);
+					fill_555rgb_pswap(fb, xpos++, cte.red,
+							  cte.green,
+							  cte.blue);
 					fb += 2;
 #else
-					FILL_15BIT_555RGB (cte.red, cte.green, cte.blue);
+					FILL_15BIT_555RGB(cte.red, cte.green,
+							  cte.blue);
 #endif
 				}
 				bmap += padded_line;
-				fb -= (VIDEO_VISIBLE_COLS + width) * VIDEO_PIXEL_SIZE;
+				fb -= (VIDEO_VISIBLE_COLS + width) *
+							VIDEO_PIXEL_SIZE;
 			}
 			break;
 		case GDF_16BIT_565RGB:
 			while (ycount--) {
-				WATCHDOG_RESET ();
+				WATCHDOG_RESET();
 				xcount = width;
 				while (xcount--) {
 					cte = bmp->color_table[*bmap++];
-					FILL_16BIT_565RGB (cte.red, cte.green, cte.blue);
+					FILL_16BIT_565RGB(cte.red, cte.green,
+							  cte.blue);
 				}
 				bmap += padded_line;
-				fb -= (VIDEO_VISIBLE_COLS + width) * VIDEO_PIXEL_SIZE;
+				fb -= (VIDEO_VISIBLE_COLS + width) *
+							VIDEO_PIXEL_SIZE;
 			}
 			break;
 		case GDF_32BIT_X888RGB:
 			while (ycount--) {
-				WATCHDOG_RESET ();
+				WATCHDOG_RESET();
 				xcount = width;
 				while (xcount--) {
 					cte = bmp->color_table[*bmap++];
-					FILL_32BIT_X888RGB (cte.red, cte.green, cte.blue);
+					FILL_32BIT_X888RGB(cte.red, cte.green,
+							   cte.blue);
 				}
 				bmap += padded_line;
-				fb -= (VIDEO_VISIBLE_COLS + width) * VIDEO_PIXEL_SIZE;
+				fb -= (VIDEO_VISIBLE_COLS + width) *
+							VIDEO_PIXEL_SIZE;
 			}
 			break;
 		case GDF_24BIT_888RGB:
 			while (ycount--) {
-				WATCHDOG_RESET ();
+				WATCHDOG_RESET();
 				xcount = width;
 				while (xcount--) {
 					cte = bmp->color_table[*bmap++];
-					FILL_24BIT_888RGB (cte.red, cte.green, cte.blue);
+					FILL_24BIT_888RGB(cte.red, cte.green,
+							  cte.blue);
 				}
 				bmap += padded_line;
-				fb -= (VIDEO_VISIBLE_COLS + width) * VIDEO_PIXEL_SIZE;
+				fb -= (VIDEO_VISIBLE_COLS + width) *
+							VIDEO_PIXEL_SIZE;
 			}
 			break;
 		}
@@ -1267,14 +1349,16 @@
 		switch (VIDEO_DATA_FORMAT) {
 		case GDF__8BIT_332RGB:
 			while (ycount--) {
-				WATCHDOG_RESET ();
+				WATCHDOG_RESET();
 				xcount = width;
 				while (xcount--) {
-					FILL_8BIT_332RGB (bmap[2], bmap[1], bmap[0]);
+					FILL_8BIT_332RGB(bmap[2], bmap[1],
+							 bmap[0]);
 					bmap += 3;
 				}
 				bmap += padded_line;
-				fb -= (VIDEO_VISIBLE_COLS + width) * VIDEO_PIXEL_SIZE;
+				fb -= (VIDEO_VISIBLE_COLS + width) *
+							VIDEO_PIXEL_SIZE;
 			}
 			break;
 		case GDF_15BIT_555RGB:
@@ -1282,66 +1366,75 @@
 #if defined(VIDEO_FB_16BPP_PIXEL_SWAP)
 				int xpos = x;
 #endif
-				WATCHDOG_RESET ();
+				WATCHDOG_RESET();
 				xcount = width;
 				while (xcount--) {
 #if defined(VIDEO_FB_16BPP_PIXEL_SWAP)
-					fill_555rgb_pswap (fb, xpos++, bmap[2],
-							   bmap[1], bmap[0]);
+					fill_555rgb_pswap(fb, xpos++, bmap[2],
+							  bmap[1], bmap[0]);
 					fb += 2;
 #else
-					FILL_15BIT_555RGB (bmap[2], bmap[1], bmap[0]);
+					FILL_15BIT_555RGB(bmap[2], bmap[1],
+							  bmap[0]);
 #endif
 					bmap += 3;
 				}
 				bmap += padded_line;
-				fb -= (VIDEO_VISIBLE_COLS + width) * VIDEO_PIXEL_SIZE;
+				fb -= (VIDEO_VISIBLE_COLS + width) *
+							VIDEO_PIXEL_SIZE;
 			}
 			break;
 		case GDF_16BIT_565RGB:
 			while (ycount--) {
-				WATCHDOG_RESET ();
+				WATCHDOG_RESET();
 				xcount = width;
 				while (xcount--) {
-					FILL_16BIT_565RGB (bmap[2], bmap[1], bmap[0]);
+					FILL_16BIT_565RGB(bmap[2], bmap[1],
+							  bmap[0]);
 					bmap += 3;
 				}
 				bmap += padded_line;
-				fb -= (VIDEO_VISIBLE_COLS + width) * VIDEO_PIXEL_SIZE;
+				fb -= (VIDEO_VISIBLE_COLS + width) *
+							VIDEO_PIXEL_SIZE;
 			}
 			break;
 		case GDF_32BIT_X888RGB:
 			while (ycount--) {
-				WATCHDOG_RESET ();
+				WATCHDOG_RESET();
 				xcount = width;
 				while (xcount--) {
-					FILL_32BIT_X888RGB (bmap[2], bmap[1], bmap[0]);
+					FILL_32BIT_X888RGB(bmap[2], bmap[1],
+							   bmap[0]);
 					bmap += 3;
 				}
 				bmap += padded_line;
-				fb -= (VIDEO_VISIBLE_COLS + width) * VIDEO_PIXEL_SIZE;
+				fb -= (VIDEO_VISIBLE_COLS + width) *
+							VIDEO_PIXEL_SIZE;
 			}
 			break;
 		case GDF_24BIT_888RGB:
 			while (ycount--) {
-				WATCHDOG_RESET ();
+				WATCHDOG_RESET();
 				xcount = width;
 				while (xcount--) {
-					FILL_24BIT_888RGB (bmap[2], bmap[1], bmap[0]);
+					FILL_24BIT_888RGB(bmap[2], bmap[1],
+							  bmap[0]);
 					bmap += 3;
 				}
 				bmap += padded_line;
-				fb -= (VIDEO_VISIBLE_COLS + width) * VIDEO_PIXEL_SIZE;
+				fb -= (VIDEO_VISIBLE_COLS + width) *
+							VIDEO_PIXEL_SIZE;
 			}
 			break;
 		default:
-			printf ("Error: 24 bits/pixel bitmap incompatible with current video mode\n");
+			printf("Error: 24 bits/pixel bitmap incompatible "
+				"with current video mode\n");
 			break;
 		}
 		break;
 	default:
-		printf ("Error: %d bit/pixel bitmaps not supported by U-Boot\n",
-			le16_to_cpu (bmp->header.bit_count));
+		printf("Error: %d bit/pixel bitmaps not supported by U-Boot\n",
+			le16_to_cpu(bmp->header.bit_count));
 		break;
 	}
 
@@ -1355,28 +1448,26 @@
 }
 #endif
 
-/*****************************************************************************/
 
 #ifdef CONFIG_VIDEO_LOGO
-void logo_plot (void *screen, int width, int x, int y)
+void logo_plot(void *screen, int width, int x, int y)
 {
 
 	int xcount, i;
-	int skip   = (width - VIDEO_LOGO_WIDTH) * VIDEO_PIXEL_SIZE;
+	int skip = (width - VIDEO_LOGO_WIDTH) * VIDEO_PIXEL_SIZE;
 	int ycount = video_logo_height;
 	unsigned char r, g, b, *logo_red, *logo_blue, *logo_green;
 	unsigned char *source;
-	unsigned char *dest = (unsigned char *)screen +
-			      ((y * width * VIDEO_PIXEL_SIZE) +
-			       x * VIDEO_PIXEL_SIZE);
+	unsigned char *dest = (unsigned char *) screen +
+		((y * width * VIDEO_PIXEL_SIZE) + x * VIDEO_PIXEL_SIZE);
 
 #ifdef CONFIG_VIDEO_BMP_LOGO
 	source = bmp_logo_bitmap;
 
 	/* Allocate temporary space for computing colormap */
-	logo_red = malloc (BMP_LOGO_COLORS);
-	logo_green = malloc (BMP_LOGO_COLORS);
-	logo_blue = malloc (BMP_LOGO_COLORS);
+	logo_red = malloc(BMP_LOGO_COLORS);
+	logo_green = malloc(BMP_LOGO_COLORS);
+	logo_blue = malloc(BMP_LOGO_COLORS);
 	/* Compute color map */
 	for (i = 0; i < VIDEO_LOGO_COLORS; i++) {
 		logo_red[i] = (bmp_logo_palette[i] & 0x0f00) >> 4;
@@ -1392,8 +1483,9 @@
 
 	if (VIDEO_DATA_FORMAT == GDF__8BIT_INDEX) {
 		for (i = 0; i < VIDEO_LOGO_COLORS; i++) {
-			video_set_lut (i + VIDEO_LOGO_LUT_OFFSET,
-				       logo_red[i], logo_green[i], logo_blue[i]);
+			video_set_lut(i + VIDEO_LOGO_LUT_OFFSET,
+				      logo_red[i], logo_green[i],
+				      logo_blue[i]);
 		}
 	}
 
@@ -1412,23 +1504,34 @@
 				*dest = *source;
 				break;
 			case GDF__8BIT_332RGB:
-				*dest = ((r >> 5) << 5) | ((g >> 5) << 2) | (b >> 6);
+				*dest = ((r >> 5) << 5) |
+					((g >> 5) << 2) |
+					 (b >> 6);
 				break;
 			case GDF_15BIT_555RGB:
 #if defined(VIDEO_FB_16BPP_PIXEL_SWAP)
-				fill_555rgb_pswap (dest, xpos++, r, g, b);
+				fill_555rgb_pswap(dest, xpos++, r, g, b);
 #else
 				*(unsigned short *) dest =
-					SWAP16 ((unsigned short) (((r >> 3) << 10) | ((g >> 3) << 5) | (b >> 3)));
+					SWAP16((unsigned short) (
+							((r >> 3) << 10) |
+							((g >> 3) <<  5) |
+							 (b >> 3)));
 #endif
 				break;
 			case GDF_16BIT_565RGB:
 				*(unsigned short *) dest =
-					SWAP16 ((unsigned short) (((r >> 3) << 11) | ((g >> 2) << 5) | (b >> 3)));
+					SWAP16((unsigned short) (
+							((r >> 3) << 11) |
+							((g >> 2) <<  5) |
+							 (b >> 3)));
 				break;
 			case GDF_32BIT_X888RGB:
 				*(unsigned long *) dest =
-					SWAP32 ((unsigned long) ((r << 16) | (g << 8) | b));
+					SWAP32((unsigned long) (
+							(r << 16) |
+							(g <<  8) |
+							 b));
 				break;
 			case GDF_24BIT_888RGB:
 #ifdef VIDEO_FB_LITTLE_ENDIAN
@@ -1448,15 +1551,13 @@
 		dest += skip;
 	}
 #ifdef CONFIG_VIDEO_BMP_LOGO
-	free (logo_red);
-	free (logo_green);
-	free (logo_blue);
+	free(logo_red);
+	free(logo_green);
+	free(logo_blue);
 #endif
 }
 
-/*****************************************************************************/
-
-static void *video_logo (void)
+static void *video_logo(void)
 {
 	char info[128];
 	int space, len, y_off = 0;
@@ -1465,76 +1566,82 @@
 	char *s;
 	ulong addr;
 
-	if ((s = getenv ("splashimage")) != NULL) {
+	if ((s = getenv("splashimage")) != NULL) {
 		int x = 0, y = 0;
 
-		addr = simple_strtoul (s, NULL, 16);
+		addr = simple_strtoul(s, NULL, 16);
 #ifdef CONFIG_SPLASH_SCREEN_ALIGN
-		if ((s = getenv ("splashpos")) != NULL) {
+		if ((s = getenv("splashpos")) != NULL) {
 			if (s[0] == 'm')
 				x = BMP_ALIGN_CENTER;
 			else
-				x = simple_strtol (s, NULL, 0);
+				x = simple_strtol(s, NULL, 0);
 
-			if ((s = strchr (s + 1, ',')) != NULL) {
+			if ((s = strchr(s + 1, ',')) != NULL) {
 				if (s[1] == 'm')
 					y = BMP_ALIGN_CENTER;
 				else
-					y = simple_strtol (s + 1, NULL, 0);
+					y = simple_strtol(s + 1, NULL, 0);
 			}
 		}
 #endif /* CONFIG_SPLASH_SCREEN_ALIGN */
 
-		if (video_display_bitmap (addr, x, y) == 0) {
+		if (video_display_bitmap(addr, x, y) == 0) {
 			video_logo_height = 0;
 			return ((void *) (video_fb_address));
 		}
 	}
 #endif /* CONFIG_SPLASH_SCREEN */
 
-	logo_plot (video_fb_address, VIDEO_COLS, 0, 0);
+	logo_plot(video_fb_address, VIDEO_COLS, 0, 0);
 
-	sprintf (info, " %s", version_string);
+	sprintf(info, " %s", version_string);
 
 	space = (VIDEO_LINE_LEN / 2 - VIDEO_INFO_X) / VIDEO_FONT_WIDTH;
 	len = strlen(info);
 
 	if (len > space) {
-		video_drawchars (VIDEO_INFO_X, VIDEO_INFO_Y,
-				 (uchar *)info, space);
-		video_drawchars (VIDEO_INFO_X + VIDEO_FONT_WIDTH,
-				 VIDEO_INFO_Y + VIDEO_FONT_HEIGHT,
-				 (uchar *)info + space, len - space);
+		video_drawchars(VIDEO_INFO_X, VIDEO_INFO_Y,
+				(uchar *) info, space);
+		video_drawchars(VIDEO_INFO_X + VIDEO_FONT_WIDTH,
+				VIDEO_INFO_Y + VIDEO_FONT_HEIGHT,
+				(uchar *) info + space, len - space);
 		y_off = 1;
 	} else
-		video_drawstring (VIDEO_INFO_X, VIDEO_INFO_Y, (uchar *)info);
+		video_drawstring(VIDEO_INFO_X, VIDEO_INFO_Y, (uchar *) info);
 
 #ifdef CONFIG_CONSOLE_EXTRA_INFO
 	{
-		int i, n = ((video_logo_height - VIDEO_FONT_HEIGHT) / VIDEO_FONT_HEIGHT);
+		int i, n =
+			((video_logo_height -
+			  VIDEO_FONT_HEIGHT) / VIDEO_FONT_HEIGHT);
 
 		for (i = 1; i < n; i++) {
-			video_get_info_str (i, info);
+			video_get_info_str(i, info);
 			if (!*info)
 				continue;
 
 			len = strlen(info);
 			if (len > space) {
-				video_drawchars (VIDEO_INFO_X,
-						 VIDEO_INFO_Y +
-						 (i + y_off) * VIDEO_FONT_HEIGHT,
-						 (uchar *)info, space);
+				video_drawchars(VIDEO_INFO_X,
+						VIDEO_INFO_Y +
+						(i + y_off) *
+							VIDEO_FONT_HEIGHT,
+						(uchar *) info, space);
 				y_off++;
-				video_drawchars (VIDEO_INFO_X + VIDEO_FONT_WIDTH,
-						 VIDEO_INFO_Y +
-						 (i + y_off) * VIDEO_FONT_HEIGHT,
-						 (uchar *)info + space,
-						 len - space);
+				video_drawchars(VIDEO_INFO_X +
+						VIDEO_FONT_WIDTH,
+						VIDEO_INFO_Y +
+							(i + y_off) *
+							VIDEO_FONT_HEIGHT,
+						(uchar *) info + space,
+						len - space);
 			} else {
-				video_drawstring (VIDEO_INFO_X,
-						  VIDEO_INFO_Y +
-						  (i + y_off) * VIDEO_FONT_HEIGHT,
-						  (uchar *)info);
+				video_drawstring(VIDEO_INFO_X,
+						 VIDEO_INFO_Y +
+						 (i + y_off) *
+							VIDEO_FONT_HEIGHT,
+						 (uchar *) info);
 			}
 		}
 	}
@@ -1544,74 +1651,93 @@
 }
 #endif
 
-
-/*****************************************************************************/
-
-static int video_init (void)
+static int video_init(void)
 {
 	unsigned char color8;
 
-	if ((pGD = video_hw_init ()) == NULL)
+	if ((pGD = video_hw_init()) == NULL)
 		return -1;
 
 	video_fb_address = (void *) VIDEO_FB_ADRS;
 #ifdef CONFIG_VIDEO_HW_CURSOR
-	video_init_hw_cursor (VIDEO_FONT_WIDTH, VIDEO_FONT_HEIGHT);
+	video_init_hw_cursor(VIDEO_FONT_WIDTH, VIDEO_FONT_HEIGHT);
 #endif
 
 	/* Init drawing pats */
 	switch (VIDEO_DATA_FORMAT) {
 	case GDF__8BIT_INDEX:
-		video_set_lut (0x01, CONSOLE_FG_COL, CONSOLE_FG_COL, CONSOLE_FG_COL);
-		video_set_lut (0x00, CONSOLE_BG_COL, CONSOLE_BG_COL, CONSOLE_BG_COL);
+		video_set_lut(0x01, CONSOLE_FG_COL, CONSOLE_FG_COL,
+			      CONSOLE_FG_COL);
+		video_set_lut(0x00, CONSOLE_BG_COL, CONSOLE_BG_COL,
+			      CONSOLE_BG_COL);
 		fgx = 0x01010101;
 		bgx = 0x00000000;
 		break;
 	case GDF__8BIT_332RGB:
 		color8 = ((CONSOLE_FG_COL & 0xe0) |
-			  ((CONSOLE_FG_COL >> 3) & 0x1c) | CONSOLE_FG_COL >> 6);
-		fgx = (color8 << 24) | (color8 << 16) | (color8 << 8) | color8;
+			  ((CONSOLE_FG_COL >> 3) & 0x1c) |
+			  CONSOLE_FG_COL >> 6);
+		fgx = (color8 << 24) | (color8 << 16) | (color8 << 8) |
+			color8;
 		color8 = ((CONSOLE_BG_COL & 0xe0) |
-			  ((CONSOLE_BG_COL >> 3) & 0x1c) | CONSOLE_BG_COL >> 6);
-		bgx = (color8 << 24) | (color8 << 16) | (color8 << 8) | color8;
+			  ((CONSOLE_BG_COL >> 3) & 0x1c) |
+			  CONSOLE_BG_COL >> 6);
+		bgx = (color8 << 24) | (color8 << 16) | (color8 << 8) |
+			color8;
 		break;
 	case GDF_15BIT_555RGB:
 		fgx = (((CONSOLE_FG_COL >> 3) << 26) |
-		       ((CONSOLE_FG_COL >> 3) << 21) | ((CONSOLE_FG_COL >> 3) << 16) |
-		       ((CONSOLE_FG_COL >> 3) << 10) | ((CONSOLE_FG_COL >> 3) << 5) |
-		       (CONSOLE_FG_COL >> 3));
+		       ((CONSOLE_FG_COL >> 3) << 21) |
+		       ((CONSOLE_FG_COL >> 3) << 16) |
+		       ((CONSOLE_FG_COL >> 3) << 10) |
+		       ((CONSOLE_FG_COL >> 3) <<  5) |
+			(CONSOLE_FG_COL >> 3));
 		bgx = (((CONSOLE_BG_COL >> 3) << 26) |
-		       ((CONSOLE_BG_COL >> 3) << 21) | ((CONSOLE_BG_COL >> 3) << 16) |
-		       ((CONSOLE_BG_COL >> 3) << 10) | ((CONSOLE_BG_COL >> 3) << 5) |
-		       (CONSOLE_BG_COL >> 3));
+		       ((CONSOLE_BG_COL >> 3) << 21) |
+		       ((CONSOLE_BG_COL >> 3) << 16) |
+		       ((CONSOLE_BG_COL >> 3) << 10) |
+		       ((CONSOLE_BG_COL >> 3) <<  5) |
+			(CONSOLE_BG_COL >> 3));
 		break;
 	case GDF_16BIT_565RGB:
 		fgx = (((CONSOLE_FG_COL >> 3) << 27) |
-		       ((CONSOLE_FG_COL >> 2) << 21) | ((CONSOLE_FG_COL >> 3) << 16) |
-		       ((CONSOLE_FG_COL >> 3) << 11) | ((CONSOLE_FG_COL >> 2) << 5) |
-		       (CONSOLE_FG_COL >> 3));
+		       ((CONSOLE_FG_COL >> 2) << 21) |
+		       ((CONSOLE_FG_COL >> 3) << 16) |
+		       ((CONSOLE_FG_COL >> 3) << 11) |
+		       ((CONSOLE_FG_COL >> 2) <<  5) |
+			(CONSOLE_FG_COL >> 3));
 		bgx = (((CONSOLE_BG_COL >> 3) << 27) |
-		       ((CONSOLE_BG_COL >> 2) << 21) | ((CONSOLE_BG_COL >> 3) << 16) |
-		       ((CONSOLE_BG_COL >> 3) << 11) | ((CONSOLE_BG_COL >> 2) << 5) |
-		       (CONSOLE_BG_COL >> 3));
+		       ((CONSOLE_BG_COL >> 2) << 21) |
+		       ((CONSOLE_BG_COL >> 3) << 16) |
+		       ((CONSOLE_BG_COL >> 3) << 11) |
+		       ((CONSOLE_BG_COL >> 2) <<  5) |
+			(CONSOLE_BG_COL >> 3));
 		break;
 	case GDF_32BIT_X888RGB:
-		fgx = (CONSOLE_FG_COL << 16) | (CONSOLE_FG_COL << 8) | CONSOLE_FG_COL;
-		bgx = (CONSOLE_BG_COL << 16) | (CONSOLE_BG_COL << 8) | CONSOLE_BG_COL;
+		fgx =	(CONSOLE_FG_COL << 16) |
+			(CONSOLE_FG_COL <<  8) |
+			 CONSOLE_FG_COL;
+		bgx =	(CONSOLE_BG_COL << 16) |
+			(CONSOLE_BG_COL <<  8) |
+			 CONSOLE_BG_COL;
 		break;
 	case GDF_24BIT_888RGB:
-		fgx = (CONSOLE_FG_COL << 24) | (CONSOLE_FG_COL << 16) |
-			(CONSOLE_FG_COL << 8) | CONSOLE_FG_COL;
-		bgx = (CONSOLE_BG_COL << 24) | (CONSOLE_BG_COL << 16) |
-			(CONSOLE_BG_COL << 8) | CONSOLE_BG_COL;
+		fgx =	(CONSOLE_FG_COL << 24) |
+			(CONSOLE_FG_COL << 16) |
+			(CONSOLE_FG_COL <<  8) |
+			 CONSOLE_FG_COL;
+		bgx =	(CONSOLE_BG_COL << 24) |
+			(CONSOLE_BG_COL << 16) |
+			(CONSOLE_BG_COL <<  8) |
+			 CONSOLE_BG_COL;
 		break;
 	}
 	eorx = fgx ^ bgx;
 
 #ifdef CONFIG_VIDEO_LOGO
 	/* Plot the logo and get start point of console */
-	PRINTD ("Video: Drawing the logo ...\n");
-	video_console_address = video_logo ();
+	PRINTD("Video: Drawing the logo ...\n");
+	video_console_address = video_logo();
 #else
 	video_console_address = video_fb_address;
 #endif
@@ -1623,9 +1749,6 @@
 	return 0;
 }
 
-
-/*****************************************************************************/
-
 /*
  * Implement a weak default function for boards that optionally
  * need to skip the video initialization.
@@ -1635,9 +1758,11 @@
 	/* As default, don't skip test */
 	return 0;
 }
-int board_video_skip(void) __attribute__((weak, alias("__board_video_skip")));
 
-int drv_video_init (void)
+int board_video_skip(void)
+	__attribute__ ((weak, alias("__board_video_skip")));
+
+int drv_video_init(void)
 {
 	int skip_dev_init;
 	struct stdio_dev console_dev;
@@ -1647,10 +1772,10 @@
 		return 0;
 
 	/* Init video chip - returns with framebuffer cleared */
-	skip_dev_init = (video_init () == -1);
+	skip_dev_init = (video_init() == -1);
 
 #if !defined(CONFIG_VGA_AS_SINGLE_DEVICE)
-	PRINTD ("KBD: Keyboard init ...\n");
+	PRINTD("KBD: Keyboard init ...\n");
 	skip_dev_init |= (VIDEO_KBD_INIT_FCT == -1);
 #endif
 
@@ -1658,8 +1783,8 @@
 		return 0;
 
 	/* Init vga device */
-	memset (&console_dev, 0, sizeof (console_dev));
-	strcpy (console_dev.name, "vga");
+	memset(&console_dev, 0, sizeof(console_dev));
+	strcpy(console_dev.name, "vga");
 	console_dev.ext = DEV_EXT_VIDEO;	/* Video extensions */
 	console_dev.flags = DEV_FLAGS_OUTPUT | DEV_FLAGS_SYSTEM;
 	console_dev.putc = video_putc;	/* 'putc' function */
@@ -1674,7 +1799,7 @@
 	console_dev.getc = VIDEO_GETC_FCT;	/* 'getc' function */
 #endif /* CONFIG_VGA_AS_SINGLE_DEVICE */
 
-	if (stdio_register (&console_dev) != 0)
+	if (stdio_register(&console_dev) != 0)
 		return 0;
 
 	/* Return success */
