From 46d1d5dd43e4d7c78f1fd6a5ee958d7b8a8626eb Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Sat, 5 Jan 2013 09:45:48 +0000 Subject: common/lcd.c: cleanup use of global variables lcd_color_fg and lcd_color_bg had to be declared in board specific code, but were not actually used there; in addition, we have getter / setter functions for these, which were not used either. Get rid of the global variables, and use the getter function where needed (so far no setter calls are needed). Signed-off-by: Wolfgang Denk Cc: Alessandro Rubini Cc: Anatolij Gustschin Cc: Bo Shen Cc: Haavard Skinnemoen Cc: Kyungmin Park Cc: Marek Vasut Cc: Minkyu Kang Cc: Nikita Kiryanov Cc: Simon Glass Cc: Stelian Pop Cc: Tom Warren Acked-by: Simon Glass Acked-by: Jeroen Hofstee [agust: also fixed cm_t35 board while rebasing] Signed-off-by: Anatolij Gustschin --- board/cm_t35/display.c | 2 -- board/mcc200/lcd.c | 3 --- 2 files changed, 5 deletions(-) (limited to 'board') diff --git a/board/cm_t35/display.c b/board/cm_t35/display.c index 2f78bad6ea..885c484ccf 100644 --- a/board/cm_t35/display.c +++ b/board/cm_t35/display.c @@ -382,8 +382,6 @@ static enum display_type env_parse_displaytype(char *displaytype) } int lcd_line_length; -int lcd_color_fg; -int lcd_color_bg; void *lcd_base; short console_col; short console_row; diff --git a/board/mcc200/lcd.c b/board/mcc200/lcd.c index 893f4b7cb8..0f3f585d60 100644 --- a/board/mcc200/lcd.c +++ b/board/mcc200/lcd.c @@ -70,9 +70,6 @@ vidinfo_t panel_info = { int lcd_line_length; -int lcd_color_fg; -int lcd_color_bg; - /* * Frame buffer memory information */ -- cgit v1.2.1 From f1d205a19cc89ae5a840cd45115201847dd5b73a Mon Sep 17 00:00:00 2001 From: Jeroen Hofstee Date: Tue, 22 Jan 2013 10:44:11 +0000 Subject: common/lcd.c: cleanup use of global variables 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 Cc: Anatolij Gustschin Cc: Bo Shen Cc: Kyungmin Park Cc: Marek Vasut Cc: Minkyu Kang Cc: Nikita Kiryanov Cc: Simon Glass Cc: Stelian Pop Cc: Tom Warren Acked-by: Bo Shen Signed-off-by: Jeroen Hofstee [agust: rebased and fixed cm_t35 board] Signed-off-by: Anatolij Gustschin --- board/cm_t35/display.c | 4 ---- board/mcc200/lcd.c | 6 ------ 2 files changed, 10 deletions(-) (limited to 'board') diff --git a/board/cm_t35/display.c b/board/cm_t35/display.c index 885c484ccf..d4487f31f5 100644 --- a/board/cm_t35/display.c +++ b/board/cm_t35/display.c @@ -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) { diff --git a/board/mcc200/lcd.c b/board/mcc200/lcd.c index 0f3f585d60..caf8d8b110 100644 --- a/board/mcc200/lcd.c +++ b/board/mcc200/lcd.c @@ -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 -- cgit v1.2.1 From 00a0ca5986c13d24ebbc5000cc1b7a1cdac0ba4b Mon Sep 17 00:00:00 2001 From: Jeroen Hofstee Date: Tue, 22 Jan 2013 10:44:12 +0000 Subject: common/lcd.c: remove global lcd_base lcd_base is available as gd->fb_base as well, there is no need to keep a seperate copy. For completeness the ack of Bo Shen is for the atmel part. Cc: Alessandro Rubini Cc: Anatolij Gustschin Cc: Bo Shen Cc: Haavard Skinnemoen Cc: Kyungmin Park Cc: Marek Vasut Cc: Minkyu Kang Cc: Nikita Kiryanov Cc: Simon Glass Cc: Stelian Pop Cc: Tom Warren Acked-by: Bo Shen Signed-off-by: Jeroen Hofstee [agust: also fix cm_t35 board while rebasing] Signed-off-by: Anatolij Gustschin --- board/cm_t35/display.c | 2 -- board/mcc200/lcd.c | 8 ++------ 2 files changed, 2 insertions(+), 8 deletions(-) (limited to 'board') diff --git a/board/cm_t35/display.c b/board/cm_t35/display.c index d4487f31f5..a004ea1d80 100644 --- a/board/cm_t35/display.c +++ b/board/cm_t35/display.c @@ -381,8 +381,6 @@ static enum display_type env_parse_displaytype(char *displaytype) return NONE; } -void *lcd_base; - void lcd_ctrl_init(void *lcdbase) { struct prcm *prcm = (struct prcm *)PRCM_BASE; diff --git a/board/mcc200/lcd.c b/board/mcc200/lcd.c index caf8d8b110..190190853e 100644 --- a/board/mcc200/lcd.c +++ b/board/mcc200/lcd.c @@ -68,10 +68,6 @@ vidinfo_t panel_info = { LCD_WIDTH, LCD_HEIGHT, LCD_BPP }; -/* - * Frame buffer memory information - */ -void *lcd_base; /* Start of framebuffer memory */ /* * The device we use to communicate with PSoC @@ -147,12 +143,12 @@ void lcd_enable (void) #if !defined(SWAPPED_LCD) for (i=0; ifb_base)[i]); } #else { int x, y, pwidth; - char *p = (char *)lcd_base; + char *p = (char *)gd->fb_base; pwidth = ((panel_info.vl_col+7) >> 3); for (y=0; y Date: Tue, 22 Jan 2013 10:44:13 +0000 Subject: lcd, fb: remove duplicated prototypes and unused code cc: Anatolij Gustschin cc: Cliff Brake cc: John Zhan cc: Marek Vasut cc: Wolfgang Denk Signed-off-by: Jeroen Hofstee --- board/mcc200/lcd.c | 7 ------- 1 file changed, 7 deletions(-) (limited to 'board') diff --git a/board/mcc200/lcd.c b/board/mcc200/lcd.c index 190190853e..24f0abddf3 100644 --- a/board/mcc200/lcd.c +++ b/board/mcc200/lcd.c @@ -74,13 +74,6 @@ vidinfo_t panel_info = { */ int serial_inited = 0; -/* - * Exported functions - */ -void lcd_initcolregs (void); -void lcd_ctrl_init (void *lcdbase); -void lcd_enable (void); - /* * Imported functions to support the PSoC protocol */ -- cgit v1.2.1