]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
common/lcd.c: remove global lcd_base
authorJeroen Hofstee <jeroen@myspectrum.nl>
Tue, 22 Jan 2013 10:44:12 +0000 (10:44 +0000)
committerAnatolij Gustschin <agust@denx.de>
Thu, 21 Mar 2013 09:16:53 +0000 (10:16 +0100)
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 <rubini@unipv.it>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Bo Shen <voice.shen@atmel.com>
Cc: Haavard Skinnemoen <haavard.skinnemoen@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: also fix cm_t35 board while rebasing]
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 d4487f31f5c85ee0bcf88ea8a4f5d051f0a8e127..a004ea1d803206ee99f020c31b17e3b64283e6f9 100644 (file)
@@ -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;
index caf8d8b110b15d5cbffe92f56841c7d68fa38cc8..190190853efe6aec98ad9ad4c3dea20cbf3387db 100644 (file)
@@ -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; i<fb_size; i++) {
-               serial_putc_raw_dev (PSOC_PSC, ((char *)lcd_base)[i]);
+               serial_putc_raw_dev(PSOC_PSC, ((char *)gd->fb_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<panel_info.vl_row; y++) {
index 874f18220af81c4c6e32e6bba910c4567da8eaec..eceb8ada0de960c60c1372ed421df7c2b5e59b27 100644 (file)
@@ -109,6 +109,7 @@ static short console_col;
 static short console_row;
 
 static void *lcd_console_address;
+static void *lcd_base;                 /* Start of framebuffer memory  */
 
 static char lcd_flush_dcache;  /* 1 to flush dcache after each lcd update */
 
index 32626cfed31f422d670aaab26169b487bddc4f14..fc958977479aebf0dad1978fd7acbf1c630297e7 100644 (file)
@@ -29,8 +29,6 @@
 #include <lcd.h>
 #include <atmel_hlcdc.h>
 
-void *lcd_base;                                /* Start of framebuffer memory  */
-
 /* configurable parameters */
 #define ATMEL_LCDC_CVAL_DEFAULT                0xc8
 #define ATMEL_LCDC_DMA_BURST_LEN       8
index 370d9ca135e08ce025e92b4c73ae878ec96ee554..2afeab2ffb2184f0bd4280d3cfc586b4ae2ababa 100644 (file)
@@ -29,8 +29,6 @@
 #include <lcd.h>
 #include <atmel_lcdc.h>
 
-void *lcd_base;                                /* Start of framebuffer memory  */
-
 /* configurable parameters */
 #define ATMEL_LCDC_CVAL_DEFAULT                0xc8
 #define ATMEL_LCDC_DMA_BURST_LEN       8
index 82b19e5213dc3aabd5b4323bba1d633e76e41270..c0f1830dc9aed1c793231fa1e23c4f8a593fb73f 100644 (file)
@@ -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();
index 26ad432b2cc39256705eaf233971f75ec0bb522b..1aa19673114b4157cd76872c97dd5d338c80b5bc 100644 (file)
@@ -255,14 +255,6 @@ vidinfo_t panel_info = {
 #endif
 /*----------------------------------------------------------------------*/
 
-
-/*
- * Frame buffer memory information
- */
-void *lcd_base;                        /* Start of framebuffer memory  */
-
-/************************************************************************/
-
 void lcd_ctrl_init (void *lcdbase);
 void lcd_enable (void);
 #if LCD_BPP == LCD_COLOR8
@@ -392,8 +384,8 @@ void lcd_ctrl_init (void *lcdbase)
         * BIG NOTE:  This has to be modified to load A and B depending
         * upon the split mode of the LCD.
         */
-       lcdp->lcd_lcfaa = (ulong)lcd_base;
-       lcdp->lcd_lcfba = (ulong)lcd_base;
+       lcdp->lcd_lcfaa = (ulong)lcdbase;
+       lcdp->lcd_lcfba = (ulong)lcdbase;
 
        /* MORE HACKS...This must be updated according to 823 manual
         * for different panels.
index 57243ce61e8a5b7e63af7056253d889fb5166685..fef49c1fe0538b53d338bdb17d018682475bbd8a 100644 (file)
@@ -332,8 +332,6 @@ void lcd_getcolreg (ushort regno, ushort *red, ushort *green, ushort *blue);
 void lcd_ctrl_init     (void *lcdbase);
 void lcd_enable        (void);
 
-void *lcd_base;                        /* Start of framebuffer memory  */
-
 static int pxafb_init_mem (void *lcdbase, vidinfo_t *vid);
 static void pxafb_setup_gpio (vidinfo_t *vid);
 static void pxafb_enable_controller (vidinfo_t *vid);
index 3d684ce076db6ab26b2007a5528a437365cfe715..8d533955a509fc879e00ac8a96fce8c8e889ad63 100644 (file)
@@ -60,8 +60,6 @@ enum {
        LCD_MAX_LOG2_BPP        = 4,            /* 2^4 = 16 bpp */
 };
 
-void *lcd_base;                        /* Start of framebuffer memory  */
-
 vidinfo_t panel_info = {
        /* Insert a value here so that we don't end up in the BSS */
        .vl_col = -1,
@@ -90,8 +88,6 @@ void lcd_ctrl_init(void *lcdbase)
 
        assert(disp_config);
 
-       lcd_base = (void *)disp_config->frame_buffer;
-
        /* Make sure that we can acommodate the selected LCD */
        assert(disp_config->width <= LCD_MAX_WIDTH);
        assert(disp_config->height <= LCD_MAX_HEIGHT);
@@ -112,7 +108,7 @@ void lcd_ctrl_init(void *lcdbase)
        /* Enable flushing after LCD writes if requested */
        lcd_set_flush_dcache(config.cache_type & FDT_LCD_CACHE_FLUSH);
 
-       debug("LCD frame buffer at %p\n", lcd_base);
+       debug("LCD frame buffer at %08X\n", disp_config->frame_buffer);
 }
 
 ulong calc_fbsize(void)
index 9b8ffeb99d4bf0084ca83cdf1415909eea47eb58..f88b7e95c221bdf2036015d8f237949161c2a550 100644 (file)
@@ -33,11 +33,6 @@ extern char lcd_is_enabled;
 
 extern int lcd_line_length;
 
-/*
- * Frame buffer memory information
- */
-extern void *lcd_base;                 /* Start of framebuffer memory  */
-
 extern struct vidinfo panel_info;
 
 extern void lcd_ctrl_init (void *lcdbase);