]> git.sur5r.net Git - u-boot/commitdiff
common/lcd.c: cleanup use of global variables
authorJeroen Hofstee <jeroen@myspectrum.nl>
Tue, 22 Jan 2013 10:44:11 +0000 (10:44 +0000)
committerAnatolij Gustschin <agust@denx.de>
Thu, 21 Mar 2013 09:11:17 +0000 (10:11 +0100)
console_col, console_row, lcd_line_length, lcd_console_address had
to be declared in board / driver specific code, but were not actually
used there on many boards. Get rid of the global variables.

for completeness, the ack of Bo Shen is for the atmel part
Cc: Alessandro Rubini <rubini@unipv.it>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Bo Shen <voice.shen@atmel.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Marek Vasut <marek.vasut@gmail.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Nikita Kiryanov <nikita@compulab.co.il>
Cc: Simon Glass <sjg@chromium.org>
Cc: Stelian Pop <stelian@popies.net>
Cc: Tom Warren <twarren@nvidia.com>
Acked-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
[agust: rebased and fixed cm_t35 board]
Signed-off-by: Anatolij Gustschin <agust@denx.de>
board/cm_t35/display.c
board/mcc200/lcd.c
common/lcd.c
drivers/video/atmel_hlcdfb.c
drivers/video/atmel_lcdfb.c
drivers/video/exynos_fb.c
drivers/video/mpc8xx_lcd.c
drivers/video/pxa_lcd.c
drivers/video/tegra.c
include/lcd.h

index 885c484ccf81c2f5411d25f4ddb33b0fed393b50..d4487f31f5c85ee0bcf88ea8a4f5d051f0a8e127 100644 (file)
@@ -381,11 +381,7 @@ static enum display_type env_parse_displaytype(char *displaytype)
        return NONE;
 }
 
-int lcd_line_length;
 void *lcd_base;
-short console_col;
-short console_row;
-void *lcd_console_address;
 
 void lcd_ctrl_init(void *lcdbase)
 {
index 0f3f585d601301c6f606893225002cde0383de56..caf8d8b110b15d5cbffe92f56841c7d68fa38cc8 100644 (file)
@@ -68,16 +68,10 @@ vidinfo_t panel_info = {
        LCD_WIDTH, LCD_HEIGHT, LCD_BPP
 };
 
-int lcd_line_length;
-
 /*
  * Frame buffer memory information
  */
 void *lcd_base;                        /* Start of framebuffer memory  */
-void *lcd_console_address;     /* Start of console buffer      */
-
-short console_col = 0;
-short console_row = 0;
 
 /*
  *  The device we use to communicate with PSoC
index b09e45fc18ddf7df71432da30d06a5956e1d9be5..874f18220af81c4c6e32e6bba910c4567da8eaec 100644 (file)
@@ -101,9 +101,15 @@ static void lcd_setbgcolor(int color);
 
 static int lcd_color_fg;
 static int lcd_color_bg;
+int lcd_line_length;
 
 char lcd_is_enabled = 0;
 
+static short console_col;
+static short console_row;
+
+static void *lcd_console_address;
+
 static char lcd_flush_dcache;  /* 1 to flush dcache after each lcd update */
 
 
index e74eb65f3e1a14aa2b14ba5f5adeb041c6753b38..32626cfed31f422d670aaab26169b487bddc4f14 100644 (file)
 #include <lcd.h>
 #include <atmel_hlcdc.h>
 
-int lcd_line_length;
-
 void *lcd_base;                                /* Start of framebuffer memory  */
-void *lcd_console_address;             /* Start of console buffer      */
-
-short console_col;
-short console_row;
 
 /* configurable parameters */
 #define ATMEL_LCDC_CVAL_DEFAULT                0xc8
index d96f175c5c17345dc2aa21e70e07e50832917fb7..370d9ca135e08ce025e92b4c73ae878ec96ee554 100644 (file)
 #include <lcd.h>
 #include <atmel_lcdc.h>
 
-int lcd_line_length;
-
 void *lcd_base;                                /* Start of framebuffer memory  */
-void *lcd_console_address;             /* Start of console buffer      */
-
-short console_col;
-short console_row;
 
 /* configurable parameters */
 #define ATMEL_LCDC_CVAL_DEFAULT                0xc8
index 4536c5c0e863ab2f4f6ebfd262cbf8bed7cb07b7..82b19e5213dc3aabd5b4323bba1d633e76e41270 100644 (file)
 
 #include "exynos_fb.h"
 
-int lcd_line_length;
-
 void *lcd_base;
-void *lcd_console_address;
-
-short console_col;
-short console_row;
 
 static unsigned int panel_width, panel_height;
 
index 4fd44acd12f56598078d125d079dafbeb1f59b93..26ad432b2cc39256705eaf233971f75ec0bb522b 100644 (file)
@@ -256,16 +256,10 @@ vidinfo_t panel_info = {
 /*----------------------------------------------------------------------*/
 
 
-int lcd_line_length;
-
 /*
  * Frame buffer memory information
  */
 void *lcd_base;                        /* Start of framebuffer memory  */
-void *lcd_console_address;     /* Start of console buffer      */
-
-short console_col;
-short console_row;
 
 /************************************************************************/
 
index 25747b112e0ca8d9d8a147845d48dd15c2e00502..57243ce61e8a5b7e63af7056253d889fb5166685 100644 (file)
@@ -332,13 +332,7 @@ void lcd_getcolreg (ushort regno, ushort *red, ushort *green, ushort *blue);
 void lcd_ctrl_init     (void *lcdbase);
 void lcd_enable        (void);
 
-int lcd_line_length;
-
 void *lcd_base;                        /* Start of framebuffer memory  */
-void *lcd_console_address;             /* Start of console buffer      */
-
-short console_col;
-short console_row;
 
 static int pxafb_init_mem (void *lcdbase, vidinfo_t *vid);
 static void pxafb_setup_gpio (vidinfo_t *vid);
index 67a9fce52e310a722c5377c40b7e37c63795f0a2..3d684ce076db6ab26b2007a5528a437365cfe715 100644 (file)
@@ -60,13 +60,7 @@ enum {
        LCD_MAX_LOG2_BPP        = 4,            /* 2^4 = 16 bpp */
 };
 
-int lcd_line_length;
-
 void *lcd_base;                        /* Start of framebuffer memory  */
-void *lcd_console_address;     /* Start of console buffer      */
-
-short console_col;
-short console_row;
 
 vidinfo_t panel_info = {
        /* Insert a value here so that we don't end up in the BSS */
index e8c6c96f5c597cf6c5de03c2b3f3aedb2ebe97ec..9b8ffeb99d4bf0084ca83cdf1415909eea47eb58 100644 (file)
@@ -37,10 +37,7 @@ extern int lcd_line_length;
  * Frame buffer memory information
  */
 extern void *lcd_base;                 /* Start of framebuffer memory  */
-extern void *lcd_console_address;      /* Start of console buffer      */
 
-extern short console_col;
-extern short console_row;
 extern struct vidinfo panel_info;
 
 extern void lcd_ctrl_init (void *lcdbase);