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 --- drivers/video/exynos_fb.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'drivers/video/exynos_fb.c') diff --git a/drivers/video/exynos_fb.c b/drivers/video/exynos_fb.c index ee0ed06..4536c5c 100644 --- a/drivers/video/exynos_fb.c +++ b/drivers/video/exynos_fb.c @@ -34,8 +34,6 @@ #include "exynos_fb.h" int lcd_line_length; -int lcd_color_fg; -int lcd_color_bg; void *lcd_base; void *lcd_console_address; -- cgit v1.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 --- drivers/video/exynos_fb.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'drivers/video/exynos_fb.c') diff --git a/drivers/video/exynos_fb.c b/drivers/video/exynos_fb.c index 4536c5c..82b19e5 100644 --- a/drivers/video/exynos_fb.c +++ b/drivers/video/exynos_fb.c @@ -33,13 +33,7 @@ #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; -- cgit v1.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 --- drivers/video/exynos_fb.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'drivers/video/exynos_fb.c') diff --git a/drivers/video/exynos_fb.c b/drivers/video/exynos_fb.c index 82b19e5..c0f1830 100644 --- a/drivers/video/exynos_fb.c +++ b/drivers/video/exynos_fb.c @@ -33,7 +33,7 @@ #include "exynos_fb.h" -void *lcd_base; +DECLARE_GLOBAL_DATA_PTR; static unsigned int panel_width, panel_height; @@ -44,11 +44,9 @@ static void exynos_lcd_init_mem(void *lcdbase, vidinfo_t *vid) fb_size = vid->vl_row * vid->vl_col * (NBITS(vid->vl_bpix) >> 3); - lcd_base = lcdbase; - palette_size = NBITS(vid->vl_bpix) == 8 ? 256 : 16; - exynos_fimd_lcd_init_mem((unsigned long)lcd_base, + exynos_fimd_lcd_init_mem((unsigned long)lcdbase, (unsigned long)fb_size, palette_size); } @@ -140,7 +138,7 @@ void lcd_ctrl_init(void *lcdbase) void lcd_enable(void) { if (panel_info.logo_on) { - memset(lcd_base, 0, panel_width * panel_height * + memset((void *) gd->fb_base, 0, panel_width * panel_height * (NBITS(panel_info.vl_bpix) >> 3)); #ifdef CONFIG_CMD_BMP draw_logo(); -- cgit v1.1