mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-09-26 08:11:25 +02:00
lcd: Remove LCD_TEST_PATTERN code
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>
This commit is contained in:
parent
3e2ea3278e
commit
61b9c42e8c
52
common/lcd.c
52
common/lcd.c
@ -90,54 +90,6 @@ static void lcd_stub_puts(struct stdio_dev *dev, const char *s)
|
|||||||
lcd_puts(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
|
* With most lcd drivers the line length is set up
|
||||||
* by calculating it from panel_info parameters. Some
|
* by calculating it from panel_info parameters. Some
|
||||||
@ -201,9 +153,6 @@ void lcd_clear(void)
|
|||||||
bg_color = CONSOLE_COLOR_BLACK;
|
bg_color = CONSOLE_COLOR_BLACK;
|
||||||
#endif /* CONFIG_SYS_WHITE_ON_BLACK */
|
#endif /* CONFIG_SYS_WHITE_ON_BLACK */
|
||||||
|
|
||||||
#ifdef LCD_TEST_PATTERN
|
|
||||||
test_pattern();
|
|
||||||
#else
|
|
||||||
/* set framebuffer to background color */
|
/* set framebuffer to background color */
|
||||||
#if (LCD_BPP != LCD_COLOR32)
|
#if (LCD_BPP != LCD_COLOR32)
|
||||||
memset((char *)lcd_base, bg_color, lcd_line_length * panel_info.vl_row);
|
memset((char *)lcd_base, bg_color, lcd_line_length * panel_info.vl_row);
|
||||||
@ -215,7 +164,6 @@ void lcd_clear(void)
|
|||||||
i++) {
|
i++) {
|
||||||
*ppix++ = bg_color;
|
*ppix++ = bg_color;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
/* setup text-console */
|
/* setup text-console */
|
||||||
debug("[LCD] setting up console...\n");
|
debug("[LCD] setting up console...\n");
|
||||||
|
@ -22,7 +22,6 @@
|
|||||||
|
|
||||||
/* LCD */
|
/* LCD */
|
||||||
#define LCD_BPP LCD_COLOR8
|
#define LCD_BPP LCD_COLOR8
|
||||||
#undef LCD_TEST_PATTERN
|
|
||||||
|
|
||||||
/* SDRAM */
|
/* SDRAM */
|
||||||
#define CONFIG_SYS_SDRAM_BASE 0x20000000
|
#define CONFIG_SYS_SDRAM_BASE 0x20000000
|
||||||
|
@ -33,7 +33,6 @@
|
|||||||
|
|
||||||
/* LCD */
|
/* LCD */
|
||||||
#define LCD_BPP LCD_COLOR8
|
#define LCD_BPP LCD_COLOR8
|
||||||
#undef LCD_TEST_PATTERN
|
|
||||||
|
|
||||||
/* SDRAM */
|
/* SDRAM */
|
||||||
#define CONFIG_SYS_SDRAM_BASE ATMEL_BASE_CS1
|
#define CONFIG_SYS_SDRAM_BASE ATMEL_BASE_CS1
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
|
|
||||||
/* LCD */
|
/* LCD */
|
||||||
#define LCD_BPP LCD_COLOR8
|
#define LCD_BPP LCD_COLOR8
|
||||||
#undef LCD_TEST_PATTERN
|
|
||||||
|
|
||||||
/* SDRAM */
|
/* SDRAM */
|
||||||
#define CONFIG_SYS_SDRAM_BASE 0x70000000
|
#define CONFIG_SYS_SDRAM_BASE 0x70000000
|
||||||
|
@ -22,7 +22,6 @@
|
|||||||
|
|
||||||
/* LCD */
|
/* LCD */
|
||||||
#define LCD_BPP LCD_COLOR8
|
#define LCD_BPP LCD_COLOR8
|
||||||
#undef LCD_TEST_PATTERN
|
|
||||||
/* Let board_init_f handle the framebuffer allocation */
|
/* Let board_init_f handle the framebuffer allocation */
|
||||||
#undef CONFIG_FB_ADDR
|
#undef CONFIG_FB_ADDR
|
||||||
|
|
||||||
|
@ -130,7 +130,6 @@
|
|||||||
|
|
||||||
/* LCD */
|
/* LCD */
|
||||||
#define LCD_BPP LCD_COLOR8
|
#define LCD_BPP LCD_COLOR8
|
||||||
#undef LCD_TEST_PATTERN
|
|
||||||
|
|
||||||
/* SDRAM */
|
/* SDRAM */
|
||||||
#define PHYS_SDRAM 0x20000000
|
#define PHYS_SDRAM 0x20000000
|
||||||
|
@ -141,7 +141,6 @@
|
|||||||
*/
|
*/
|
||||||
/* LCD */
|
/* LCD */
|
||||||
#define LCD_BPP LCD_COLOR8
|
#define LCD_BPP LCD_COLOR8
|
||||||
#undef LCD_TEST_PATTERN
|
|
||||||
|
|
||||||
/* SDRAM */
|
/* SDRAM */
|
||||||
#define PHYS_SDRAM 0x20000000
|
#define PHYS_SDRAM 0x20000000
|
||||||
|
Loading…
x
Reference in New Issue
Block a user