]> git.baikalelectronics.ru Git - uboot.git/commitdiff
lcd: Remove LCD_TEST_PATTERN code
authorTom Rini <trini@konsulko.com>
Fri, 18 Mar 2022 12:38:30 +0000 (08:38 -0400)
committerTom Rini <trini@konsulko.com>
Fri, 25 Mar 2022 12:01:15 +0000 (12:01 +0000)
This is a legacy driver and the value is set in board config headers
without a CONFIG prefix.  Remove the code.

Cc: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
common/lcd.c
include/configs/at91sam9261ek.h
include/configs/at91sam9263ek.h
include/configs/at91sam9m10g45ek.h
include/configs/at91sam9rlek.h
include/configs/pm9261.h
include/configs/pm9263.h

index 16a0a7cea8fc95a153da45d6cdc8c24bce3e6771..bd2f020d5dac90d4a45c9a1c1c12d47ae0302ec0 100644 (file)
@@ -90,54 +90,6 @@ static void lcd_stub_puts(struct stdio_dev *dev, const char *s)
        lcd_puts(s);
 }
 
-/* Small utility to check that you got the colours right */
-#ifdef LCD_TEST_PATTERN
-
-#if LCD_BPP == LCD_COLOR8
-#define        N_BLK_VERT      2
-#define        N_BLK_HOR       3
-
-static int test_colors[N_BLK_HOR * N_BLK_VERT] = {
-       CONSOLE_COLOR_RED,      CONSOLE_COLOR_GREEN,    CONSOLE_COLOR_YELLOW,
-       CONSOLE_COLOR_BLUE,     CONSOLE_COLOR_MAGENTA,  CONSOLE_COLOR_CYAN,
-}; /*LCD_BPP == LCD_COLOR8 */
-
-#elif LCD_BPP == LCD_COLOR16
-#define        N_BLK_VERT      2
-#define        N_BLK_HOR       4
-
-static int test_colors[N_BLK_HOR * N_BLK_VERT] = {
-       CONSOLE_COLOR_RED,      CONSOLE_COLOR_GREEN,    CONSOLE_COLOR_YELLOW,   CONSOLE_COLOR_BLUE,
-       CONSOLE_COLOR_MAGENTA,  CONSOLE_COLOR_CYAN,     CONSOLE_COLOR_GREY,     CONSOLE_COLOR_WHITE,
-};
-#endif /*LCD_BPP == LCD_COLOR16 */
-
-static void test_pattern(void)
-{
-       ushort v_max  = panel_info.vl_row;
-       ushort h_max  = panel_info.vl_col;
-       ushort v_step = (v_max + N_BLK_VERT - 1) / N_BLK_VERT;
-       ushort h_step = (h_max + N_BLK_HOR  - 1) / N_BLK_HOR;
-       ushort v, h;
-#if LCD_BPP == LCD_COLOR8
-       uchar *pix = (uchar *)lcd_base;
-#elif LCD_BPP == LCD_COLOR16
-       ushort *pix = (ushort *)lcd_base;
-#endif
-
-       printf("[LCD] Test Pattern: %d x %d [%d x %d]\n",
-               h_max, v_max, h_step, v_step);
-
-       for (v = 0; v < v_max; ++v) {
-               uchar iy = v / v_step;
-               for (h = 0; h < h_max; ++h) {
-                       uchar ix = N_BLK_HOR * iy + h / h_step;
-                       *pix++ = test_colors[ix];
-               }
-       }
-}
-#endif /* LCD_TEST_PATTERN */
-
 /*
  * With most lcd drivers the line length is set up
  * by calculating it from panel_info parameters. Some
@@ -201,9 +153,6 @@ void lcd_clear(void)
        bg_color = CONSOLE_COLOR_BLACK;
 #endif /* CONFIG_SYS_WHITE_ON_BLACK */
 
-#ifdef LCD_TEST_PATTERN
-       test_pattern();
-#else
        /* set framebuffer to background color */
 #if (LCD_BPP != LCD_COLOR32)
        memset((char *)lcd_base, bg_color, lcd_line_length * panel_info.vl_row);
@@ -215,7 +164,6 @@ void lcd_clear(void)
           i++) {
                *ppix++ = bg_color;
        }
-#endif
 #endif
        /* setup text-console */
        debug("[LCD] setting up console...\n");
index 4f43736fc8b643bc7955862bb7e77e22c4ef136c..4e72bf5f062c10fbabd91aa5acd9083c80e99ae3 100644 (file)
@@ -22,7 +22,6 @@
 
 /* LCD */
 #define LCD_BPP                                LCD_COLOR8
-#undef LCD_TEST_PATTERN
 
 /* SDRAM */
 #define CONFIG_SYS_SDRAM_BASE          0x20000000
index b5ac6a48a8f258262174dd378a9fd5ad55eca182..15df8f302721f8345b29204891c8ecd4cbcac6b4 100644 (file)
@@ -33,7 +33,6 @@
 
 /* LCD */
 #define LCD_BPP                                LCD_COLOR8
-#undef LCD_TEST_PATTERN
 
 /* SDRAM */
 #define CONFIG_SYS_SDRAM_BASE          ATMEL_BASE_CS1
index f24e7d65313cb2917d7e1786cc585b6e8fbc6441..1a408f835a5cb99c3ddd5325ca1d88890dd54ab8 100644 (file)
@@ -18,7 +18,6 @@
 
 /* LCD */
 #define LCD_BPP                                LCD_COLOR8
-#undef LCD_TEST_PATTERN
 
 /* SDRAM */
 #define CONFIG_SYS_SDRAM_BASE           0x70000000
index 822df8eb89fd2a789f74dfc39a30d72e0d54292f..0105cb0a80e24b0bfef1eed5981c7948e823a60d 100644 (file)
@@ -22,7 +22,6 @@
 
 /* LCD */
 #define LCD_BPP                                LCD_COLOR8
-#undef LCD_TEST_PATTERN
 /* Let board_init_f handle the framebuffer allocation */
 #undef CONFIG_FB_ADDR
 
index 056d87488c02c13acdfa2ace7c172a5cf71538a3..87f216be672e67dd67fc075d1bf563e2b54a2453 100644 (file)
 
 /* LCD */
 #define LCD_BPP                                LCD_COLOR8
-#undef LCD_TEST_PATTERN
 
 /* SDRAM */
 #define PHYS_SDRAM                             0x20000000
index 7b32e1b75bc5c517c8458bc779365a5bc8e8c0a0..3be7e1ca0b3c3c272f01eaa5a6cdc9f9ddbdcf8d 100644 (file)
  */
 /* LCD */
 #define LCD_BPP                                LCD_COLOR8
-#undef LCD_TEST_PATTERN
 
 /* SDRAM */
 #define PHYS_SDRAM             0x20000000