Skip to contentSkip to conversation

lcd: print custom strings after the logo

PATCH New Ilko Iliev 6 participants 12 messages Oct 21, 2008 – Oct 23, 2008

lore
Share & tools
lore

Ilko Iliev

author
#0 lore raw

PATCH 1/1 lcd: print custom strings after the logo

This patch allows to print custom strings on the LCD after the logo.

index d104b26..a94a4da 100644

common/lcd.c +10 -2
@@ -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 at 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 at atmel.com");
+       sprintf (info, CONFIG_LCD_LOGO_TEXT2);
        lcd_drawchars (LCD_INFO_X, LCD_INFO_Y + VIDEO_FONT_HEIGHT * 2,
                                        (uchar *)info, strlen(info));
#1 lore raw

PATCH 1/1 lcd: print custom strings after the logo

Le mardi 21 octobre 2008 ? 15:10 +0200, Ilko Iliev a ?crit :

Quoted 1 line

This patch allows to print custom strings on the LCD after the logo.

Hi Ilko,

common/lcd.c static void *lcd_logo (void) · line 832

Quoted 13 lines

index d104b26..a94a4da 100644

common/lcd.c +3 -1
@@ -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 ?

Signature · 1 line
Stelian Pop <[email protected]>
author
#2 lore raw

PATCH 1/1 lcd: print custom strings after the logo

Hello Stelian,

Quoted 17 lines · Stelian Pop

Le mardi 21 octobre 2008 ? 15:10 +0200, Ilko Iliev a ?crit :

Quoted 2 lines

This patch allows to print custom strings on the LCD after the logo.

Hi Ilko,

Quoted 9 lines

index d104b26..a94a4da 100644

common/lcd.c +0 -0
@@ -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));
 
Quoted 9 lines

common/lcd.c static void *lcd_logo (void) · line 841

Quoted 5 lines
common/lcd.c +3 -1
-       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

#3 lore raw

PATCH 1/1 lcd: print custom strings after the logo

Le mardi 21 octobre 2008 ? 18:43 +0200, Ilko Iliev a ?crit :

Quoted 8 lines
Quoted 8 lines

common/lcd.c static void *lcd_logo (void) · line 832

Quoted 4 lines
common/lcd.c +3 -0
+#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 ?

Quoted 6 lines

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

Quoted 2 lines

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.

Quoted 3 lines

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.

Signature · 1 line
Stelian Pop <[email protected]>
#4 lore raw

PATCH 1/1 lcd: print custom strings after the logo

In reply to Stelian Pop

Dear Stelian Pop,

Quoted 6 lines · In message <1224606181.6551.18.camel@galileo> you wrote:

common/lcd.c static void *lcd_logo (void) · line 832

Quoted 3 lines
common/lcd.c +3 -0
+#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

Signature · 5 lines
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
Der Horizont vieler Menschen ist ein Kreis mit Radius Null --
und das nennen sie ihren Standpunkt.
#5 lore raw

PATCH 1/1 lcd: print custom strings after the logo

Quoted 10 lines · Wolfgang Denk

Dear Stelian Pop,

Quoted 6 lines · In message <1224606181.6551.18.camel@galileo> you wrote:

common/lcd.c static void *lcd_logo (void) · line 832

Quoted 3 lines
common/lcd.c +3 -0
+#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 ?

Quoted 4 lines

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.

#6 lore raw

PATCH 1/1 lcd: print custom strings after the logo

Quoted 9 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 8 lines · Wolfgang Denk

Dear Stelian Pop,

Quoted 5 lines · In message <1224606181.6551.18.camel@galileo> you wrote:

common/lcd.c static void *lcd_logo (void) · line 832

Quoted 3 lines
common/lcd.c +3 -0
+#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 ?

Quoted 5 lines
Quoted 4 lines

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

#7 lore raw

PATCH 1/1 lcd: print custom strings after the logo

In reply to Wolfgang Denk
Quoted 10 lines · Wolfgang Denk

Dear Stelian Pop,

Quoted 6 lines · In message <1224606181.6551.18.camel@galileo> you wrote:

common/lcd.c static void *lcd_logo (void) · line 832

Quoted 3 lines
common/lcd.c +3 -0
+#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 ?

Quoted 4 lines

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

#8 lore raw

PATCH 1/1 lcd: print custom strings after the logo

Quoted 11 lines · Haavard Skinnemoen
Quoted 10 lines · Wolfgang Denk

Dear Stelian Pop,

Quoted 6 lines · In message <1224606181.6551.18.camel@galileo> you wrote:

common/lcd.c static void *lcd_logo (void) · line 832

Quoted 3 lines
common/lcd.c +3 -0
+#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 ?

Quoted 9 lines
Quoted 4 lines

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.

#9 lore raw

PATCH 1/1 lcd: print custom strings after the logo

Quoted 6 lines · On Thu, 23 Oct 2008 20:53:37 +0200 Jean-Christophe PLAGNIOL-VILLARD…
Quoted 4 lines

I wish someone would bother looking at

http://lists.denx.de/pipermail/u-boot/2008-September/039837.html

I like It

Great!

Quoted 2 lines

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

#10 lore raw

PATCH 1/1 lcd: print custom strings after the logo

In reply to Haavard Skinnemoen

Dear Haavard Skinnemoen,

Quoted 9 lines · In message <[email protected]> you wrote:
Quoted 2 lines

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

Signature · 5 lines
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
Any sufficiently advanced bug is indistinguishable from a feature.
                                                      - Rich Kulawiec
#11 lore raw

PATCH 1/1 lcd: print custom strings after the logo

Quoted 10 lines · Wolfgang Denk

Dear Haavard Skinnemoen,

Quoted 7 lines · In message <[email protected]> you wrote:
Quoted 2 lines

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

Quoted 7 lines
Quoted 2 lines

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.