[U-Boot] [PATCH] lcd: print custom strings after the logo

This patch allows to print custom strings on the LCD after the logo.
Signed-off-by: Ilko Iliev iliev@ronetix.at
index d104b26..a94a4da 100644 --- a/common/lcd.c +++ b/common/lcd.c @@ -827,11 +827,19 @@ static void *lcd_logo (void) sprintf (info, "%s", U_BOOT_VERSION); lcd_drawchars (LCD_INFO_X, LCD_INFO_Y, (uchar *)info, strlen(info));
- sprintf (info, "(C) 2008 ATMEL Corp"); +#ifndef CONFIG_LCD_LOGO_TEXT1 +# define CONFIG_LCD_LOGO_TEXT1 "(C) 2008 ATMEL Corp" +#endif + +#ifndef CONFIG_LCD_LOGO_TEXT2 +# define CONFIG_LCD_LOGO_TEXT2 "at91support@atmel.com" +#endif + + sprintf (info, CONFIG_LCD_LOGO_TEXT1); lcd_drawchars (LCD_INFO_X, LCD_INFO_Y + VIDEO_FONT_HEIGHT, (uchar *)info, strlen(info));
- sprintf (info, "at91support@atmel.com"); + sprintf (info, CONFIG_LCD_LOGO_TEXT2); lcd_drawchars (LCD_INFO_X, LCD_INFO_Y + VIDEO_FONT_HEIGHT * 2, (uchar *)info, strlen(info));

Le mardi 21 octobre 2008 à 15:10 +0200, Ilko Iliev a écrit :
This patch allows to print custom strings on the LCD after the logo.
Hi Ilko,
Signed-off-by: Ilko Iliev iliev@ronetix.at
index d104b26..a94a4da 100644 --- a/common/lcd.c +++ b/common/lcd.c @@ -827,11 +827,19 @@ static void *lcd_logo (void) sprintf (info, "%s", U_BOOT_VERSION); lcd_drawchars (LCD_INFO_X, LCD_INFO_Y, (uchar *)info, strlen(info));
sprintf (info, "(C) 2008 ATMEL Corp");
+#ifndef CONFIG_LCD_LOGO_TEXT1 +# define CONFIG_LCD_LOGO_TEXT1 "(C) 2008 ATMEL Corp" +#endif
Wouldn't it be better if we move this text into include/configs/at91xxx.h for all the boards ?

Hello Stelian,
Stelian Pop wrote:
Le mardi 21 octobre 2008 à 15:10 +0200, Ilko Iliev a écrit :
This patch allows to print custom strings on the LCD after the logo.
Hi Ilko,
Signed-off-by: Ilko Iliev iliev@ronetix.at
index d104b26..a94a4da 100644 --- a/common/lcd.c +++ b/common/lcd.c @@ -827,11 +827,19 @@ static void *lcd_logo (void) sprintf (info, "%s", U_BOOT_VERSION); lcd_drawchars (LCD_INFO_X, LCD_INFO_Y, (uchar *)info, strlen(info));
sprintf (info, "(C) 2008 ATMEL Corp");
+#ifndef CONFIG_LCD_LOGO_TEXT1 +# define CONFIG_LCD_LOGO_TEXT1 "(C) 2008 ATMEL Corp" +#endif
Wouldn't it be better if we move this text into include/configs/at91xxx.h for all the boards ?
Yes, it will be better. Because I'm a newbie in the U-BOOT development I didn't want to make changes in all boards.
I have also other suggestions: see my email for the lowlevel_init.S
Do you know why the CPU registers are defined in this way: #define AT91_PMC (0xfffffc00 - AT91_BASE_SYS)
This is OK for a C-code, but for an assembler it is a problem because the following code gives an "Error: bad immediate value for offset": ldr r1, =AT91_BASE_SYS ldr r0, [r1, #AT91_PMC_MCKR]
regards, Ilko Iliev

Le mardi 21 octobre 2008 à 18:43 +0200, Ilko Iliev a écrit :
+#ifndef CONFIG_LCD_LOGO_TEXT1 +# define CONFIG_LCD_LOGO_TEXT1 "(C) 2008 ATMEL Corp" +#endif
Wouldn't it be better if we move this text into include/configs/at91xxx.h for all the boards ?
Yes, it will be better. Because I'm a newbie in the U-BOOT development I didn't want to make changes in all boards.
I have also other suggestions: see my email for the lowlevel_init.S
Yes, I saw them. Wolfgang proposed to use a weak function, which is probably way better
Do you know why the CPU registers are defined in this way: #define AT91_PMC (0xfffffc00 - AT91_BASE_SYS)
This is because the header files ware copied (with some editing) from Linux, and this is how Linux does define those register offsets.
This is OK for a C-code, but for an assembler it is a problem because the following code gives an "Error: bad immediate value for offset": ldr r1, =AT91_BASE_SYS
You shouldn't do this. Look at at91_sys_read()/at91_sys_write() implementation. So the code should be: ldr r1, =(AT91_BASE_SYS + AT91_PMC)
which will be optimised by cpp to: ldr r1, =0xfffffc00
Stelian.

Dear Stelian Pop,
In message 1224606181.6551.18.camel@galileo you wrote:
+#ifndef CONFIG_LCD_LOGO_TEXT1 +# define CONFIG_LCD_LOGO_TEXT1 "(C) 2008 ATMEL Corp" +#endif
Wouldn't it be better if we move this text into include/configs/at91xxx.h for all the boards ?
Yes, please.
Anatolij, Jean-Christophe - who of you will be taking care of this?
Best regards,
Wolfgang Denk

On 21:40 Tue 21 Oct , Wolfgang Denk wrote:
Dear Stelian Pop,
In message 1224606181.6551.18.camel@galileo you wrote:
+#ifndef CONFIG_LCD_LOGO_TEXT1 +# define CONFIG_LCD_LOGO_TEXT1 "(C) 2008 ATMEL Corp" +#endif
Wouldn't it be better if we move this text into include/configs/at91xxx.h for all the boards ?
Yes, please.
Anatolij, Jean-Christophe - who of you will be taking care of this?
I'm reveiwing at91 now so if Anatolij see no problem I'll take care of this
Best Regards, J.

Jean-Christophe PLAGNIOL-VILLARD wrote:
On 21:40 Tue 21 Oct , Wolfgang Denk wrote:
Dear Stelian Pop,
In message 1224606181.6551.18.camel@galileo you wrote:
+#ifndef CONFIG_LCD_LOGO_TEXT1 +# define CONFIG_LCD_LOGO_TEXT1 "(C) 2008 ATMEL Corp" +#endif
Wouldn't it be better if we move this text into include/configs/at91xxx.h for all the boards ?
Yes, please.
Anatolij, Jean-Christophe - who of you will be taking care of this?
I'm reveiwing at91 now so if Anatolij see no problem I'll take care of this
no problem, it is Ok with me.
Best regards, Anatolij

Wolfgang Denk wd@denx.de wrote:
Dear Stelian Pop,
In message 1224606181.6551.18.camel@galileo you wrote:
+#ifndef CONFIG_LCD_LOGO_TEXT1 +# define CONFIG_LCD_LOGO_TEXT1 "(C) 2008 ATMEL Corp" +#endif
Wouldn't it be better if we move this text into include/configs/at91xxx.h for all the boards ?
Yes, please.
Anatolij, Jean-Christophe - who of you will be taking care of this?
I wish someone would bother looking at
http://lists.denx.de/pipermail/u-boot/2008-September/039837.html
at some point so that we can stop filling common/lcd.c with board-specific code...
Haavard

On 20:36 Thu 23 Oct , Haavard Skinnemoen wrote:
Wolfgang Denk wd@denx.de wrote:
Dear Stelian Pop,
In message 1224606181.6551.18.camel@galileo you wrote:
+#ifndef CONFIG_LCD_LOGO_TEXT1 +# define CONFIG_LCD_LOGO_TEXT1 "(C) 2008 ATMEL Corp" +#endif
Wouldn't it be better if we move this text into include/configs/at91xxx.h for all the boards ?
Yes, please.
Anatolij, Jean-Christophe - who of you will be taking care of this?
I wish someone would bother looking at
http://lists.denx.de/pipermail/u-boot/2008-September/039837.html
I like It
Just one think it will be nice if we can merge lcd_printf withas an outpout of the new IOMUX
Best Regards, J.

On Thu, 23 Oct 2008 20:53:37 +0200 Jean-Christophe PLAGNIOL-VILLARD plagnioj@jcrosoft.com wrote:
I wish someone would bother looking at
http://lists.denx.de/pipermail/u-boot/2008-September/039837.html
I like It
Great!
Just one think it will be nice if we can merge lcd_printf withas an outpout of the new IOMUX
If lcd_puts() is switched over, lcd_printf() will follow automatically, won't it?
Haavard

Dear Haavard Skinnemoen,
In message 20081023203641.4bb773b6@siona.skinnemoen.net you wrote:
Anatolij, Jean-Christophe - who of you will be taking care of this?
I wish someone would bother looking at
http://lists.denx.de/pipermail/u-boot/2008-September/039837.html
at some point so that we can stop filling common/lcd.c with board-specific code...
Excellent point. Thanks for the reminder.
Anatolij, Jean-Christophe - do you ACK this patch? I would pull it in, then.
Best regards,
Wolfgang Denk

On 21:19 Thu 23 Oct , Wolfgang Denk wrote:
Dear Haavard Skinnemoen,
In message 20081023203641.4bb773b6@siona.skinnemoen.net you wrote:
Anatolij, Jean-Christophe - who of you will be taking care of this?
I wish someone would bother looking at
http://lists.denx.de/pipermail/u-boot/2008-September/039837.html
at some point so that we can stop filling common/lcd.c with board-specific code...
Excellent point. Thanks for the reminder.
Anatolij, Jean-Christophe - do you ACK this patch? I would pull it in, then.
As I said I like it So I ACK it
Best Regards, J.
participants (6)
-
Anatolij Gustschin
-
Haavard Skinnemoen
-
Ilko Iliev
-
Jean-Christophe PLAGNIOL-VILLARD
-
Stelian Pop
-
Wolfgang Denk