* [U-Boot] [PATCH 1/5] atmel_lcdfb: Eliminate unneeded #include <asm/arch/hardware.h> @ 2008-09-01 14:21 Haavard Skinnemoen 2008-09-01 14:21 ` [U-Boot] [PATCH 2/5] atmel_lcdfb: Straighten out funky vl_sync logic Haavard Skinnemoen 2008-10-25 21:26 ` [U-Boot] [PATCH 1/5] atmel_lcdfb: Eliminate unneeded #include <asm/arch/hardware.h> Anatolij Gustschin 0 siblings, 2 replies; 15+ messages in thread From: Haavard Skinnemoen @ 2008-09-01 14:21 UTC (permalink / raw) To: u-boot atmel_lcdfb doesn't actually need anything from asm/arch/hardware.h. It includes a file that does, asm/arch/gpio.h, but this file doesn't include <asm/arch/hardware.h> like it's supposed to. Add the missing include to asm/arch/gpio.h and remove the workaround from the atmel_lcdfb driver. This makes the driver compile on avr32. Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> --- drivers/video/atmel_lcdfb.c | 1 - include/asm-arm/arch-at91/gpio.h | 1 + 2 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c index b332a82..7f0dceb 100644 --- a/drivers/video/atmel_lcdfb.c +++ b/drivers/video/atmel_lcdfb.c @@ -24,7 +24,6 @@ #include <common.h> #include <asm/io.h> -#include <asm/arch/hardware.h> #include <asm/arch/gpio.h> #include <asm/arch/clk.h> #include <lcd.h> diff --git a/include/asm-arm/arch-at91/gpio.h b/include/asm-arm/arch-at91/gpio.h index c4d7b97..e2d375b 100644 --- a/include/asm-arm/arch-at91/gpio.h +++ b/include/asm-arm/arch-at91/gpio.h @@ -16,6 +16,7 @@ #include <asm/io.h> #include <asm/errno.h> #include <asm/arch/at91_pio.h> +#include <asm/arch/hardware.h> #define PIN_BASE 32 -- 1.5.6.3 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 2/5] atmel_lcdfb: Straighten out funky vl_sync logic 2008-09-01 14:21 [U-Boot] [PATCH 1/5] atmel_lcdfb: Eliminate unneeded #include <asm/arch/hardware.h> Haavard Skinnemoen @ 2008-09-01 14:21 ` Haavard Skinnemoen 2008-09-01 14:21 ` [U-Boot] [PATCH 3/5] lcd: Implement lcd_printf() Haavard Skinnemoen ` (2 more replies) 2008-10-25 21:26 ` [U-Boot] [PATCH 1/5] atmel_lcdfb: Eliminate unneeded #include <asm/arch/hardware.h> Anatolij Gustschin 1 sibling, 3 replies; 15+ messages in thread From: Haavard Skinnemoen @ 2008-09-01 14:21 UTC (permalink / raw) To: u-boot If the board _didn't_ request INVLINE_INVERTED, we set INVLINE_INVERTED, otherwise we don't. WTF? Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> --- drivers/video/atmel_lcdfb.c | 5 +---- 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c index 7f0dceb..3a51cc7 100644 --- a/drivers/video/atmel_lcdfb.c +++ b/drivers/video/atmel_lcdfb.c @@ -107,10 +107,7 @@ void lcd_ctrl_init(void *lcdbase) if (panel_info.vl_tft) value |= ATMEL_LCDC_DISTYPE_TFT; - if (!(panel_info.vl_sync & ATMEL_LCDC_INVLINE_INVERTED)) - value |= ATMEL_LCDC_INVLINE_INVERTED; - if (!(panel_info.vl_sync & ATMEL_LCDC_INVFRAME_INVERTED)) - value |= ATMEL_LCDC_INVFRAME_INVERTED; + value |= panel_info.vl_sync; value |= (panel_info.vl_bpix << 5); lcdc_writel(panel_info.mmio, ATMEL_LCDC_LCDCON2, value); -- 1.5.6.3 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 3/5] lcd: Implement lcd_printf() 2008-09-01 14:21 ` [U-Boot] [PATCH 2/5] atmel_lcdfb: Straighten out funky vl_sync logic Haavard Skinnemoen @ 2008-09-01 14:21 ` Haavard Skinnemoen 2008-09-01 14:21 ` [U-Boot] [PATCH 4/5] lcd: Set lcd_is_enabled before clearing the screen Haavard Skinnemoen 2008-10-25 21:45 ` [U-Boot] [PATCH 3/5] lcd: Implement lcd_printf() Anatolij Gustschin 2008-09-02 11:44 ` [U-Boot] [PATCH 2/5] atmel_lcdfb: Straighten out funky vl_sync logic Detlev Zundel 2008-10-25 21:33 ` Anatolij Gustschin 2 siblings, 2 replies; 15+ messages in thread From: Haavard Skinnemoen @ 2008-09-01 14:21 UTC (permalink / raw) To: u-boot lcd_printf() has a prototype in include/lcd.h but no implementation. Fix this by borrowing the lcd_printf() implementation from the cogent board code (which appears to use its own LCD framework.) Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> --- common/lcd.c | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/common/lcd.c b/common/lcd.c index 25f8664..82e557e 100644 --- a/common/lcd.c +++ b/common/lcd.c @@ -225,6 +225,20 @@ void lcd_puts (const char *s) } } +/*----------------------------------------------------------------------*/ + +void lcd_printf(const char *fmt, ...) +{ + va_list args; + char buf[CFG_PBSIZE]; + + va_start(args, fmt); + vsprintf(buf, fmt, args); + va_end(args); + + lcd_puts(buf); +} + /************************************************************************/ /* ** Low-Level Graphics Routines */ /************************************************************************/ -- 1.5.6.3 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 4/5] lcd: Set lcd_is_enabled before clearing the screen 2008-09-01 14:21 ` [U-Boot] [PATCH 3/5] lcd: Implement lcd_printf() Haavard Skinnemoen @ 2008-09-01 14:21 ` Haavard Skinnemoen 2008-09-01 14:21 ` [U-Boot] [PATCH 5/5] lcd: Let the board code show board-specific info Haavard Skinnemoen 2008-10-25 21:47 ` [U-Boot] [PATCH 4/5] lcd: Set lcd_is_enabled before clearing the screen Anatolij Gustschin 2008-10-25 21:45 ` [U-Boot] [PATCH 3/5] lcd: Implement lcd_printf() Anatolij Gustschin 1 sibling, 2 replies; 15+ messages in thread From: Haavard Skinnemoen @ 2008-09-01 14:21 UTC (permalink / raw) To: u-boot This allows the logo/info rendering routines to use the regular lcd_putc/lcd_puts/lcd_printf calls. Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> --- common/lcd.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/common/lcd.c b/common/lcd.c index 82e557e..6ad2133 100644 --- a/common/lcd.c +++ b/common/lcd.c @@ -440,6 +440,7 @@ static int lcd_init (void *lcdbase) debug ("[LCD] Initializing LCD frambuffer at %p\n", lcdbase); lcd_ctrl_init (lcdbase); + lcd_is_enabled = 1; lcd_clear (NULL, 1, 1, NULL); /* dummy args */ lcd_enable (); @@ -450,7 +451,6 @@ static int lcd_init (void *lcdbase) #else console_row = 1; /* leave 1 blank line below logo */ #endif - lcd_is_enabled = 1; return 0; } -- 1.5.6.3 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 5/5] lcd: Let the board code show board-specific info 2008-09-01 14:21 ` [U-Boot] [PATCH 4/5] lcd: Set lcd_is_enabled before clearing the screen Haavard Skinnemoen @ 2008-09-01 14:21 ` Haavard Skinnemoen 2008-10-25 22:23 ` Anatolij Gustschin 2008-10-27 9:19 ` Anatolij Gustschin 2008-10-25 21:47 ` [U-Boot] [PATCH 4/5] lcd: Set lcd_is_enabled before clearing the screen Anatolij Gustschin 1 sibling, 2 replies; 15+ messages in thread From: Haavard Skinnemoen @ 2008-09-01 14:21 UTC (permalink / raw) To: u-boot The information displayed when CONFIG_LCD_INFO is set is inherently board-specific, so it should be done by the board code. The current code dealing with this only handles two cases, and is already a horrible mess of #ifdeffery. Yes, this duplicates some code, but it also allows boards to print more board-specific information; this used to be very difficult. Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> --- board/atmel/at91cap9adk/at91cap9adk.c | 29 ++++++++++ board/atmel/at91sam9261ek/at91sam9261ek.c | 29 ++++++++++ board/atmel/at91sam9263ek/at91sam9263ek.c | 29 ++++++++++ board/atmel/at91sam9rlek/at91sam9rlek.c | 29 ++++++++++ board/lwmon/lwmon.c | 29 ++++++++++ board/tqc/tqm8xx/tqm8xx.c | 26 +++++++++ common/lcd.c | 84 ++--------------------------- include/lcd.h | 2 + 8 files changed, 178 insertions(+), 79 deletions(-) diff --git a/board/atmel/at91cap9adk/at91cap9adk.c b/board/atmel/at91cap9adk/at91cap9adk.c index c5082a0..31f468a 100644 --- a/board/atmel/at91cap9adk/at91cap9adk.c +++ b/board/atmel/at91cap9adk/at91cap9adk.c @@ -324,6 +324,35 @@ static void at91cap9_lcd_hw_init(void) gd->fb_base = 0; } + +#ifdef CONFIG_LCD_INFO +#include <nand.h> +#include <version.h> + +void lcd_show_board_info(void) +{ + ulong dram_size, nand_size; + int i; + char temp[32]; + + lcd_printf ("%s\n", U_BOOT_VERSION); + lcd_printf ("(C) 2008 ATMEL Corp\n"); + lcd_printf ("at91support at atmel.com\n"); + lcd_printf ("%s CPU at %s MHz\n", + AT91_CPU_NAME, + strmhz(temp, AT91_MAIN_CLOCK)); + + dram_size = 0; + for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) + dram_size += gd->bd->bi_dram[i].size; + nand_size = 0; + for (i = 0; i < CFG_MAX_NAND_DEVICE; i++) + nand_size += nand_info[i].size; + lcd_printf (" %ld MB SDRAM, %ld MB NAND\n", + dram_size >> 20, + nand_size >> 20 ); +} +#endif /* CONFIG_LCD_INFO */ #endif int board_init(void) diff --git a/board/atmel/at91sam9261ek/at91sam9261ek.c b/board/atmel/at91sam9261ek/at91sam9261ek.c index 647aab5..5a48ee4 100644 --- a/board/atmel/at91sam9261ek/at91sam9261ek.c +++ b/board/atmel/at91sam9261ek/at91sam9261ek.c @@ -209,6 +209,35 @@ static void at91sam9261ek_lcd_hw_init(void) gd->fb_base = AT91SAM9261_SRAM_BASE; } + +#ifdef CONFIG_LCD_INFO +#include <nand.h> +#include <version.h> + +void lcd_show_board_info(void) +{ + ulong dram_size, nand_size; + int i; + char temp[32]; + + lcd_printf ("%s\n", U_BOOT_VERSION); + lcd_printf ("(C) 2008 ATMEL Corp\n"); + lcd_printf ("at91support at atmel.com\n"); + lcd_printf ("%s CPU at %s MHz\n", + AT91_CPU_NAME, + strmhz(temp, AT91_MAIN_CLOCK)); + + dram_size = 0; + for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) + dram_size += gd->bd->bi_dram[i].size; + nand_size = 0; + for (i = 0; i < CFG_MAX_NAND_DEVICE; i++) + nand_size += nand_info[i].size; + lcd_printf (" %ld MB SDRAM, %ld MB NAND\n", + dram_size >> 20, + nand_size >> 20 ); +} +#endif /* CONFIG_LCD_INFO */ #endif int board_init(void) diff --git a/board/atmel/at91sam9263ek/at91sam9263ek.c b/board/atmel/at91sam9263ek/at91sam9263ek.c index 927fc91..84db2c5 100644 --- a/board/atmel/at91sam9263ek/at91sam9263ek.c +++ b/board/atmel/at91sam9263ek/at91sam9263ek.c @@ -258,6 +258,35 @@ static void at91sam9263ek_lcd_hw_init(void) gd->fb_base = AT91SAM9263_SRAM0_BASE; } + +#ifdef CONFIG_LCD_INFO +#include <nand.h> +#include <version.h> + +void lcd_show_board_info(void) +{ + ulong dram_size, nand_size; + int i; + char temp[32]; + + lcd_printf ("%s\n", U_BOOT_VERSION); + lcd_printf ("(C) 2008 ATMEL Corp\n"); + lcd_printf ("at91support at atmel.com\n"); + lcd_printf ("%s CPU at %s MHz\n", + AT91_CPU_NAME, + strmhz(temp, AT91_MAIN_CLOCK)); + + dram_size = 0; + for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) + dram_size += gd->bd->bi_dram[i].size; + nand_size = 0; + for (i = 0; i < CFG_MAX_NAND_DEVICE; i++) + nand_size += nand_info[i].size; + lcd_printf (" %ld MB SDRAM, %ld MB NAND\n", + dram_size >> 20, + nand_size >> 20 ); +} +#endif /* CONFIG_LCD_INFO */ #endif int board_init(void) diff --git a/board/atmel/at91sam9rlek/at91sam9rlek.c b/board/atmel/at91sam9rlek/at91sam9rlek.c index 509e7c3..22115e5 100644 --- a/board/atmel/at91sam9rlek/at91sam9rlek.c +++ b/board/atmel/at91sam9rlek/at91sam9rlek.c @@ -181,6 +181,35 @@ static void at91sam9rlek_lcd_hw_init(void) gd->fb_base = 0; } + +#ifdef CONFIG_LCD_INFO +#include <nand.h> +#include <version.h> + +void lcd_show_board_info(void) +{ + ulong dram_size, nand_size; + int i; + char temp[32]; + + lcd_printf ("%s\n", U_BOOT_VERSION); + lcd_printf ("(C) 2008 ATMEL Corp\n"); + lcd_printf ("at91support at atmel.com\n"); + lcd_printf ("%s CPU at %s MHz\n", + AT91_CPU_NAME, + strmhz(temp, AT91_MAIN_CLOCK)); + + dram_size = 0; + for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) + dram_size += gd->bd->bi_dram[i].size; + nand_size = 0; + for (i = 0; i < CFG_MAX_NAND_DEVICE; i++) + nand_size += nand_info[i].size; + lcd_printf (" %ld MB SDRAM, %ld MB NAND\n", + dram_size >> 20, + nand_size >> 20 ); +} +#endif /* CONFIG_LCD_INFO */ #endif diff --git a/board/lwmon/lwmon.c b/board/lwmon/lwmon.c index 4a2d8e4..695eddd 100644 --- a/board/lwmon/lwmon.c +++ b/board/lwmon/lwmon.c @@ -759,6 +759,35 @@ static uchar *key_match (uchar *kbd_data) } #endif /* CONFIG_PREBOOT */ +#ifdef CONFIG_LCD_INFO +#include <lcd.h> +#include <version.h> + +void lcd_show_board_info(void) +{ + char temp[32]; + + lcd_printf ("%s (%s - %s)\n", U_BOOT_VERSION, __DATE__, __TIME__); + lcd_printf ("(C) 2008 DENX Software Engineering GmbH\n"); + lcd_printf (" Wolfgang DENK, wd at denx.de\n"); +#ifdef CONFIG_LCD_INFO_BELOW_LOGO + lcd_printf ("MPC823 CPU at %s MHz\n", + strmhz(temp, gd->cpu_clk)); + lcd_drawchars (LCD_INFO_X, LCD_INFO_Y + VIDEO_FONT_HEIGHT * 3, + info, strlen(info)); + lcd_printf (" %ld MB RAM, %ld MB Flash\n", + gd->ram_size >> 20, + gd->bd->bi_flashsize >> 20 ); +#else + /* leave one blank line */ + lcd_printf ("\nMPC823 CPU at %s MHz, %ld MB RAM, %ld MB Flash\n", + strmhz(temp, gd->cpu_clk), + gd->ram_size >> 20, + gd->bd->bi_flashsize >> 20 ); +#endif /* CONFIG_LCD_INFO_BELOW_LOGO */ +} +#endif /* CONFIG_LCD_INFO */ + /*---------------Board Special Commands: PIC read/write ---------------*/ #if defined(CONFIG_CMD_BSP) diff --git a/board/tqc/tqm8xx/tqm8xx.c b/board/tqc/tqm8xx/tqm8xx.c index 96b6103..ea89d5a 100644 --- a/board/tqc/tqm8xx/tqm8xx.c +++ b/board/tqc/tqm8xx/tqm8xx.c @@ -504,6 +504,32 @@ int misc_init_r (void) } #endif /* CONFIG_NSCU */ +#ifdef CONFIG_LCD_INFO +#include <lcd.h> + +void lcd_show_board_info(void) +{ + lcd_printf ("%s (%s - %s)\n", U_BOOT_VERSION, __DATE__, __TIME__); + lcd_printf ("(C) 2008 DENX Software Engineering GmbH\n"); + lcd_printf (" Wolfgang DENK, wd at denx.de\n"); +#ifdef CONFIG_LCD_INFO_BELOW_LOGO + lcd_printf ("MPC823 CPU at %s MHz\n", + strmhz(temp, gd->cpu_clk)); + lcd_drawchars (LCD_INFO_X, LCD_INFO_Y + VIDEO_FONT_HEIGHT * 3, + info, strlen(info)); + lcd_printf (" %ld MB RAM, %ld MB Flash\n", + gd->ram_size >> 20, + gd->bd->bi_flashsize >> 20 ); +#else + /* leave one blank line */ + lcd_printf ("\nMPC823 CPU at %s MHz, %ld MB RAM, %ld MB Flash\n", + strmhz(temp, gd->cpu_clk), + gd->ram_size >> 20, + gd->bd->bi_flashsize >> 20 ); +#endif /* CONFIG_LCD_INFO_BELOW_LOGO */ +} +#endif /* CONFIG_LCD_INFO */ + /* ---------------------------------------------------------------------------- */ /* TK885D specific initializaion */ /* ---------------------------------------------------------------------------- */ diff --git a/common/lcd.c b/common/lcd.c index 6ad2133..c97e5a4 100644 --- a/common/lcd.c +++ b/common/lcd.c @@ -52,7 +52,6 @@ #if defined(CONFIG_ATMEL_LCD) #include <atmel_lcdc.h> -#include <nand.h> #endif /************************************************************************/ @@ -762,15 +761,6 @@ extern bmp_image_t *gunzip_bmp(unsigned long addr, unsigned long *lenp); static void *lcd_logo (void) { -#ifdef CONFIG_LCD_INFO - char info[80]; - char temp[32]; -#ifdef CONFIG_ATMEL_LCD - int i; - ulong dram_size, nand_size; -#endif -#endif /* CONFIG_LCD_INFO */ - #ifdef CONFIG_SPLASH_SCREEN char *s; ulong addr; @@ -800,75 +790,11 @@ static void *lcd_logo (void) bitmap_plot (0, 0); #endif /* CONFIG_LCD_LOGO */ -#ifdef CONFIG_MPC823 -# ifdef CONFIG_LCD_INFO - sprintf (info, "%s (%s - %s) ", U_BOOT_VERSION, __DATE__, __TIME__); - lcd_drawchars (LCD_INFO_X, LCD_INFO_Y, (uchar *)info, strlen(info)); - - sprintf (info, "(C) 2008 DENX Software Engineering GmbH"); - lcd_drawchars (LCD_INFO_X, LCD_INFO_Y + VIDEO_FONT_HEIGHT, - (uchar *)info, strlen(info)); - - sprintf (info, " Wolfgang DENK, wd at denx.de"); - lcd_drawchars (LCD_INFO_X, LCD_INFO_Y + VIDEO_FONT_HEIGHT * 2, - (uchar *)info, strlen(info)); -# ifdef CONFIG_LCD_INFO_BELOW_LOGO - sprintf (info, "MPC823 CPU at %s MHz", - strmhz(temp, gd->cpu_clk)); - lcd_drawchars (LCD_INFO_X, LCD_INFO_Y + VIDEO_FONT_HEIGHT * 3, - info, strlen(info)); - sprintf (info, " %ld MB RAM, %ld MB Flash", - gd->ram_size >> 20, - gd->bd->bi_flashsize >> 20 ); - lcd_drawchars (LCD_INFO_X, LCD_INFO_Y + VIDEO_FONT_HEIGHT * 4, - info, strlen(info)); -# else - /* leave one blank line */ - - sprintf (info, "MPC823 CPU at %s MHz, %ld MB RAM, %ld MB Flash", - strmhz(temp, gd->cpu_clk), - gd->ram_size >> 20, - gd->bd->bi_flashsize >> 20 ); - lcd_drawchars (LCD_INFO_X, LCD_INFO_Y + VIDEO_FONT_HEIGHT * 4, - (uchar *)info, strlen(info)); - -# endif /* CONFIG_LCD_INFO_BELOW_LOGO */ -# endif /* CONFIG_LCD_INFO */ -#endif /* CONFIG_MPC823 */ - -#ifdef CONFIG_ATMEL_LCD -# ifdef CONFIG_LCD_INFO - sprintf (info, "%s", U_BOOT_VERSION); - lcd_drawchars (LCD_INFO_X, LCD_INFO_Y, (uchar *)info, strlen(info)); - - sprintf (info, "(C) 2008 ATMEL Corp"); - lcd_drawchars (LCD_INFO_X, LCD_INFO_Y + VIDEO_FONT_HEIGHT, - (uchar *)info, strlen(info)); - - sprintf (info, "at91support at atmel.com"); - lcd_drawchars (LCD_INFO_X, LCD_INFO_Y + VIDEO_FONT_HEIGHT * 2, - (uchar *)info, strlen(info)); - - sprintf (info, "%s CPU at %s MHz", - AT91_CPU_NAME, - strmhz(temp, AT91_MAIN_CLOCK)); - lcd_drawchars (LCD_INFO_X, LCD_INFO_Y + VIDEO_FONT_HEIGHT * 3, - (uchar *)info, strlen(info)); - - dram_size = 0; - for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) - dram_size += gd->bd->bi_dram[i].size; - nand_size = 0; - for (i = 0; i < CFG_MAX_NAND_DEVICE; i++) - nand_size += nand_info[i].size; - sprintf (info, " %ld MB SDRAM, %ld MB NAND", - dram_size >> 20, - nand_size >> 20 ); - lcd_drawchars (LCD_INFO_X, LCD_INFO_Y + VIDEO_FONT_HEIGHT * 4, - (uchar *)info, strlen(info)); -# endif /* CONFIG_LCD_INFO */ -#endif /* CONFIG_ATMEL_LCD */ - +#ifdef CONFIG_LCD_INFO + console_col = LCD_INFO_X / VIDEO_FONT_WIDTH; + console_row = LCD_INFO_Y / VIDEO_FONT_HEIGHT; + lcd_show_board_info(); +#endif /* CONFIG_LCD_INFO */ #if defined(CONFIG_LCD_LOGO) && !defined(CONFIG_LCD_INFO_BELOW_LOGO) return ((void *)((ulong)lcd_base + BMP_LOGO_HEIGHT * lcd_line_length)); diff --git a/include/lcd.h b/include/lcd.h index 44ac8ef..ead9e1d 100644 --- a/include/lcd.h +++ b/include/lcd.h @@ -197,6 +197,8 @@ void lcd_putc (const char c); void lcd_puts (const char *s); void lcd_printf (const char *fmt, ...); +/* Allow boards to customize the information displayed */ +void lcd_show_board_info(void); /************************************************************************/ /* ** BITMAP DISPLAY SUPPORT */ -- 1.5.6.3 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 5/5] lcd: Let the board code show board-specific info 2008-09-01 14:21 ` [U-Boot] [PATCH 5/5] lcd: Let the board code show board-specific info Haavard Skinnemoen @ 2008-10-25 22:23 ` Anatolij Gustschin 2008-10-26 11:56 ` Jean-Christophe PLAGNIOL-VILLARD 2008-10-27 9:19 ` Anatolij Gustschin 1 sibling, 1 reply; 15+ messages in thread From: Anatolij Gustschin @ 2008-10-25 22:23 UTC (permalink / raw) To: u-boot Haavard Skinnemoen wrote: > The information displayed when CONFIG_LCD_INFO is set is inherently > board-specific, so it should be done by the board code. The current code > dealing with this only handles two cases, and is already a horrible mess > of #ifdeffery. > > Yes, this duplicates some code, but it also allows boards to print more > board-specific information; this used to be very difficult. > > Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> > --- > board/atmel/at91cap9adk/at91cap9adk.c | 29 ++++++++++ > board/atmel/at91sam9261ek/at91sam9261ek.c | 29 ++++++++++ > board/atmel/at91sam9263ek/at91sam9263ek.c | 29 ++++++++++ > board/atmel/at91sam9rlek/at91sam9rlek.c | 29 ++++++++++ > board/lwmon/lwmon.c | 29 ++++++++++ > board/tqc/tqm8xx/tqm8xx.c | 26 +++++++++ > common/lcd.c | 84 ++--------------------------- > include/lcd.h | 2 + > 8 files changed, 178 insertions(+), 79 deletions(-) Jean-Christophe, you ACKed this patch in http://lists.denx.de/pipermail/u-boot/2008-October/042389.html. Should it go through u-boot-video repository or do you intend to pick it up? Note that it needs some fixes: s/CFG_MAX_NAND_DEVICE/CONFIG_SYS_MAX_NAND_DEVICE Best regards, Anatolij -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de ^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 5/5] lcd: Let the board code show board-specific info 2008-10-25 22:23 ` Anatolij Gustschin @ 2008-10-26 11:56 ` Jean-Christophe PLAGNIOL-VILLARD 0 siblings, 0 replies; 15+ messages in thread From: Jean-Christophe PLAGNIOL-VILLARD @ 2008-10-26 11:56 UTC (permalink / raw) To: u-boot On 00:23 Sun 26 Oct , Anatolij Gustschin wrote: > Haavard Skinnemoen wrote: > > The information displayed when CONFIG_LCD_INFO is set is inherently > > board-specific, so it should be done by the board code. The current code > > dealing with this only handles two cases, and is already a horrible mess > > of #ifdeffery. > > > > Yes, this duplicates some code, but it also allows boards to print more > > board-specific information; this used to be very difficult. > > > > Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> > > --- > > board/atmel/at91cap9adk/at91cap9adk.c | 29 ++++++++++ > > board/atmel/at91sam9261ek/at91sam9261ek.c | 29 ++++++++++ > > board/atmel/at91sam9263ek/at91sam9263ek.c | 29 ++++++++++ > > board/atmel/at91sam9rlek/at91sam9rlek.c | 29 ++++++++++ > > board/lwmon/lwmon.c | 29 ++++++++++ > > board/tqc/tqm8xx/tqm8xx.c | 26 +++++++++ > > common/lcd.c | 84 ++--------------------------- > > include/lcd.h | 2 + > > 8 files changed, 178 insertions(+), 79 deletions(-) > > Jean-Christophe, you ACKed this patch in > http://lists.denx.de/pipermail/u-boot/2008-October/042389.html. > > Should it go through u-boot-video repository or do you intend to > pick it up? > > Note that it needs some fixes: > s/CFG_MAX_NAND_DEVICE/CONFIG_SYS_MAX_NAND_DEVICE Apply it I'll pull your tree when you've done Best Regards, J. ^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 5/5] lcd: Let the board code show board-specific info 2008-09-01 14:21 ` [U-Boot] [PATCH 5/5] lcd: Let the board code show board-specific info Haavard Skinnemoen 2008-10-25 22:23 ` Anatolij Gustschin @ 2008-10-27 9:19 ` Anatolij Gustschin 1 sibling, 0 replies; 15+ messages in thread From: Anatolij Gustschin @ 2008-10-27 9:19 UTC (permalink / raw) To: u-boot Haavard Skinnemoen wrote: > The information displayed when CONFIG_LCD_INFO is set is inherently > board-specific, so it should be done by the board code. The current code > dealing with this only handles two cases, and is already a horrible mess > of #ifdeffery. > > Yes, this duplicates some code, but it also allows boards to print more > board-specific information; this used to be very difficult. > > Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> > --- > board/atmel/at91cap9adk/at91cap9adk.c | 29 ++++++++++ > board/atmel/at91sam9261ek/at91sam9261ek.c | 29 ++++++++++ > board/atmel/at91sam9263ek/at91sam9263ek.c | 29 ++++++++++ > board/atmel/at91sam9rlek/at91sam9rlek.c | 29 ++++++++++ > board/lwmon/lwmon.c | 29 ++++++++++ > board/tqc/tqm8xx/tqm8xx.c | 26 +++++++++ > common/lcd.c | 84 ++--------------------------- > include/lcd.h | 2 + > 8 files changed, 178 insertions(+), 79 deletions(-) Applied to u-boot-video/master repo. Thanks! Also fixed by s/CFG_MAX_NAND_DEVICE/CONFIG_SYS_MAX_NAND_DEVICE as it is needed since commit 6d0f6bcf337c5261c08fabe12982178c2c489d76. Best regards, Anatolij -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de ^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 4/5] lcd: Set lcd_is_enabled before clearing the screen 2008-09-01 14:21 ` [U-Boot] [PATCH 4/5] lcd: Set lcd_is_enabled before clearing the screen Haavard Skinnemoen 2008-09-01 14:21 ` [U-Boot] [PATCH 5/5] lcd: Let the board code show board-specific info Haavard Skinnemoen @ 2008-10-25 21:47 ` Anatolij Gustschin 1 sibling, 0 replies; 15+ messages in thread From: Anatolij Gustschin @ 2008-10-25 21:47 UTC (permalink / raw) To: u-boot Haavard Skinnemoen wrote: > This allows the logo/info rendering routines to use the regular > lcd_putc/lcd_puts/lcd_printf calls. > > Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> Applied to u-boot-video/master repo. Thanks. Best regards, Anatolij -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de ^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 3/5] lcd: Implement lcd_printf() 2008-09-01 14:21 ` [U-Boot] [PATCH 3/5] lcd: Implement lcd_printf() Haavard Skinnemoen 2008-09-01 14:21 ` [U-Boot] [PATCH 4/5] lcd: Set lcd_is_enabled before clearing the screen Haavard Skinnemoen @ 2008-10-25 21:45 ` Anatolij Gustschin 2008-10-27 23:03 ` Wolfgang Denk 1 sibling, 1 reply; 15+ messages in thread From: Anatolij Gustschin @ 2008-10-25 21:45 UTC (permalink / raw) To: u-boot Haavard Skinnemoen wrote: > lcd_printf() has a prototype in include/lcd.h but no implementation. Fix > this by borrowing the lcd_printf() implementation from the cogent board > code (which appears to use its own LCD framework.) > > Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> Applied to u-boot-video/master repo. Thanks. Also fixed it by s/CFG_PBSIZE/CONFIG_SYS_PBSIZE as it is needed since commit 6d0f6bcf337c5261c08fabe12982178c2c489d76. Best regards, Anatolij -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de ^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 3/5] lcd: Implement lcd_printf() 2008-10-25 21:45 ` [U-Boot] [PATCH 3/5] lcd: Implement lcd_printf() Anatolij Gustschin @ 2008-10-27 23:03 ` Wolfgang Denk 0 siblings, 0 replies; 15+ messages in thread From: Wolfgang Denk @ 2008-10-27 23:03 UTC (permalink / raw) To: u-boot Dear Anatolij Gustschin, In message <49039383.3080501@denx.de> you wrote: > Haavard Skinnemoen wrote: > > lcd_printf() has a prototype in include/lcd.h but no implementation. Fix > > this by borrowing the lcd_printf() implementation from the cogent board > > code (which appears to use its own LCD framework.) > > > > Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> > > Applied to u-boot-video/master repo. Thanks. > > Also fixed it by s/CFG_PBSIZE/CONFIG_SYS_PBSIZE as it is needed > since commit 6d0f6bcf337c5261c08fabe12982178c2c489d76. Can you please send a pull request for u-boot-video soon? Thanks in advance. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de When it is incorrect, it is, at least *authoritatively* incorrect. - Hitchiker's Guide To The Galaxy ^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 2/5] atmel_lcdfb: Straighten out funky vl_sync logic 2008-09-01 14:21 ` [U-Boot] [PATCH 2/5] atmel_lcdfb: Straighten out funky vl_sync logic Haavard Skinnemoen 2008-09-01 14:21 ` [U-Boot] [PATCH 3/5] lcd: Implement lcd_printf() Haavard Skinnemoen @ 2008-09-02 11:44 ` Detlev Zundel 2008-09-02 11:53 ` Haavard Skinnemoen 2008-10-25 21:33 ` Anatolij Gustschin 2 siblings, 1 reply; 15+ messages in thread From: Detlev Zundel @ 2008-09-02 11:44 UTC (permalink / raw) To: u-boot Hi Haavard, > If the board _didn't_ request INVLINE_INVERTED, we set INVLINE_INVERTED, > otherwise we don't. WTF? > > Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> > --- > drivers/video/atmel_lcdfb.c | 5 +---- > 1 files changed, 1 insertions(+), 4 deletions(-) > > diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c > index 7f0dceb..3a51cc7 100644 > --- a/drivers/video/atmel_lcdfb.c > +++ b/drivers/video/atmel_lcdfb.c > @@ -107,10 +107,7 @@ void lcd_ctrl_init(void *lcdbase) > if (panel_info.vl_tft) > value |= ATMEL_LCDC_DISTYPE_TFT; > > - if (!(panel_info.vl_sync & ATMEL_LCDC_INVLINE_INVERTED)) > - value |= ATMEL_LCDC_INVLINE_INVERTED; > - if (!(panel_info.vl_sync & ATMEL_LCDC_INVFRAME_INVERTED)) > - value |= ATMEL_LCDC_INVFRAME_INVERTED; > + value |= panel_info.vl_sync; What about value |= panel_info.vl_sync & (ATMEL_LCDC_INVLINE_INVERTED | ATMEL_LCDC_INVFRAME_INVERTED); [break lines where convenient] Apart from this being the formal equivalent to the original code, this would make it more clear what can go in, no? Cheers Detlev -- ["From 2.4 to 2.6 to 2.7" discussing release numbering of the Linux kernel] Let the bike-shed-painting begin. -- Linus Torvalds -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de ^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 2/5] atmel_lcdfb: Straighten out funky vl_sync logic 2008-09-02 11:44 ` [U-Boot] [PATCH 2/5] atmel_lcdfb: Straighten out funky vl_sync logic Detlev Zundel @ 2008-09-02 11:53 ` Haavard Skinnemoen 0 siblings, 0 replies; 15+ messages in thread From: Haavard Skinnemoen @ 2008-09-02 11:53 UTC (permalink / raw) To: u-boot Detlev Zundel <dzu@denx.de> wrote: > What about > > value |= panel_info.vl_sync & (ATMEL_LCDC_INVLINE_INVERTED | ATMEL_LCDC_INVFRAME_INVERTED); > > [break lines where convenient] Apart from this being the formal > equivalent to the original code, this would make it more clear what can > go in, no? Well, there's also INVVD, INVCLK and INVDVAL which the original code doesn't care about at all. I'm not sure if all of them are suitable for the vl_sync field, but perhaps the field should be renamed. In Linux, there's just a default_lcdcon2 field which the board code can use to set any flags it wants. I'm not sure if the driver should really bother too much about those flags anyway -- almost all of them depend on the type of display, how it's hooked up, etc. Haavard ^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 2/5] atmel_lcdfb: Straighten out funky vl_sync logic 2008-09-01 14:21 ` [U-Boot] [PATCH 2/5] atmel_lcdfb: Straighten out funky vl_sync logic Haavard Skinnemoen 2008-09-01 14:21 ` [U-Boot] [PATCH 3/5] lcd: Implement lcd_printf() Haavard Skinnemoen 2008-09-02 11:44 ` [U-Boot] [PATCH 2/5] atmel_lcdfb: Straighten out funky vl_sync logic Detlev Zundel @ 2008-10-25 21:33 ` Anatolij Gustschin 2 siblings, 0 replies; 15+ messages in thread From: Anatolij Gustschin @ 2008-10-25 21:33 UTC (permalink / raw) To: u-boot Haavard Skinnemoen wrote: > If the board _didn't_ request INVLINE_INVERTED, we set INVLINE_INVERTED, > otherwise we don't. WTF? > > Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> Applied to u-boot-video/master repo. Thanks. Best regards, Anatolij -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de ^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 1/5] atmel_lcdfb: Eliminate unneeded #include <asm/arch/hardware.h> 2008-09-01 14:21 [U-Boot] [PATCH 1/5] atmel_lcdfb: Eliminate unneeded #include <asm/arch/hardware.h> Haavard Skinnemoen 2008-09-01 14:21 ` [U-Boot] [PATCH 2/5] atmel_lcdfb: Straighten out funky vl_sync logic Haavard Skinnemoen @ 2008-10-25 21:26 ` Anatolij Gustschin 1 sibling, 0 replies; 15+ messages in thread From: Anatolij Gustschin @ 2008-10-25 21:26 UTC (permalink / raw) To: u-boot Haavard Skinnemoen wrote: > atmel_lcdfb doesn't actually need anything from asm/arch/hardware.h. It > includes a file that does, asm/arch/gpio.h, but this file doesn't > include <asm/arch/hardware.h> like it's supposed to. > > Add the missing include to asm/arch/gpio.h and remove the workaround > from the atmel_lcdfb driver. This makes the driver compile on avr32. > > Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> > --- Applied to u-boot-video repository. Thanks. Jean-Christophe ACKed this in http://lists.denx.de/pipermail/u-boot/2008-October/042389.html so I'm going to push it through u-boot-video repo. Best regards, Anatolij -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de ^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2008-10-27 23:03 UTC | newest] Thread overview: 15+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-09-01 14:21 [U-Boot] [PATCH 1/5] atmel_lcdfb: Eliminate unneeded #include <asm/arch/hardware.h> Haavard Skinnemoen 2008-09-01 14:21 ` [U-Boot] [PATCH 2/5] atmel_lcdfb: Straighten out funky vl_sync logic Haavard Skinnemoen 2008-09-01 14:21 ` [U-Boot] [PATCH 3/5] lcd: Implement lcd_printf() Haavard Skinnemoen 2008-09-01 14:21 ` [U-Boot] [PATCH 4/5] lcd: Set lcd_is_enabled before clearing the screen Haavard Skinnemoen 2008-09-01 14:21 ` [U-Boot] [PATCH 5/5] lcd: Let the board code show board-specific info Haavard Skinnemoen 2008-10-25 22:23 ` Anatolij Gustschin 2008-10-26 11:56 ` Jean-Christophe PLAGNIOL-VILLARD 2008-10-27 9:19 ` Anatolij Gustschin 2008-10-25 21:47 ` [U-Boot] [PATCH 4/5] lcd: Set lcd_is_enabled before clearing the screen Anatolij Gustschin 2008-10-25 21:45 ` [U-Boot] [PATCH 3/5] lcd: Implement lcd_printf() Anatolij Gustschin 2008-10-27 23:03 ` Wolfgang Denk 2008-09-02 11:44 ` [U-Boot] [PATCH 2/5] atmel_lcdfb: Straighten out funky vl_sync logic Detlev Zundel 2008-09-02 11:53 ` Haavard Skinnemoen 2008-10-25 21:33 ` Anatolij Gustschin 2008-10-25 21:26 ` [U-Boot] [PATCH 1/5] atmel_lcdfb: Eliminate unneeded #include <asm/arch/hardware.h> Anatolij Gustschin
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox