davinci: ea20: reorganisation LCD startup
PATCH 1/6 davinci: ea20: reorganisation LCD startup
--- board/davinci/ea20/ea20.c | 23 +++++++++++++++-------- 1 files changed, 15 insertions(+), 8 deletions(-)
board/davinci/ea20/ea20.c +15 -8
@@ -176,6 +176,9 @@ int board_early_init_f(void)if (davinci_configure_pin_mux (gpio_pins,ARRAY_SIZE (gpio_pins)) !=0 )return 1 ; +/* Set DISP_ON high to enable LCD output*/ +gpio_direction_output (97 ,1 ); +/* Set the RESETOUTn low */ gpio_direction_output (111 ,0 );
@@ -188,9 +191,6 @@ int board_early_init_f(void)/* Set LCD_B_PWR low to power down LCD Backlight*/ gpio_direction_output (102 ,0 ); -/* Set DISP_ON low to disable LCD output*/ -gpio_direction_output (97 ,0 ); -#ifndef CONFIG_USE_IRQ irq_init ();#endif
@@ -250,11 +250,6 @@ int board_early_init_f(void)writel (readl (&davinci_syscfg_regs->mstpri[2 ]) &0x0fffffff , &davinci_syscfg_regs->mstpri[2 ]); -/* Set LCD_B_PWR low to power up LCD Backlight*/ -gpio_set_value (102 ,1 ); - -/* Set DISP_ON low to disable LCD output*/ -gpio_set_value (97 ,1 );return 0 ; }
@@ -276,6 +271,9 @@ int board_init(void)int board_late_init (void ) { +unsigned char buf[2 ]; +int ret; +/* PinMux for HALTEN */ if (davinci_configure_pin_mux (halten_pin,ARRAY_SIZE (halten_pin)) !=0 )return 1 ;
@@ -285,6 +283,15 @@ int board_late_init(void)setenv ("stdout" ,"serial" ); +/* Set fixed contrast settings for LCD via I2C potentiometer */ + buf[0 ] =0x00 ; + buf[1 ] =0xd7 ; + ret =i2c_write (0x2e ,6 ,1 , buf,2 ); +if (ret) +puts ("\nContrast Settings FAILED\n" ); + +/* Set LCD_B_PWR high to power up LCD Backlight*/ +gpio_set_value (102 ,1 ); return 0; }#endif /* CONFIG_BOARD_LATE_INIT */
Signature · 1 line
1.7.0.4
PATCH 2/6 davinci: ea20: the console is always set to the serial line
Do not allow to overwrite it when video is enabled.
--- board/davinci/ea20/ea20.c | 11 +++++++++-- include/configs/ea20.h | 2 ++ 2 files changed, 11 insertions(+), 2 deletions(-)
board/davinci/ea20/ea20.c +9 -2
@@ -254,6 +254,15 @@ int board_early_init_f(void)return 0 ; } +/* +* Do not overwrite the console +* Use always serial for U-Boot console +*/ +int overwrite_console (void ) +{ +return 1 ; +} +int board_init (void ) {/* arch number of the board */
@@ -281,8 +290,6 @@ int board_late_init(void)/* Set HALTEN to high */ gpio_direction_output (134 ,1 ); -setenv ("stdout" ,"serial" ); -/* Set fixed contrast settings for LCD via I2C potentiometer */ buf[0 ] =0x00 ; buf[1 ] =0xd7 ;
include/configs/ea20.h +2 -0
@@ -125,6 +125,8 @@#define CONFIG_VIDEO_LOGO #define CONFIG_VIDEO_BMP_RLE8 #define CONFIG_CMD_BMP +#define CONFIG_SYS_CONSOLE_IS_IN_ENV +#define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE #endif /*
Signature · 1 line
1.7.0.4
PATCH 2/6 davinci: ea20: the console is always set to the serial line
Quoted 6 lines · Bastian Ruppert
Do not allow to overwrite it when video is enabled.
Signed-off-by Bastian Ruppert <[email protected]>CC Tom Rini <[email protected]>CC Stefano Babic <[email protected]>---
Best regards,
Stefano Babic
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-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH 3/6 video: cfb_console: logo can be positioned via the splashpos variable
In reply to Bastian Ruppert--- drivers/video/cfb_console.c | 61 ++++++++++++++++++++++++++++--------------- 1 files changed, 40 insertions(+), 21 deletions(-)
drivers/video/cfb_console.c +40 -21
@@ -66,7 +66,11 @@* CONFIG_CONSOLE_TIME - display time/date in upper right * corner, needs CONFIG_CMD_DATE and * CONFIG_CONSOLE_CURSOR -* CONFIG_VIDEO_LOGO - display Linux Logo in upper left corner +* CONFIG_VIDEO_LOGO - display Linux Logo in upper left corner. +* Use CONFIG_SPLASH_SCREEN_ALIGN with +* environment variable "splashpos" to place +* the logo on other position. In this case +* no CONSOLE_EXTRA_INFO is possible. * CONFIG_VIDEO_BMP_LOGO - use bmp_logo instead of linux_logo * CONFIG_CONSOLE_EXTRA_INFO - display additional board information * strings that normaly goes to serial
@@ -369,6 +373,8 @@ static void *video_fb_address; /* frame buffer address */static void *video_console_address;/* console buffer start address */ static int video_logo_height =VIDEO_LOGO_HEIGHT ; +static int video_logo_xpos; +static int video_logo_ypos;static int __maybe_unused cursor_state;static int __maybe_unused old_col;
@@ -1594,40 +1600,53 @@ static void *video_logo(void)__maybe_unused int y_off =0 ;#ifdef CONFIG_SPLASH_SCREEN -char *s;ulong addr; - - s =getenv ("splashimage" ); +#endif +#if defined(CONFIG_SPLASH_SCREEN ) || defined(CONFIG_SPLASH_SCREEN_ALIGN ) +char *s; +#endif +#ifdef CONFIG_SPLASH_SCREEN_ALIGN + s =getenv ("splashpos" );if (s !=NULL ) { -int x =0 , y =0 ; +if (s[0 ] =='m' ) + video_logo_xpos =BMP_ALIGN_CENTER ; +else + video_logo_xpos =simple_strtol (s,NULL ,0 ); - addr =simple_strtoul (s,NULL ,16 ); -#ifdef CONFIG_SPLASH_SCREEN_ALIGN - s =getenv ("splashpos" ); + s =strchr (s +1 ,',' );if (s !=NULL ) { -if (s[0 ] =='m' ) - x =BMP_ALIGN_CENTER ; +if (s[1 ] =='m' ) + video_logo_ypos =BMP_ALIGN_CENTER ;else - x =simple_strtol (s,NULL ,0 ); - - s =strchr (s +1 ,',' ); -if (s !=NULL ) { -if (s[1 ] =='m' ) - y =BMP_ALIGN_CENTER ; -else - y =simple_strtol (s +1 ,NULL ,0 ); - } + video_logo_ypos =simple_strtol (s +1 ,NULL ,0 ); } + }#endif /* CONFIG_SPLASH_SCREEN_ALIGN */ +#ifdef CONFIG_SPLASH_SCREEN + s =getenv ("splashimage" ); +if (s !=NULL ) { + + addr =simple_strtoul (s,NULL ,16 ); -if (video_display_bitmap (addr, x, y) ==0 ) { + +if (video_display_bitmap (addr, \ + video_logo_xpos, \ + video_logo_ypos) ==0 ) { video_logo_height =0 ;return ((void *) (video_fb_address)); } }#endif /* CONFIG_SPLASH_SCREEN */ -logo_plot (video_fb_address,VIDEO_COLS ,0 ,0 ); +logo_plot (video_fb_address, \ +VIDEO_COLS , \ + video_logo_xpos, \ + video_logo_ypos); + +#ifdef CONFIG_SPLASH_SCREEN_ALIGN +/* when using splashpos for video_logo, no console output */ +return (video_fb_address + video_logo_height *VIDEO_LINE_LEN ); +#endif sprintf (info," %s" , version_string);
Signature · 1 line
1.7.0.4
PATCH v2 3/6 video: cfb_console: logo can be positioned via the splashpos variable
From: Bastian Ruppert <[email protected]>
Extend the driver for placing the video/bmp logo as specified by "splashpos" environment variable.
---
v2:
- remove some ifdefs
- revise commit log
- adjust video_logo_height by video_logo_ypos and thus fix return address for video console offset
- add BMP_ALIGN_CENTER case to logo_plot() for proper logo offset calculation if "m" specifier is used in splashpos
drivers/video/cfb_console.c | 88 ++++++++++++++++++++++++++++++------------ 1 files changed, 63 insertions(+), 25 deletions(-)
drivers/video/cfb_console.c +63 -25
@@ -66,7 +66,11 @@* CONFIG_CONSOLE_TIME - display time/date in upper right * corner, needs CONFIG_CMD_DATE and * CONFIG_CONSOLE_CURSOR -* CONFIG_VIDEO_LOGO - display Linux Logo in upper left corner +* CONFIG_VIDEO_LOGO - display Linux Logo in upper left corner. +* Use CONFIG_SPLASH_SCREEN_ALIGN with +* environment variable "splashpos" to place +* the logo on other position. In this case +* no CONSOLE_EXTRA_INFO is possible. * CONFIG_VIDEO_BMP_LOGO - use bmp_logo instead of linux_logo * CONFIG_CONSOLE_EXTRA_INFO - display additional board information * strings that normaly goes to serial
@@ -369,6 +373,8 @@ static void *video_fb_address; /* frame buffer address */static void *video_console_address;/* console buffer start address */ static int video_logo_height =VIDEO_LOGO_HEIGHT ; +static int video_logo_xpos; +static int video_logo_ypos;static int __maybe_unused cursor_state;static int __maybe_unused old_col;
@@ -1488,8 +1494,21 @@ void logo_plot(void *screen, int width, int x, int y)int ycount = video_logo_height;unsigned char r, g, b, *logo_red, *logo_blue, *logo_green;unsigned char *source; -unsigned char *dest = (unsigned char *) screen + - ((y * width *VIDEO_PIXEL_SIZE ) + x *VIDEO_PIXEL_SIZE ); +unsigned char *dest; + +#ifdef CONFIG_SPLASH_SCREEN_ALIGN +if (x ==BMP_ALIGN_CENTER ) + x =max (0 , (VIDEO_VISIBLE_COLS -VIDEO_LOGO_WIDTH ) /2 ); +else if (x <0 ) + x =max (0 ,VIDEO_VISIBLE_COLS -VIDEO_LOGO_WIDTH + x +1 ); + +if (y ==BMP_ALIGN_CENTER ) + y =max (0 , (VIDEO_VISIBLE_ROWS -VIDEO_LOGO_HEIGHT ) /2 ); +else if (y <0 ) + y =max (0 ,VIDEO_VISIBLE_ROWS -VIDEO_LOGO_HEIGHT + y +1 ); +#endif /* CONFIG_SPLASH_SCREEN_ALIGN */ + + dest = (unsigned char *)screen + (y * width + x) *VIDEO_PIXEL_SIZE ;#ifdef CONFIG_VIDEO_BMP_LOGO source = bmp_logo_bitmap;
@@ -1592,42 +1611,61 @@ static void *video_logo(void)char info[128 ];int space, len;__maybe_unused int y_off =0 ; +__maybe_unused ulong addr; +__maybe_unused char *s; -#ifdef CONFIG_SPLASH_SCREEN -char *s; -ulong addr; - - s =getenv ("splashimage" ); +#ifdef CONFIG_SPLASH_SCREEN_ALIGN + s =getenv ("splashpos" );if (s !=NULL ) { -int x =0 , y =0 ; +if (s[0 ] =='m' ) + video_logo_xpos =BMP_ALIGN_CENTER ; +else + video_logo_xpos =simple_strtol (s,NULL ,0 ); - addr =simple_strtoul (s,NULL ,16 ); -#ifdef CONFIG_SPLASH_SCREEN_ALIGN - s =getenv ("splashpos" ); + s =strchr (s +1 ,',' );if (s !=NULL ) { -if (s[0 ] =='m' ) - x =BMP_ALIGN_CENTER ; +if (s[1 ] =='m' ) + video_logo_ypos =BMP_ALIGN_CENTER ;else - x =simple_strtol (s,NULL ,0 ); - - s =strchr (s +1 ,',' ); -if (s !=NULL ) { -if (s[1 ] =='m' ) - y =BMP_ALIGN_CENTER ; -else - y =simple_strtol (s +1 ,NULL ,0 ); - } + video_logo_ypos =simple_strtol (s +1 ,NULL ,0 ); } + }#endif /* CONFIG_SPLASH_SCREEN_ALIGN */ -if (video_display_bitmap (addr, x, y) ==0 ) { +#ifdef CONFIG_SPLASH_SCREEN + s =getenv ("splashimage" ); +if (s !=NULL ) { + + addr =simple_strtoul (s,NULL ,16 ); + + +if (video_display_bitmap (addr, + video_logo_xpos, + video_logo_ypos) ==0 ) { video_logo_height =0 ;return ((void *) (video_fb_address)); } }#endif /* CONFIG_SPLASH_SCREEN */ -logo_plot (video_fb_address,VIDEO_COLS ,0 ,0 ); +logo_plot (video_fb_address,VIDEO_COLS , + video_logo_xpos, video_logo_ypos); + +#ifdef CONFIG_SPLASH_SCREEN_ALIGN +/* +* when using splashpos for video_logo, skip any info +* output on video console if the logo is not@0,0 +*/ +if (video_logo_xpos || video_logo_ypos) { +/* +* video_logo_height is used in text and cursor offset +* calculations. Since the console is below the logo, +* we need to adjust the logo height +*/ + video_logo_height += video_logo_ypos; +return video_fb_address + video_logo_height *VIDEO_LINE_LEN ; + } +#endif sprintf (info," %s" , version_string);
Signature · 1 line
1.7.1
PATCH v2 3/6 video: cfb_console: logo can be positioned via the splashpos variable
Hello Anatolij,
Quoted 21 lines
[U-Boot] [PATCH v2 3/6] video:
cfb_console: logo can be positioned via the splashpos variableFrom: Bastian Ruppert <[email protected]>
Extend the driver for placing the video/bmp logo as specified by "splashpos" environment variable.
Signed-off-by Bastian Ruppert <[email protected]>Signed-off-by Anatolij Gustschin <[email protected]>CC Tom Rini <[email protected]>CC Stefano Babic <[email protected]>---
v2:
- remove some ifdefs
- revise commit log
- adjustvideo_logo_heightbyvideo_logo_yposand thus fix return address for video console offset
- addBMP_ALIGN_CENTERcase tologo_plot()for proper logo offset calculation if "m" specifier is used in splashpos
Quoted 1 line
drivers/video/cfb_console.c | 88 +++++++++++++++++++++++++++++
+------------ > 1 files changed, 63 insertions(+), 25 deletions(-)
drivers/video/cfb_console.c static void *video_fb_address; /* frame
Quoted 19 lines
drivers/video/cfb_console.c +5
-1@@ -66,7 +66,11 @@* CONFIG_CONSOLE_TIME - display time/date in upper right * corner, needs CONFIG_CMD_DATE and * CONFIG_CONSOLE_CURSOR -* CONFIG_VIDEO_LOGO - display Linux Logo in upper left corner +* CONFIG_VIDEO_LOGO - display Linux Logo in upper left corner. +* Use CONFIG_SPLASH_SCREEN_ALIGN with +* environment variable "splashpos" to place +* the logo on other position. In this case +* no CONSOLE_EXTRA_INFO is possible. * CONFIG_VIDEO_BMP_LOGO - use bmp_logo instead of linux_logo * CONFIG_CONSOLE_EXTRA_INFO - display additional board information * strings that normaly goes to serial @@ -369,6 +373,8 @@ static void *video_fb_address; /* frame
bufferaddress */
drivers/video/cfb_console.c void logo_plot(void *screen, int width, int x, int
Quoted 9 lines
drivers/video/cfb_console.c +2
-0static void *video_console_address;/* console buffer start address */ static int video_logo_height =VIDEO_LOGO_HEIGHT ; +static int video_logo_xpos; +static int video_logo_ypos;static int __maybe_unused cursor_state;static int __maybe_unused old_col;@@ -1488,8 +1494,21 @@ void logo_plot(void *screen, int width, int x, int
y)
Quoted 94 lines
drivers/video/cfb_console.c +46
-24int ycount = video_logo_height;unsigned char r, g, b, *logo_red, *logo_blue, *logo_green;unsigned char *source; -unsigned char *dest = (unsigned char *) screen + - ((y * width *VIDEO_PIXEL_SIZE ) + x *VIDEO_PIXEL_SIZE ); +unsigned char *dest; + +#ifdef CONFIG_SPLASH_SCREEN_ALIGN +if (x ==BMP_ALIGN_CENTER ) + x =max (0 , (VIDEO_VISIBLE_COLS -VIDEO_LOGO_WIDTH ) /2 ); +else if (x <0 ) + x =max (0 ,VIDEO_VISIBLE_COLS -VIDEO_LOGO_WIDTH + x +1 ); + +if (y ==BMP_ALIGN_CENTER ) + y =max (0 , (VIDEO_VISIBLE_ROWS -VIDEO_LOGO_HEIGHT ) /2 ); +else if (y <0 ) + y =max (0 ,VIDEO_VISIBLE_ROWS -VIDEO_LOGO_HEIGHT + y +1 ); +#endif /* CONFIG_SPLASH_SCREEN_ALIGN */ + + dest = (unsigned char *)screen + (y * width + x) *VIDEO_PIXEL_SIZE ;#ifdef CONFIG_VIDEO_BMP_LOGO source = bmp_logo_bitmap;@@ -1592,42 +1611,61 @@ static void *video_logo(void)char info[128 ];int space, len;__maybe_unused int y_off =0 ; +__maybe_unused ulong addr; +__maybe_unused char *s; -#ifdef CONFIG_SPLASH_SCREEN -char *s; -ulong addr; - - s =getenv ("splashimage" ); +#ifdef CONFIG_SPLASH_SCREEN_ALIGN + s =getenv ("splashpos" );if (s !=NULL ) { -int x =0 , y =0 ; +if (s[0 ] =='m' ) + video_logo_xpos =BMP_ALIGN_CENTER ; +else + video_logo_xpos =simple_strtol (s,NULL ,0 ); - addr =simple_strtoul (s,NULL ,16 ); -#ifdef CONFIG_SPLASH_SCREEN_ALIGN - s =getenv ("splashpos" ); + s =strchr (s +1 ,',' );if (s !=NULL ) { -if (s[0 ] =='m' ) - x =BMP_ALIGN_CENTER ; +if (s[1 ] =='m' ) + video_logo_ypos =BMP_ALIGN_CENTER ;else - x =simple_strtol (s,NULL ,0 ); - - s =strchr (s +1 ,',' ); -if (s !=NULL ) { -if (s[1 ] =='m' ) - y =BMP_ALIGN_CENTER ; -else - y =simple_strtol (s +1 ,NULL ,0 ); - } + video_logo_ypos =simple_strtol (s +1 ,NULL ,0 ); } + }#endif /* CONFIG_SPLASH_SCREEN_ALIGN */ -if (video_display_bitmap (addr, x, y) ==0 ) { +#ifdef CONFIG_SPLASH_SCREEN + s =getenv ("splashimage" ); +if (s !=NULL ) { + + addr =simple_strtoul (s,NULL ,16 ); + + +if (video_display_bitmap (addr, + video_logo_xpos, + video_logo_ypos) ==0 ) { video_logo_height =0 ;return ((void *) (video_fb_address)); } }#endif /* CONFIG_SPLASH_SCREEN */ -logo_plot (video_fb_address,VIDEO_COLS ,0 ,0 ); +logo_plot (video_fb_address,VIDEO_COLS , + video_logo_xpos, video_logo_ypos); + +#ifdef CONFIG_SPLASH_SCREEN_ALIGN +/* +* when using splashpos for video_logo, skip any info +* output on video console if the logo is not at 0,0 +*/
drivers/video/cfb_console.c static void *video_logo(void) · line 1668
Quoted 10 lines
drivers/video/cfb_console.c +10
-0+if (video_logo_xpos || video_logo_ypos) { +/* +* video_logo_height is used in text and cursor offset +* calculations. Since the console is below the logo, +* we need to adjust the logo height +*/ + video_logo_height += video_logo_ypos; +return video_fb_address + video_logo_height *VIDEO_LINE_LEN ; + } +#endif
I have some trouble with this version when using splashpos = m,m . In this case video_logo_ypos is 32767 (BMP_ALIGN_CENTER) here. Following extension isworking for me:
#ifdef CONFIG_SPLASH_SCREEN_ALIGN
/*
* when using splashpos for video_logo, skip any info
* output on video console if the logo is not at 0,0
*/
if (video_logo_xpos || video_logo_ypos) {
/*
* video_logo_height is used in text and cursor offset
* calculations. Since the console is below the logo,
* we need to adjust the logo height
*/
if (video_logo_ypos == BMP_ALIGN_CENTER)
video_logo_height += max(0, (VIDEO_VISIBLE_ROWS - \
VIDEO_LOGO_HEIGHT) /2);
else if (video_logo_ypos >= 0)
video_logo_height += video_logo_ypos;
return video_fb_address + video_logo_height *
VIDEO_LINE_LEN;
}#endif
Should i post a version 3 for this patch?
Quoted 10 lines
drivers/video/cfb_console.c +0
-1sprintf (info," %s" , version_string); --1.7.1
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
Regards,
Bastian.
PATCH v2 3/6 video: cfb_console: logo can be positioned via the splashpos variable
Hello Bastian,
On Wed, 5 Sep 2012 12:52:59 +0200
Bastian.Ruppert at sewerin.de wrote:
...
Quoted 8 lines
drivers/video/cfb_console.c static void *video_logo(void) · line 1668
Quoted 4 lines
drivers/video/cfb_console.c +4
-0+ video_logo_height += video_logo_ypos; + return video_fb_address + video_logo_height * VIDEO_LINE_LEN; + } +#endif I have some trouble with this version when using splashpos = m,m . In this case
video_logo_yposis 32767 (BMP_ALIGN_CENTER) here. Following extension isworking for me:
Ah, indeed. Thanks for testing and catching it.
Quoted 14 lines
#ifdef CONFIG_SPLASH_SCREEN_ALIGN
/*
* when using splashpos for video_logo, skip any info
* output on video console if the logo is not at 0,0
*/
if (video_logo_xpos || video_logo_ypos) {
/*
* video_logo_height is used in text and cursor offset
* calculations. Since the console is below the logo,
* we need to adjust the logo height
*/
if (video_logo_ypos == BMP_ALIGN_CENTER)
video_logo_height += max(0, (VIDEO_VISIBLE_ROWS - \
VIDEO_LOGO_HEIGHT) /Quoted 3 lines
2);
else if (video_logo_ypos>= 0)
video_logo_height+=video_logo_ypos;
OK. But please use
else if (video_logo_ypos > 0) video_logo_height += video_logo_ypos;
...
Quoted 1 line
Should i post a version 3 for this patch?
Yes, please.
Thanks,
Anatolij
PATCH v3 1/6 davinci: ea20: reorganisation LCD startup
In reply to Anatolij Gustschin--- board/davinci/ea20/ea20.c | 23 +++++++++++++++-------- 1 files changed, 15 insertions(+), 8 deletions(-)
board/davinci/ea20/ea20.c +15 -8
@@ -176,6 +176,9 @@ int board_early_init_f(void)if (davinci_configure_pin_mux (gpio_pins,ARRAY_SIZE (gpio_pins)) !=0 )return 1 ; +/* Set DISP_ON high to enable LCD output*/ +gpio_direction_output (97 ,1 ); +/* Set the RESETOUTn low */ gpio_direction_output (111 ,0 );
@@ -188,9 +191,6 @@ int board_early_init_f(void)/* Set LCD_B_PWR low to power down LCD Backlight*/ gpio_direction_output (102 ,0 ); -/* Set DISP_ON low to disable LCD output*/ -gpio_direction_output (97 ,0 ); -#ifndef CONFIG_USE_IRQ irq_init ();#endif
@@ -250,11 +250,6 @@ int board_early_init_f(void)writel (readl (&davinci_syscfg_regs->mstpri[2 ]) &0x0fffffff , &davinci_syscfg_regs->mstpri[2 ]); -/* Set LCD_B_PWR low to power up LCD Backlight*/ -gpio_set_value (102 ,1 ); - -/* Set DISP_ON low to disable LCD output*/ -gpio_set_value (97 ,1 );return 0 ; }
@@ -276,6 +271,9 @@ int board_init(void)int board_late_init (void ) { +unsigned char buf[2 ]; +int ret; +/* PinMux for HALTEN */ if (davinci_configure_pin_mux (halten_pin,ARRAY_SIZE (halten_pin)) !=0 )return 1 ;
@@ -285,6 +283,15 @@ int board_late_init(void)setenv ("stdout" ,"serial" ); +/* Set fixed contrast settings for LCD via I2C potentiometer */ + buf[0 ] =0x00 ; + buf[1 ] =0xd7 ; + ret =i2c_write (0x2e ,6 ,1 , buf,2 ); +if (ret) +puts ("\nContrast Settings FAILED\n" ); + +/* Set LCD_B_PWR high to power up LCD Backlight*/ +gpio_set_value (102 ,1 ); return 0; }#endif /* CONFIG_BOARD_LATE_INIT */
Signature · 1 line
1.7.0.4
PATCH v3 2/6 davinci: ea20: the console is always set to the serial line
In reply to Anatolij GustschinDo not allow to overwrite it when video is enabled.
--- board/davinci/ea20/ea20.c | 11 +++++++++-- include/configs/ea20.h | 2 ++ 2 files changed, 11 insertions(+), 2 deletions(-)
board/davinci/ea20/ea20.c +9 -2
@@ -254,6 +254,15 @@ int board_early_init_f(void)return 0 ; } +/* +* Do not overwrite the console +* Use always serial for U-Boot console +*/ +int overwrite_console (void ) +{ +return 1 ; +} +int board_init (void ) {/* arch number of the board */
@@ -281,8 +290,6 @@ int board_late_init(void)/* Set HALTEN to high */ gpio_direction_output (134 ,1 ); -setenv ("stdout" ,"serial" ); -/* Set fixed contrast settings for LCD via I2C potentiometer */ buf[0 ] =0x00 ; buf[1 ] =0xd7 ;
include/configs/ea20.h +2 -0
@@ -125,6 +125,8 @@#define CONFIG_VIDEO_LOGO #define CONFIG_VIDEO_BMP_RLE8 #define CONFIG_CMD_BMP +#define CONFIG_SYS_CONSOLE_IS_IN_ENV +#define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE #endif /*
Signature · 1 line
1.7.0.4
PATCH v3 3/6 video: cfb_console: logo can be positioned via the splashpos variable
In reply to Anatolij GustschinExtend the driver for placing the video/bmp logo as specified by "splashpos" environment variable.
---
v3:
- logo offset calculation is no longer based on BMP_ALIGN_CENTER if "m" specifier is used in splashpos
v2:
- remove some ifdefs
- revise commit log
- adjust video_logo_height by video_logo_ypos and thus fix return address for video console offset
- add BMP_ALIGN_CENTER case to logo_plot() for proper logo offset calculation if "m" specifier is used in splashpos
--- drivers/video/cfb_console.c | 93 +++++++++++++++++++++++++++++++----------- 1 files changed, 68 insertions(+), 25 deletions(-)
drivers/video/cfb_console.c +68 -25
@@ -66,7 +66,11 @@* CONFIG_CONSOLE_TIME - display time/date in upper right * corner, needs CONFIG_CMD_DATE and * CONFIG_CONSOLE_CURSOR -* CONFIG_VIDEO_LOGO - display Linux Logo in upper left corner +* CONFIG_VIDEO_LOGO - display Linux Logo in upper left corner. +* Use CONFIG_SPLASH_SCREEN_ALIGN with +* environment variable "splashpos" to place +* the logo on other position. In this case +* no CONSOLE_EXTRA_INFO is possible. * CONFIG_VIDEO_BMP_LOGO - use bmp_logo instead of linux_logo * CONFIG_CONSOLE_EXTRA_INFO - display additional board information * strings that normaly goes to serial
@@ -369,6 +373,8 @@ static void *video_fb_address; /* frame buffer address */static void *video_console_address;/* console buffer start address */ static int video_logo_height =VIDEO_LOGO_HEIGHT ; +static int video_logo_xpos; +static int video_logo_ypos;static int __maybe_unused cursor_state;static int __maybe_unused old_col;
@@ -1488,8 +1494,21 @@ void logo_plot(void *screen, int width, int x, int y)int ycount = video_logo_height;unsigned char r, g, b, *logo_red, *logo_blue, *logo_green;unsigned char *source; -unsigned char *dest = (unsigned char *) screen + - ((y * width *VIDEO_PIXEL_SIZE ) + x *VIDEO_PIXEL_SIZE ); +unsigned char *dest; + +#ifdef CONFIG_SPLASH_SCREEN_ALIGN +if (x ==BMP_ALIGN_CENTER ) + x =max (0 , (VIDEO_VISIBLE_COLS -VIDEO_LOGO_WIDTH ) /2 ); +else if (x <0 ) + x =max (0 ,VIDEO_VISIBLE_COLS -VIDEO_LOGO_WIDTH + x +1 ); + +if (y ==BMP_ALIGN_CENTER ) + y =max (0 , (VIDEO_VISIBLE_ROWS -VIDEO_LOGO_HEIGHT ) /2 ); +else if (y <0 ) + y =max (0 ,VIDEO_VISIBLE_ROWS -VIDEO_LOGO_HEIGHT + y +1 ); +#endif /* CONFIG_SPLASH_SCREEN_ALIGN */ + + dest = (unsigned char *)screen + (y * width + x) *VIDEO_PIXEL_SIZE ;#ifdef CONFIG_VIDEO_BMP_LOGO source = bmp_logo_bitmap;
@@ -1592,42 +1611,66 @@ static void *video_logo(void)char info[128 ];int space, len;__maybe_unused int y_off =0 ; +__maybe_unused ulong addr; +__maybe_unused char *s; -#ifdef CONFIG_SPLASH_SCREEN -char *s; -ulong addr; - - s =getenv ("splashimage" ); +#ifdef CONFIG_SPLASH_SCREEN_ALIGN + s =getenv ("splashpos" );if (s !=NULL ) { -int x =0 , y =0 ; +if (s[0 ] =='m' ) + video_logo_xpos =BMP_ALIGN_CENTER ; +else + video_logo_xpos =simple_strtol (s,NULL ,0 ); - addr =simple_strtoul (s,NULL ,16 ); -#ifdef CONFIG_SPLASH_SCREEN_ALIGN - s =getenv ("splashpos" ); + s =strchr (s +1 ,',' );if (s !=NULL ) { -if (s[0 ] =='m' ) - x =BMP_ALIGN_CENTER ; +if (s[1 ] =='m' ) + video_logo_ypos =BMP_ALIGN_CENTER ;else - x =simple_strtol (s,NULL ,0 ); - - s =strchr (s +1 ,',' ); -if (s !=NULL ) { -if (s[1 ] =='m' ) - y =BMP_ALIGN_CENTER ; -else - y =simple_strtol (s +1 ,NULL ,0 ); - } + video_logo_ypos =simple_strtol (s +1 ,NULL ,0 ); } + }#endif /* CONFIG_SPLASH_SCREEN_ALIGN */ -if (video_display_bitmap (addr, x, y) ==0 ) { +#ifdef CONFIG_SPLASH_SCREEN + s =getenv ("splashimage" ); +if (s !=NULL ) { + + addr =simple_strtoul (s,NULL ,16 ); + + +if (video_display_bitmap (addr, + video_logo_xpos, + video_logo_ypos) ==0 ) { video_logo_height =0 ;return ((void *) (video_fb_address)); } }#endif /* CONFIG_SPLASH_SCREEN */ -logo_plot (video_fb_address,VIDEO_COLS ,0 ,0 ); +logo_plot (video_fb_address,VIDEO_COLS , + video_logo_xpos, video_logo_ypos); + +#ifdef CONFIG_SPLASH_SCREEN_ALIGN +/* +* when using splashpos for video_logo, skip any info +* output on video console if the logo is not@0,0 +*/ +if (video_logo_xpos || video_logo_ypos) { +/* +* video_logo_height is used in text and cursor offset +* calculations. Since the console is below the logo, +* we need to adjust the logo height +*/ +if (video_logo_ypos ==BMP_ALIGN_CENTER ) + video_logo_height +=max (0 , (VIDEO_VISIBLE_ROWS - \ +VIDEO_LOGO_HEIGHT ) /2 ); +else if (video_logo_ypos >0 ) + video_logo_height += video_logo_ypos; + +return video_fb_address + video_logo_height *VIDEO_LINE_LEN ; + } +#endif sprintf (info," %s" , version_string);
Signature · 1 line
1.7.0.4
PATCH v3 3/6 video: cfb_console: logo can be positioned via the splashpos variable
Hi,
Quoted 19 lines · On Thu, 6 Sep 2012 08:07:36 +0200 Bastian Ruppert <[email protected]>…
Extend the driver for placing the video/bmp logo as specified by "splashpos" environment variable.
Signed-off-by Bastian Ruppert <[email protected]>Signed-off-by Anatolij Gustschin <[email protected]>CC Tom Rini <[email protected]>CC Stefano Babic <[email protected]>---
v3:
- logo offset calculation is no longer based onBMP_ALIGN_CENTERif "m" specifier is used in splashposv2:
- remove some ifdefs
- revise commit log
- adjustvideo_logo_heightbyvideo_logo_yposand thus fix return address for video console offset
- addBMP_ALIGN_CENTERcase tologo_plot()for proper logo offset calculation if "m" specifier is used in splashpos
Quoted 3 lines
--- drivers/video/cfb_console.c | 93 +++++++++++++++++++++++++++++++----------- 1 files changed, 68 insertions(+), 25 deletions(-)
Thanks!
PATCH v3 4/6 video: cfb_console: add function to plot the logo area black
In reply to Anatolij Gustschin--- drivers/video/cfb_console.c | 46 +++++++++++++++++++++++++++++++++++++++--- 1 files changed, 42 insertions(+), 4 deletions(-)
drivers/video/cfb_console.c +42 -4
@@ -1486,7 +1486,39 @@ int video_display_bitmap(ulong bmp_image, int x, int y)#ifdef CONFIG_VIDEO_LOGO -void logo_plot (void *screen,int width,int x,int y) +static void plot_logo_or_black (void *screen,int width,int x,int y, \ +int black); + +static void logo_plot (void *screen,int width,int x,int y) +{ +plot_logo_or_black (screen, width, x, y,0 ); +} + +static void logo_black (void ) +{ +plot_logo_or_black (video_fb_address, \ +VIDEO_COLS , \ + video_logo_xpos, \ + video_logo_ypos, \ +1 ); +} + +static int do_clrlogo (cmd_tbl_t *cmdtp,int flag,int argc,char *const argv[]) +{ +if (argc !=1 ) +return cmd_usage (cmdtp); + +logo_black (); +return 0 ; +} + +U_BOOT_CMD ( + clrlogo,1 ,0 , do_clrlogo, +"fill the boot logo area with black" , +" " + ); + +static void plot_logo_or_black (void *screen,int width,int x,int y,int black) {int xcount, i;
@@ -1544,9 +1576,15 @@ void logo_plot(void *screen, int width, int x, int y)#endif xcount =VIDEO_LOGO_WIDTH ;while (xcount--) { - r = logo_red[*source -VIDEO_LOGO_LUT_OFFSET ]; - g = logo_green[*source -VIDEO_LOGO_LUT_OFFSET ]; - b = logo_blue[*source -VIDEO_LOGO_LUT_OFFSET ]; +if (black) { + r =0x00 ; + g =0x00 ; + b =0x00 ; + }else { + r = logo_red[*source -VIDEO_LOGO_LUT_OFFSET ]; + g = logo_green[*source -VIDEO_LOGO_LUT_OFFSET ]; + b = logo_blue[*source -VIDEO_LOGO_LUT_OFFSET ]; + }switch (VIDEO_DATA_FORMAT ) {case GDF__8BIT_INDEX :
Signature · 1 line
1.7.0.4
PATCH v3 4/6 video: cfb_console: add function to plot the logo area black
Hi,
Quoted 7 lines · On Thu, 6 Sep 2012 08:07:37 +0200 Bastian Ruppert <[email protected]>…
Signed-off-by Bastian Ruppert <[email protected]>CC Anatolij Gustschin <[email protected]>CC Tom Rini <[email protected]>CC Stefano Babic <[email protected]>--- drivers/video/cfb_console.c | 46 +++++++++++++++++++++++++++++++++++++++--- 1 files changed, 42 insertions(+), 4 deletions(-)
Thanks!
PATCH v3 5/6 da850/omap-l138: davinci_emac: Suppress auto negotiation if needed
In reply to Anatolij GustschinPATCH v3 5/6 da850/omap-l138: davinci_emac: Suppress auto negotiation if needed
Hi Bastian,
Thanks for the patch.
Quoted 20 lines · Bastian Ruppert
From this commit id:
b78375a806ed04eb22b963255cfdef8df702de47auto negotiation is enabled in RMII mode. Some boards based on da850 need to suppress this procedure.CC Rajashekhara, Sudhakar <[email protected]>CC Lad, Prabhakar <[email protected]>CC Hadli, Manjunath <[email protected]>CC sbabic at denx.deAcked-by Stefano Babic <[email protected]>CC Tom Rini <[email protected]>Signed-off-by Bastian Ruppert <[email protected]>--- drivers/net/davinci_emac.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)drivers/net/davinci_emac.c +0
-0
drivers/net/davinci_emac.c int davinci_emac_initialize(void) · line 901
Quoted 6 lines
drivers/net/davinci_emac.c +2
-1@@ -897,7 +897,8 @@ int davinci_emac_initialize(void) }#if defined(CONFIG_DRIVER_TI_EMAC_USE_RMII ) && \ - defined(CONFIG_MACH_DAVINCI_DA850_EVM ) + defined(CONFIG_MACH_DAVINCI_DA850_EVM ) && \ + !defined(CONFIG_DRIVER_TI_EMAC_RMII_NONEG )
instead of CONFIG_DRIVER_TI_EMAC_RMII_NONEG why not have CONFIG_DRIVER_TI_EMAC_RMII_AUTO_NEGOTIATE ?
Thx,
--Prabhakar Lad
Quoted 10 lines
drivers/net/davinci_emac.c +0
-1for (i =0 ; i < num_phy; i++) {if (phy[i].is_phy_connected (i)) phy[i].auto_negotiate (i); --1.7.0.4
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
PATCH v3 5/6 da850/omap-l138: davinci_emac: Suppress auto negotiation if needed
Quoted 28 lines · Prabhakar Lad
Hi Bastian,
Thanks for the patch.
Quoted 22 lines · Bastian Ruppert
From this commit id:
b78375a806ed04eb22b963255cfdef8df702de47auto negotiation is enabled in RMII mode. Some boards based on da850 need to suppress this procedure.CC Rajashekhara, Sudhakar <[email protected]>CC Lad, Prabhakar <[email protected]>CC Hadli, Manjunath <[email protected]>CC sbabic at denx.deAcked-by Stefano Babic <[email protected]>CC Tom Rini <[email protected]>Signed-off-by Bastian Ruppert <[email protected]>--- drivers/net/davinci_emac.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)drivers/net/davinci_emac.c +0
-0@@ -897,7 +897,8 @@ int davinci_emac_initialize(void) }
Quoted 6 lines
drivers/net/davinci_emac.c int davinci_emac_initialize(void) · line 901
Quoted 4 lines
drivers/net/davinci_emac.c +2
-1#if defined(CONFIG_DRIVER_TI_EMAC_USE_RMII ) && \ - defined(CONFIG_MACH_DAVINCI_DA850_EVM ) + defined(CONFIG_MACH_DAVINCI_DA850_EVM ) && \ + !defined(CONFIG_DRIVER_TI_EMAC_RMII_NONEG )instead of
CONFIG_DRIVER_TI_EMAC_RMII_NONEGwhy not haveCONFIG_DRIVER_TI_EMAC_RMII_AUTO_NEGOTIATE?
Good idea, opt-in is better than opt-out, please make it so.
Signature · 1 line
Tom
PATCH v3 5/6 da850/omap-l138: davinci_emac: Suppress auto negotiation if needed
Hello,
Quoted 33 lines
Re: [U-Boot] [PATCH v3 5/6] da850/omap-l138:
davinci_emac: Suppress auto negotiation if neededQuoted 28 lines · Prabhakar Lad
Hi Bastian,
Thanks for the patch.
Quoted 22 lines · Bastian Ruppert
From this commit id:
b78375a806ed04eb22b963255cfdef8df702de47auto negotiation is enabled in RMII mode. Some boards based on da850 need to suppress this procedure.CC Rajashekhara, Sudhakar <[email protected]>CC Lad, Prabhakar <[email protected]>CC Hadli, Manjunath <[email protected]>CC sbabic at denx.deAcked-by Stefano Babic <[email protected]>CC Tom Rini <[email protected]>Signed-off-by Bastian Ruppert <[email protected]>--- drivers/net/davinci_emac.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)drivers/net/davinci_emac.c +0
-0@@ -897,7 +897,8 @@ int davinci_emac_initialize(void) }
Quoted 9 lines
Quoted 6 lines
drivers/net/davinci_emac.c int davinci_emac_initialize(void) · line 901
Quoted 4 lines
drivers/net/davinci_emac.c +2
-1#if defined(CONFIG_DRIVER_TI_EMAC_USE_RMII ) && \ - defined(CONFIG_MACH_DAVINCI_DA850_EVM ) + defined(CONFIG_MACH_DAVINCI_DA850_EVM ) && \ + !defined(CONFIG_DRIVER_TI_EMAC_RMII_NONEG )instead of
CONFIG_DRIVER_TI_EMAC_RMII_NONEGwhy not haveCONFIG_DRIVER_TI_EMAC_RMII_AUTO_NEGOTIATE?Good idea, opt-in is better than opt-out, please make it so.
i can see what you mean! But in this case i would like to answer back. Normally, one almost certainly use the auto negotiation. On the ea20 board there is a seldom case where auto negotiation is counterproductive. In my opinion the feature "disable it" is opt-in.
So i would like to leave it as it is.
Regards,
Bastian.
PATCH v3 5/6 da850/omap-l138: davinci_emac: Suppress auto negotiation if needed
Quoted 42 lines · On Sun, Sep 9, 2012 at 11:01 PM, <[email protected]> wrote:
Hello,
Quoted 40 lines
Re: [U-Boot] [PATCH v3 5/6] da850/omap-l138:
davinci_emac: Suppress auto negotiation if neededQuoted 34 lines · Prabhakar Lad
Hi Bastian,
Thanks for the patch.
Quoted 20 lines · Bastian Ruppert
From this commit id:
b78375a806ed04eb22b963255cfdef8df702de47auto negotiation is enabled in RMII mode. Some boards based on da850 need to suppress this procedure.CC Rajashekhara, Sudhakar <[email protected]>CC Lad, Prabhakar <[email protected]>CC Hadli, Manjunath <[email protected]>CC sbabic at denx.deAcked-by Stefano Babic <[email protected]>CC Tom Rini <[email protected]>Signed-off-by Bastian Ruppert <[email protected]>--- drivers/net/davinci_emac.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)drivers/net/davinci_emac.c +0
-0drivers/net/davinci_emac.c int davinci_emac_initialize(void) · line 901
Quoted 6 lines
drivers/net/davinci_emac.c +2
-1@@ -897,7 +897,8 @@ int davinci_emac_initialize(void) }#if defined(CONFIG_DRIVER_TI_EMAC_USE_RMII ) && \ - defined(CONFIG_MACH_DAVINCI_DA850_EVM ) + defined(CONFIG_MACH_DAVINCI_DA850_EVM ) && \ + !defined(CONFIG_DRIVER_TI_EMAC_RMII_NONEG )instead of
CONFIG_DRIVER_TI_EMAC_RMII_NONEGwhy not haveCONFIG_DRIVER_TI_EMAC_RMII_AUTO_NEGOTIATE?
Quoted 8 lines
Quoted 2 lines
Good idea, opt-in is better than opt-out, please make it so.
i can see what you mean! But in this case i would like to answer back. Normally, one almost certainly use the auto negotiation. On the ea20 board there is a seldom case where auto negotiation is counterproductive. In my opinion the feature "disable it" is opt-in.
So i would like to leave it as it is.
I will defer to Prabhakar for a final answer on this.
Signature · 1 line
Tom
PATCH v3 5/6 da850/omap-l138: davinci_emac: Suppress auto negotiation if needed
Hi Bastian,
Quoted 46 lines · Tom Rini
Quoted 45 lines · On Sun, Sep 9, 2012 at 11:01 PM, <[email protected]> wrote:
Hello,
Quoted 42 lines
Re: [U-Boot] [PATCH v3 5/6] da850/omap-l138:
davinci_emac: Suppress auto negotiation if neededQuoted 28 lines · Prabhakar Lad
Hi Bastian,
Thanks for the patch.
Quoted 22 lines · Bastian Ruppert
From this commit id:
b78375a806ed04eb22b963255cfdef8df702de47auto negotiation is enabled in RMII mode. Some boards based on da850 need to suppress this procedure.CC Rajashekhara, Sudhakar <[email protected]>CC Lad, Prabhakar <[email protected]>CC Hadli, Manjunath <[email protected]>CC sbabic at denx.deAcked-by Stefano Babic <[email protected]>CC Tom Rini <[email protected]>Signed-off-by Bastian Ruppert <[email protected]>--- drivers/net/davinci_emac.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)drivers/net/davinci_emac.c +0
-0@@ -897,7 +897,8 @@ int davinci_emac_initialize(void) }Quoted 6 lines
drivers/net/davinci_emac.c int davinci_emac_initialize(void) · line 901
Quoted 4 lines
drivers/net/davinci_emac.c +2
-1#if defined(CONFIG_DRIVER_TI_EMAC_USE_RMII ) && \ - defined(CONFIG_MACH_DAVINCI_DA850_EVM ) + defined(CONFIG_MACH_DAVINCI_DA850_EVM ) && \ + !defined(CONFIG_DRIVER_TI_EMAC_RMII_NONEG )instead of
CONFIG_DRIVER_TI_EMAC_RMII_NONEGwhy not haveCONFIG_DRIVER_TI_EMAC_RMII_AUTO_NEGOTIATE?Good idea, opt-in is better than opt-out, please make it so.
Quoted 8 lines
Quoted 5 lines
i can see what you mean! But in this case i would like to answer back. Normally, one almost certainly use the auto negotiation. On the ea20 board there is a seldom case where auto negotiation is counterproductive. In my opinion the feature "disable it" is opt-in.
So i would like to leave it as it is.I will defer to Prabhakar for a final answer on this.
Ok. 'NONEG' doesn't sound good can you make it NO_NEGOTIATE ?
Thanks,
--Prabhakar
PATCH v3 5/6 da850/omap-l138: davinci_emac: Suppress auto negotiation if needed
Hello, Prabhakar, hello Tom
Quoted 9 lines · Tom Rini
Quoted 8 lines · On Sun, Sep 9, 2012 at 11:01 PM, <[email protected]> wrote:
Quoted 7 lines
Hello,
Quoted 5 lines
Re: [U-Boot] [PATCH v3 5/6] da850/omap-l138:
davinci_emac: Suppress auto negotiation if neededOn Fri, Sep 7, 2012 at 1:08 AM, Prabhakar Lad
<[email protected]> wrote:
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Hi Bastian,
Thanks for the patch.
Quoted 2 lines · Bastian Ruppert
From this commit id:
b78375a806ed04eb22b963255cfdef8df702de47auto negotiation is enabled in RMII mode. Some boards based on da850
need
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
to suppress this procedure.
CC Rajashekhara, Sudhakar <[email protected]>CC Lad, Prabhakar <[email protected]>CC Hadli, Manjunath <[email protected]>CC sbabic at denx.deAcked-by Stefano Babic <[email protected]>CC Tom Rini <[email protected]>Signed-off-by Bastian Ruppert <[email protected]>--- drivers/net/davinci_emac.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Review
Quoted 1 line
(quoted diff) +0
-0
b/drivers/net/davinci_emac.c
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
Quoted 12 lines
drivers/net/davinci_emac.c int davinci_emac_initialize(void) · line 901
Quoted 10 lines
index b2516d1..fe988d7 100644
drivers/net/davinci_emac.c +2
-1@@ -897,7 +897,8 @@ int davinci_emac_initialize(void) }#if defined(CONFIG_DRIVER_TI_EMAC_USE_RMII ) && \ - defined(CONFIG_MACH_DAVINCI_DA850_EVM ) + defined(CONFIG_MACH_DAVINCI_DA850_EVM ) && \ + !defined(CONFIG_DRIVER_TI_EMAC_RMII_NONEG )instead of
CONFIG_DRIVER_TI_EMAC_RMII_NONEGwhy not haveCONFIG_DRIVER_TI_EMAC_RMII_AUTO_NEGOTIATE?
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
Good idea, opt-in is better than opt-out, please make it so.
i can see what you mean! But in this case i would like to answer back. Normally, one almost certainly use the auto negotiation. On the ea20 board there is a seldom case where auto negotiation is
counterproductive.
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
In my opinion the feature "disable it" is opt-in.
So i would like to leave it as it is.I will defer to Prabhakar for a final answer on this.
Ok. 'NONEG' doesn't sound good can you make it
NO_NEGOTIATE?
Ok, i will use CONFIG_DRIVER_TI_EMAC_RMII_NO_NEGOTIATE. It is not too long, isn?t it?
Tom, would you like to receive a complete v4 patch series for this? Or should i post version 4 for the affected patches only?
Thanks,
Bastian.
PATCH v3 5/6 da850/omap-l138: davinci_emac: Suppress auto negotiation if needed
Quoted 60 lines · Bastian.Ruppert at sewerin.de
Hello, Prabhakar, hello Tom
Quoted 9 lines · Tom Rini
Quoted 8 lines · On Sun, Sep 9, 2012 at 11:01 PM, <[email protected]> wrote:
Quoted 7 lines
Hello,
Quoted 5 lines
Re: [U-Boot] [PATCH v3 5/6] da850/omap-l138:
davinci_emac: Suppress auto negotiation if neededOn Fri, Sep 7, 2012 at 1:08 AM, Prabhakar Lad
<[email protected]> wrote:Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Hi Bastian,
Thanks for the patch.
Quoted 2 lines · Bastian Ruppert
From this commit id:
b78375a806ed04eb22b963255cfdef8df702de47auto negotiation is enabled in RMII mode. Some boards based on da850need
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
to suppress this procedure.
CC Rajashekhara, Sudhakar <[email protected]>CC Lad, Prabhakar <[email protected]>CC Hadli, Manjunath <[email protected]>CC sbabic at denx.deAcked-by Stefano Babic <[email protected]>CC Tom Rini <[email protected]>Signed-off-by Bastian Ruppert <[email protected]>--- drivers/net/davinci_emac.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Review
Quoted 1 line
(quoted diff) +0
-0
b/drivers/net/davinci_emac.cQuoted 13 lines
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
Quoted 12 lines
drivers/net/davinci_emac.c int davinci_emac_initialize(void) · line 901
Quoted 10 lines
index b2516d1..fe988d7 100644
drivers/net/davinci_emac.c +2
-1@@ -897,7 +897,8 @@ int davinci_emac_initialize(void) }#if defined(CONFIG_DRIVER_TI_EMAC_USE_RMII ) && \ - defined(CONFIG_MACH_DAVINCI_DA850_EVM ) + defined(CONFIG_MACH_DAVINCI_DA850_EVM ) && \ + !defined(CONFIG_DRIVER_TI_EMAC_RMII_NONEG )instead of
CONFIG_DRIVER_TI_EMAC_RMII_NONEGwhy not haveCONFIG_DRIVER_TI_EMAC_RMII_AUTO_NEGOTIATE?Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
Good idea, opt-in is better than opt-out, please make it so.
i can see what you mean! But in this case i would like to answer back. Normally, one almost certainly use the auto negotiation. On the ea20 board there is a seldom case where auto negotiation is
counterproductive.
Quoted 5 lines
Quoted 5 lines
Quoted 2 lines
In my opinion the feature "disable it" is opt-in.
So i would like to leave it as it is.I will defer to Prabhakar for a final answer on this.
Quoted 8 lines
Quoted 2 lines
Ok. 'NONEG' doesn't sound good can you make it
NO_NEGOTIATE?Ok, i will use
CONFIG_DRIVER_TI_EMAC_RMII_NO_NEGOTIATE. It is not too long, isn?t it?Tom, would you like to receive a complete v4 patch series for this? Or should i post version 4 for the affected patches only?
Whichever is easier for you to post, thanks.
Signature · 1 line
Tom
PATCH v3 6/6 davinci: ea20: add some configs and default environmet variables
In reply to Anatolij Gustschin--- include/configs/ea20.h | 106 ++++++++++++++++++++++++++++++------------------ 1 files changed, 66 insertions(+), 40 deletions(-)
include/configs/ea20.h +66 -40
@@ -30,6 +30,7 @@#define CONFIG_USE_SPIFLASH #define CONFIG_SYS_USE_NAND #define CONFIG_DRIVER_TI_EMAC_USE_RMII +#define CONFIG_DRIVER_TI_EMAC_RMII_NONEG #define CONFIG_BOARD_EARLY_INIT_F #define CONFIG_BOARD_LATE_INIT #define CONFIG_VIDEO
@@ -98,6 +99,7 @@* Network & Ethernet Configuration */ #ifdef CONFIG_DRIVER_TI_EMAC +#define CONFIG_EMAC_MDIO_PHY_NUM 0#define CONFIG_MII #define CONFIG_BOOTP_DEFAULT #define CONFIG_BOOTP_DNS
@@ -121,9 +123,11 @@#define CONFIG_VIDEO_DA8XX #define CONFIG_CFB_CONSOLE #define CONFIG_VGA_AS_SINGLE_DEVICE -#define CONFIG_SPLASH_SCREEN +#define CONFIG_SPLASH_SCREEN_ALIGN #define CONFIG_VIDEO_LOGO +#define CONFIG_SYS_CONSOLE_INFO_QUIET #define CONFIG_VIDEO_BMP_RLE8 +#define CONFIG_VIDEO_BMP_LOGO #define CONFIG_CMD_BMP #define CONFIG_SYS_CONSOLE_IS_IN_ENV #define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE
@@ -197,6 +201,7 @@#define CONFIG_NAND_DAVINCI #define CONFIG_SYS_NAND_PAGE_2K +#define CONFIG_SYS_NAND_NO_SUBPAGE #define CONFIG_SYS_NAND_CS 2#define CONFIG_SYS_NAND_BASE DAVINCI_ASYNC_EMIF_DATA_CE2_BASE#undef CONFIG_SYS_NAND_HW_ECC
@@ -235,31 +240,39 @@#define xstr (s) str(s)#define str (s) #s -#define CONFIG_HOSTNAME ea20 -#define CONFIG_EXTRA_ENV_SETTINGS \ +#define CONFIG_EXTRA_ENV_SETTINGS \ "as=3\0" \ - "netdev=eth0\0" \ + "netdev=eth0\0" \ "nfsargs=setenv bootargs root=/dev/nfs rw " \ "nfsroot=${serverip}:${rootpath}\0" \ "rfsbargs=setenv bootargs root=/dev/nfs rw " \ "nfsroot=${serverip}:${rfsbpath}\0" \ - "ramargs=setenv bootargs root=/dev/ram rw\0" \ - "mtdids=nand0=davinci_nand.0\0" \ - "mtdparts=mtdparts=davinci_nand.0:8m(Settings),8m(aKernel)," \ - "8m(bKernel),76m(aRootfs),76m(bRootfs),-(MassSD)\0" \ + "testrfsargs=setenv bootargs root=/dev/nfs rw " \ + "nfsroot=${serverip}:${testrfspath}\0" \ + "ramargs=setenv bootargs root=/dev/ram rw initrd=" \ + "0x${ramdisk_addr_r},4M\0" \ + "mtdids=nand0=davinci_nand.0\0" \ + "serverip=192.168.5.249\0" \ + "ipaddr=192.168.5.248\0" \ + "rootpath=/opt/eldk/arm\0" \ + "splashpos=230,180\0" \ + "testrfspath=/opt/eldk/test_arm\0" \ + "tempmac=setenv ethaddr 02:ea:20:ff:ff:ff\0" \ "nandargs=setenv bootargs rootfstype=ubifs ro chk_data_crc " \ "ubi.mtd=${as} root=ubi0:rootfs\0" \ + "nandrwargs=setenv bootargs rootfstype=ubifs rw chk_data_crc " \ + "ubi.mtd=${as} root=ubi0:rootfs\0" \ "addip_sta=setenv bootargs ${bootargs} " \ "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \ ":${hostname}:${netdev}:off panic=1\0" \ "addip_dyn=setenv bootargs ${bootargs} ip=dhcp\0" \ - "addip=if test -n ${ipdyn};then run addip_dyn;" \ + "addip=if test -n ${ipdyn};then run addip_dyn;" \ "else run addip_sta;fi\0" \ "addmtd=setenv bootargs ${bootargs} ${mtdparts}\0" \ "addtty=setenv bootargs ${bootargs}" \ " console=${consoledev},${baudrate}n8\0" \ - "addmisc=setenv bootargs ${bootargs} ${misc}\0" \ + "addmisc=setenv bootargs ${bootargs} ${misc}\0" \ "addmem=setenv bootargs ${bootargs} mem=${memory}\0" \ "consoledev=ttyS0\0" \ "loadaddr=c0000014\0" \
@@ -267,44 +280,57 @@"kernel_addr_r=c0700000\0" \ "hostname=" xstr(CONFIG_HOSTNAME) "\0" \ "bootfile=" xstr(CONFIG_HOSTNAME) "/uImage\0" \ - "ramdisk_file=" xstr(CONFIG_HOSTNAME) "/uRamdisk\0" \ + "ramdisk_file=" xstr(CONFIG_HOSTNAME) "/image.ext2\0" \"flash_self=run ramargs addip addtty addmtd addmisc addmem;" \ -"bootm ${kernel_addr} ${ramdisk_addr}\0" \ +"bootm ${kernel_addr_r}\0" \"flash_nfs=run nfsargs addip addtty addmtd addmisc addmem;" \"bootm ${kernel_addr}\0" \ -"net_nfs=tftp ${kernel_addr_r} ${bootfile}; " \ +"net_nfs=tftp ${kernel_addr_r} ${bootfile}; " \"run nfsargs addip addtty addmtd addmisc addmem;" \ -"bootm ${kernel_addr_r}\0" \ -"net_rfsb=tftp ${kernel_addr_r} ${bootfile}; " \ -"run rfsbargs addip addtty addmtd addmisc addmem; " \ -"bootm ${kernel_addr_r}\0" \ +"bootm ${kernel_addr_r}\0" \ +"net_rfsb=tftp ${kernel_addr_r} ${bootfile}; " \ +"run rfsbargs addip addtty addmtd addmisc addmem; " \ +"bootm ${kernel_addr_r}\0" \ +"net_testrfs=tftp ${kernel_addr_r} ${bootfile}; " \ +"run testrfsargs addip addtty addmtd addmisc addmem; " \ +"bootm ${kernel_addr_r}\0" \"net_self_load=tftp ${kernel_addr_r} ${bootfile};" \"tftp ${ramdisk_addr_r} ${ramdisk_file};\0" \ -"nand_nand=ubi part nand0,${as};ubifsmount rootfs;" \ -"ubifsload ${kernel_addr_r} /boot/uImage;" \ -"ubifsumount; run nandargs addip addtty " \ -"addmtd addmisc addmem;bootm ${kernel_addr_r}\0" \ - "u-boot=" xstr(CONFIG_HOSTNAME) "/u-boot.bin\0" \ -"load_magic=if sf probe 0;then sf " \ -"read c0000000 0x10000 0x60000;fi\0" \ -"load_nand=ubi part nand0,${as};ubifsmount rootfs;" \ -"if ubifsload c0000014 /boot/u-boot.bin;" \ -"then mw c0000008 ${filesize};else echo Error reading " \ -"u-boot from nand!;fi\0" \ -"load_net=if sf probe 0;then sf read c0000000 0x10000 0x60000;" \ -"tftp c0000014 ${u-boot};" \ -"mw c0000008 ${filesize};" \ -"fi\0" \ -"upd=if sf probe 0;then sf erase 10000 60000;" \ -"sf write c0000000 10000 60000;" \ -"fi\0" \ -"ubootupd_net=if run load_net;then echo Updating u-boot;" \ -"if run upd; then echo U-Boot updated;" \ +"nand_nand=ubi part nand0,${as};ubifsmount rootfs;" \ +"ubifsload ${kernel_addr_r} /boot/uImage;" \ +"ubifsumount; run nandargs addip addtty " \ +"addmtd addmisc addmem;clrlogo;" \ +"bootm ${kernel_addr_r}\0" \ +"nand_nandrw=ubi part nand0,${as};ubifsmount rootfs;" \ +"ubifsload ${kernel_addr_r} /boot/uImage;" \ +"ubifsumount; run nandrwargs addip addtty " \ +"addmtd addmisc addmem;clrlogo;" \ +"bootm ${kernel_addr_r}\0" \ +"net_nandrw=tftp ${kernel_addr_r} ${bootfile}; run nandrwargs" \ +" addip addtty addmtd addmisc addmem;" \ +"clrlogo;bootm ${kernel_addr_r}\0" \ + "u-boot=" xstr(CONFIG_HOSTNAME) "/u-boot.bin\0" \ +"load_magic=if sf probe 0;then sf " \ +"read c0000000 0x10000 0x60000;fi\0" \ +"load_nand=ubi part nand0,${as};ubifsmount rootfs;" \ +"if ubifsload c0000014 /boot/u-boot.bin;" \ +"then mw c0000008 ${filesize};else echo Error reading" \ +" u-boot from nand!;fi\0" \ +"load_net=if sf probe 0;then sf read c0000000 0x10000 " \ +"0x60000;tftp c0000014 ${u-boot};" \ +"mw c0000008 ${filesize};fi\0" \ +"upd=if sf probe 0;then sf erase 10000 60000;" \ +"sf write c0000000 10000 60000;fi\0" \ +"ublupdate=if tftp C0700000 ${ublname};then sf probe 0; " \ +"sf erase 0 10000;" \ +"sf write 0xc0700000 0 ${filesize};fi\0" \ +"ubootupd_net=if run load_net;then echo Updating u-boot;" \ +"if run upd; then echo U-Boot updated;" \"else echo Error updating u-boot !;" \"echo Board without bootloader !!;" \"fi;" \ -"else echo U-Boot not downloaded..exiting;fi\0" \ -"ubootupd_nand=echo run load_magic,run load_nand,run upd;\0" \ - "bootcmd=run net_nfs\0" +"else echo U-Boot not downloaded..exiting;fi\0" \ +"ubootupd_nand=echo run load_magic,run load_nand,run upd;\0" \ + "bootcmd=run tempmac;run net_testrfs\0"#endif /* __CONFIG_H */
Signature · 1 line
1.7.0.4
PATCH 3/6 video: cfb_console: logo can be positioned via the splashpos variable
In reply to Bastian RuppertHi Bastian,
there is a number of issues with this patch, please see comments below.
Quoted 36 lines · On Fri, 10 Aug 2012 09:26:43 +0200 Bastian Ruppert…
Signed-off-by Bastian Ruppert <[email protected]>CC Anatolij Gustschin <[email protected]>CC Tom Rini <[email protected]>CC Stefano Babic <[email protected]>--- drivers/video/cfb_console.c | 61 ++++++++++++++++++++++++++++--------------- 1 files changed, 40 insertions(+), 21 deletions(-)drivers/video/cfb_console.c +7
-1@@ -66,7 +66,11 @@* CONFIG_CONSOLE_TIME - display time/date in upper right * corner, needs CONFIG_CMD_DATE and * CONFIG_CONSOLE_CURSOR -* CONFIG_VIDEO_LOGO - display Linux Logo in upper left corner +* CONFIG_VIDEO_LOGO - display Linux Logo in upper left corner. +* Use CONFIG_SPLASH_SCREEN_ALIGN with +* environment variable "splashpos" to place +* the logo on other position. In this case +* no CONSOLE_EXTRA_INFO is possible. * CONFIG_VIDEO_BMP_LOGO - use bmp_logo instead of linux_logo * CONFIG_CONSOLE_EXTRA_INFO - display additional board information * strings that normaly goes to serial @@ -369,6 +373,8 @@ static void *video_fb_address; /* frame buffer address */static void *video_console_address;/* console buffer start address */ static int video_logo_height =VIDEO_LOGO_HEIGHT ; +static int video_logo_xpos; +static int video_logo_ypos;static int __maybe_unused cursor_state;static int __maybe_unused old_col;@@ -1594,40 +1600,53 @@ static void *video_logo(void)__maybe_unused int y_off =0 ;
drivers/video/cfb_console.c static void *video_logo(void) · line 1607
Quoted 10 lines
drivers/video/cfb_console.c +4
-3#ifdef CONFIG_SPLASH_SCREEN -char *s;ulong addr; - - s =getenv ("splashimage" ); +#endif +#if defined(CONFIG_SPLASH_SCREEN ) || defined(CONFIG_SPLASH_SCREEN_ALIGN ) +char *s; +#endif
these ifdefs should be better reduced, I think we can use __maybe_unused here, like for y_off above.
drivers/video/cfb_console.c static void *video_logo(void) · line 1612
Quoted 6 lines
drivers/video/cfb_console.c +4
-1+#ifdef CONFIG_SPLASH_SCREEN_ALIGN + s =getenv ("splashpos" );if (s !=NULL ) { -int x =0 , y =0 ; +if (s[0 ] =='m' ) + video_logo_xpos =BMP_ALIGN_CENTER ;
The 'm' case will work with splashscreen, but not with the video logo. There is no proper offset calculation in logo_plot() if xpos or ypos are set to BMP_ALIGN_CENTER. As a result the logo offset will be wrong and an access to wrong offset can even brick the board (on boards with small frame buffers).
...
drivers/video/cfb_console.c static void *video_logo(void) · line 1633
Quoted 3 lines
drivers/video/cfb_console.c +3
-0+ + if (video_display_bitmap(addr, \ + video_logo_xpos, \
no need to use "\" here.
...
drivers/video/cfb_console.c static void *video_logo(void) · line 1643
Quoted 3 lines
drivers/video/cfb_console.c +3
-0+ logo_plot(video_fb_address, \ + VIDEO_COLS, \ + video_logo_xpos, \
ditto.
...
drivers/video/cfb_console.c static void *video_logo(void) · line 1648
Quoted 3 lines
drivers/video/cfb_console.c +3
-0+#ifdef CONFIG_SPLASH_SCREEN_ALIGN +/* when using splashpos for video_logo, no console output */ +return (video_fb_address + video_logo_height *VIDEO_LINE_LEN );
The returned address is used as text console offset, so if the logo is moved down, the video_logo_height should be increased by video_logo_ypos. Otherwise the text and cursor positions will be wrong in the video console.
I've fixed these issues and submitted a patch v2 3/6. Please test.
Thanks,
Anatolij
PATCH 3/6 video: cfb_console: logo can be positioned via the splashpos variable
Quoted 2 lines
Hi Bastian,
Hello Anatolij,
Quoted 16 lines
there is a number of issues with this patch, please see comments below.
Quoted 6 lines · On Fri, 10 Aug 2012 09:26:43 +0200 Bastian Ruppert…
Signed-off-by Bastian Ruppert <[email protected]>CC Anatolij Gustschin <[email protected]>CC Tom Rini <[email protected]>CC Stefano Babic <[email protected]>--- drivers/video/cfb_console.c | 61 ++++++++++++++++++++++++++++--------------- > 1 files changed, 40 insertions(+), 21 deletions(-)Quoted 1 line
Quoted 10 lines
drivers/video/cfb_console.c line 69
Quoted 10 lines
drivers/video/cfb_console.c +1
-1@@ -66,7 +66,11 @@* CONFIG_CONSOLE_TIME - display time/date in upper right * corner, needs CONFIG_CMD_DATE and * CONFIG_CONSOLE_CURSOR -* CONFIG_VIDEO_LOGO - display Linux Logo in upper left corner +* CONFIG_VIDEO_LOGO - display Linux Logo in upper left
corner.
Quoted 10 lines
drivers/video/cfb_console.c static void *video_fb_address; /* frame
Quoted 8 lines
drivers/video/cfb_console.c +4
-0+* Use CONFIG_SPLASH_SCREEN_ALIGN with +* environment variable "splashpos" to place +* the logo on other position. In this case +* no CONSOLE_EXTRA_INFO is possible. * CONFIG_VIDEO_BMP_LOGO - use bmp_logo instead of linux_logo * CONFIG_CONSOLE_EXTRA_INFO - display additional board information * strings that normaly goes to serial @@ -369,6 +373,8 @@ static void *video_fb_address; /* framebuffer address */
Quoted 1 line
drivers/video/cfb_console.c +0
-0static void *video_console_address;/* console buffer start address
*/
Quoted 10 lines
Quoted 10 lines
drivers/video/cfb_console.c +2
-0static int video_logo_height =VIDEO_LOGO_HEIGHT ; +static int video_logo_xpos; +static int video_logo_ypos;static int __maybe_unused cursor_state;static int __maybe_unused old_col;@@ -1594,40 +1600,53 @@ static void *video_logo(void)__maybe_unused int y_off =0 ;
Quoted 7 lines
drivers/video/cfb_console.c static void *video_logo(void)
Quoted 7 lines
drivers/video/cfb_console.c +2
-3#ifdef CONFIG_SPLASH_SCREEN -char *s;ulong addr; - - s =getenv ("splashimage" ); +#endif +#if defined(CONFIG_SPLASH_SCREEN) || defined
(CONFIG_SPLASH_SCREEN_ALIGN)
Quoted 5 lines
drivers/video/cfb_console.c static void *video_logo(void) · line 1607
Quoted 2 lines
drivers/video/cfb_console.c +2
-0+char *s; +#endif these ifdefs should be better reduced, I think we can use
__maybe_unusedhere, like fory_offabove.
OK.
Quoted 20 lines
drivers/video/cfb_console.c static void *video_logo(void) · line 1612
Quoted 6 lines
drivers/video/cfb_console.c +4
-1+#ifdef CONFIG_SPLASH_SCREEN_ALIGN + s =getenv ("splashpos" );if (s !=NULL ) { -int x =0 , y =0 ; +if (s[0 ] =='m' ) + video_logo_xpos =BMP_ALIGN_CENTER ;The 'm' case will work with splashscreen, but not with the video logo. There is no proper offset calculation in
logo_plot()if xpos or ypos are set toBMP_ALIGN_CENTER. As a result the logo offset will be wrong and an access to wrong offset can even brick the board (on boards with small frame buffers)....
drivers/video/cfb_console.c static void *video_logo(void) · line 1633
Quoted 3 lines
drivers/video/cfb_console.c +3
-0+ + if (video_display_bitmap(addr, \ + video_logo_xpos, \no need to use "\" here.
Quoted 8 lines
...
drivers/video/cfb_console.c static void *video_logo(void) · line 1643
Quoted 3 lines
drivers/video/cfb_console.c +3
-0+ logo_plot(video_fb_address, \ + VIDEO_COLS, \ + video_logo_xpos, \ditto.
...
OK.
Quoted 9 lines
drivers/video/cfb_console.c static void *video_logo(void) · line 1648
Quoted 3 lines
drivers/video/cfb_console.c +3
-0+#ifdef CONFIG_SPLASH_SCREEN_ALIGN +/* when using splashpos for video_logo, no console output */ +return (video_fb_address + video_logo_height *VIDEO_LINE_LEN );The returned address is used as text console offset, so if the logo is moved down, the
video_logo_heightshould be increased byvideo_logo_ypos. Otherwise the text and cursor positions will be wrong in the video console.
Quoted 5 lines
I've fixed these issues and submitted a patch v2 3/6. Please test.
Thanks,
Anatolij
Thank you for your effort,
Bastian.
PATCH v4 1/6 davinci: ea20: reorganisation LCD startup
In reply to Anatolij Gustschin--- board/davinci/ea20/ea20.c | 23 +++++++++++++++-------- 1 files changed, 15 insertions(+), 8 deletions(-)
board/davinci/ea20/ea20.c +15 -8
@@ -176,6 +176,9 @@ int board_early_init_f(void)if (davinci_configure_pin_mux (gpio_pins,ARRAY_SIZE (gpio_pins)) !=0 )return 1 ; +/* Set DISP_ON high to enable LCD output*/ +gpio_direction_output (97 ,1 ); +/* Set the RESETOUTn low */ gpio_direction_output (111 ,0 );
@@ -188,9 +191,6 @@ int board_early_init_f(void)/* Set LCD_B_PWR low to power down LCD Backlight*/ gpio_direction_output (102 ,0 ); -/* Set DISP_ON low to disable LCD output*/ -gpio_direction_output (97 ,0 ); -#ifndef CONFIG_USE_IRQ irq_init ();#endif
@@ -250,11 +250,6 @@ int board_early_init_f(void)writel (readl (&davinci_syscfg_regs->mstpri[2 ]) &0x0fffffff , &davinci_syscfg_regs->mstpri[2 ]); -/* Set LCD_B_PWR low to power up LCD Backlight*/ -gpio_set_value (102 ,1 ); - -/* Set DISP_ON low to disable LCD output*/ -gpio_set_value (97 ,1 );return 0 ; }
@@ -276,6 +271,9 @@ int board_init(void)int board_late_init (void ) { +unsigned char buf[2 ]; +int ret; +/* PinMux for HALTEN */ if (davinci_configure_pin_mux (halten_pin,ARRAY_SIZE (halten_pin)) !=0 )return 1 ;
@@ -285,6 +283,15 @@ int board_late_init(void)setenv ("stdout" ,"serial" ); +/* Set fixed contrast settings for LCD via I2C potentiometer */ + buf[0 ] =0x00 ; + buf[1 ] =0xd7 ; + ret =i2c_write (0x2e ,6 ,1 , buf,2 ); +if (ret) +puts ("\nContrast Settings FAILED\n" ); + +/* Set LCD_B_PWR high to power up LCD Backlight*/ +gpio_set_value (102 ,1 ); return 0; }#endif /* CONFIG_BOARD_LATE_INIT */
Signature · 1 line
1.7.0.4
PATCH v4 2/6 davinci: ea20: the console is always set to the serial line
In reply to Anatolij GustschinDo not allow to overwrite it when video is enabled.
--- board/davinci/ea20/ea20.c | 11 +++++++++-- include/configs/ea20.h | 2 ++ 2 files changed, 11 insertions(+), 2 deletions(-)
board/davinci/ea20/ea20.c +9 -2
@@ -254,6 +254,15 @@ int board_early_init_f(void)return 0 ; } +/* +* Do not overwrite the console +* Use always serial for U-Boot console +*/ +int overwrite_console (void ) +{ +return 1 ; +} +int board_init (void ) {/* arch number of the board */
@@ -281,8 +290,6 @@ int board_late_init(void)/* Set HALTEN to high */ gpio_direction_output (134 ,1 ); -setenv ("stdout" ,"serial" ); -/* Set fixed contrast settings for LCD via I2C potentiometer */ buf[0 ] =0x00 ; buf[1 ] =0xd7 ;
include/configs/ea20.h +2 -0
@@ -125,6 +125,8 @@#define CONFIG_VIDEO_LOGO #define CONFIG_VIDEO_BMP_RLE8 #define CONFIG_CMD_BMP +#define CONFIG_SYS_CONSOLE_IS_IN_ENV +#define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE #endif /*
Signature · 1 line
1.7.0.4
PATCH v4 3/6 video: cfb_console: logo can be positioned via the splashpos variable
In reply to Anatolij GustschinExtend the driver for placing the video/bmp logo as specified by "splashpos" environment variable.
---
v3:
- logo offset calculation is no longer based on BMP_ALIGN_CENTER if "m" specifier is used in splashpos
v2:
- remove some ifdefs
- revise commit log
- adjust video_logo_height by video_logo_ypos and thus fix return address for video console offset
- add BMP_ALIGN_CENTER case to logo_plot() for proper logo offset calculation if "m" specifier is used in splashpos
--- drivers/video/cfb_console.c | 93 +++++++++++++++++++++++++++++++----------- 1 files changed, 68 insertions(+), 25 deletions(-)
drivers/video/cfb_console.c +68 -25
@@ -66,7 +66,11 @@* CONFIG_CONSOLE_TIME - display time/date in upper right * corner, needs CONFIG_CMD_DATE and * CONFIG_CONSOLE_CURSOR -* CONFIG_VIDEO_LOGO - display Linux Logo in upper left corner +* CONFIG_VIDEO_LOGO - display Linux Logo in upper left corner. +* Use CONFIG_SPLASH_SCREEN_ALIGN with +* environment variable "splashpos" to place +* the logo on other position. In this case +* no CONSOLE_EXTRA_INFO is possible. * CONFIG_VIDEO_BMP_LOGO - use bmp_logo instead of linux_logo * CONFIG_CONSOLE_EXTRA_INFO - display additional board information * strings that normaly goes to serial
@@ -369,6 +373,8 @@ static void *video_fb_address; /* frame buffer address */static void *video_console_address;/* console buffer start address */ static int video_logo_height =VIDEO_LOGO_HEIGHT ; +static int video_logo_xpos; +static int video_logo_ypos;static int __maybe_unused cursor_state;static int __maybe_unused old_col;
@@ -1488,8 +1494,21 @@ void logo_plot(void *screen, int width, int x, int y)int ycount = video_logo_height;unsigned char r, g, b, *logo_red, *logo_blue, *logo_green;unsigned char *source; -unsigned char *dest = (unsigned char *) screen + - ((y * width *VIDEO_PIXEL_SIZE ) + x *VIDEO_PIXEL_SIZE ); +unsigned char *dest; + +#ifdef CONFIG_SPLASH_SCREEN_ALIGN +if (x ==BMP_ALIGN_CENTER ) + x =max (0 , (VIDEO_VISIBLE_COLS -VIDEO_LOGO_WIDTH ) /2 ); +else if (x <0 ) + x =max (0 ,VIDEO_VISIBLE_COLS -VIDEO_LOGO_WIDTH + x +1 ); + +if (y ==BMP_ALIGN_CENTER ) + y =max (0 , (VIDEO_VISIBLE_ROWS -VIDEO_LOGO_HEIGHT ) /2 ); +else if (y <0 ) + y =max (0 ,VIDEO_VISIBLE_ROWS -VIDEO_LOGO_HEIGHT + y +1 ); +#endif /* CONFIG_SPLASH_SCREEN_ALIGN */ + + dest = (unsigned char *)screen + (y * width + x) *VIDEO_PIXEL_SIZE ;#ifdef CONFIG_VIDEO_BMP_LOGO source = bmp_logo_bitmap;
@@ -1592,42 +1611,66 @@ static void *video_logo(void)char info[128 ];int space, len;__maybe_unused int y_off =0 ; +__maybe_unused ulong addr; +__maybe_unused char *s; -#ifdef CONFIG_SPLASH_SCREEN -char *s; -ulong addr; - - s =getenv ("splashimage" ); +#ifdef CONFIG_SPLASH_SCREEN_ALIGN + s =getenv ("splashpos" );if (s !=NULL ) { -int x =0 , y =0 ; +if (s[0 ] =='m' ) + video_logo_xpos =BMP_ALIGN_CENTER ; +else + video_logo_xpos =simple_strtol (s,NULL ,0 ); - addr =simple_strtoul (s,NULL ,16 ); -#ifdef CONFIG_SPLASH_SCREEN_ALIGN - s =getenv ("splashpos" ); + s =strchr (s +1 ,',' );if (s !=NULL ) { -if (s[0 ] =='m' ) - x =BMP_ALIGN_CENTER ; +if (s[1 ] =='m' ) + video_logo_ypos =BMP_ALIGN_CENTER ;else - x =simple_strtol (s,NULL ,0 ); - - s =strchr (s +1 ,',' ); -if (s !=NULL ) { -if (s[1 ] =='m' ) - y =BMP_ALIGN_CENTER ; -else - y =simple_strtol (s +1 ,NULL ,0 ); - } + video_logo_ypos =simple_strtol (s +1 ,NULL ,0 ); } + }#endif /* CONFIG_SPLASH_SCREEN_ALIGN */ -if (video_display_bitmap (addr, x, y) ==0 ) { +#ifdef CONFIG_SPLASH_SCREEN + s =getenv ("splashimage" ); +if (s !=NULL ) { + + addr =simple_strtoul (s,NULL ,16 ); + + +if (video_display_bitmap (addr, + video_logo_xpos, + video_logo_ypos) ==0 ) { video_logo_height =0 ;return ((void *) (video_fb_address)); } }#endif /* CONFIG_SPLASH_SCREEN */ -logo_plot (video_fb_address,VIDEO_COLS ,0 ,0 ); +logo_plot (video_fb_address,VIDEO_COLS , + video_logo_xpos, video_logo_ypos); + +#ifdef CONFIG_SPLASH_SCREEN_ALIGN +/* +* when using splashpos for video_logo, skip any info +* output on video console if the logo is not@0,0 +*/ +if (video_logo_xpos || video_logo_ypos) { +/* +* video_logo_height is used in text and cursor offset +* calculations. Since the console is below the logo, +* we need to adjust the logo height +*/ +if (video_logo_ypos ==BMP_ALIGN_CENTER ) + video_logo_height +=max (0 , (VIDEO_VISIBLE_ROWS - \ +VIDEO_LOGO_HEIGHT ) /2 ); +else if (video_logo_ypos >0 ) + video_logo_height += video_logo_ypos; + +return video_fb_address + video_logo_height *VIDEO_LINE_LEN ; + } +#endif sprintf (info," %s" , version_string);
Signature · 1 line
1.7.0.4
PATCH v4 4/6 video: cfb_console: add function to plot the logo area black
In reply to Anatolij Gustschin--- drivers/video/cfb_console.c | 46 +++++++++++++++++++++++++++++++++++++++--- 1 files changed, 42 insertions(+), 4 deletions(-)
drivers/video/cfb_console.c +42 -4
@@ -1486,7 +1486,39 @@ int video_display_bitmap(ulong bmp_image, int x, int y)#ifdef CONFIG_VIDEO_LOGO -void logo_plot (void *screen,int width,int x,int y) +static void plot_logo_or_black (void *screen,int width,int x,int y, \ +int black); + +static void logo_plot (void *screen,int width,int x,int y) +{ +plot_logo_or_black (screen, width, x, y,0 ); +} + +static void logo_black (void ) +{ +plot_logo_or_black (video_fb_address, \ +VIDEO_COLS , \ + video_logo_xpos, \ + video_logo_ypos, \ +1 ); +} + +static int do_clrlogo (cmd_tbl_t *cmdtp,int flag,int argc,char *const argv[]) +{ +if (argc !=1 ) +return cmd_usage (cmdtp); + +logo_black (); +return 0 ; +} + +U_BOOT_CMD ( + clrlogo,1 ,0 , do_clrlogo, +"fill the boot logo area with black" , +" " + ); + +static void plot_logo_or_black (void *screen,int width,int x,int y,int black) {int xcount, i;
@@ -1544,9 +1576,15 @@ void logo_plot(void *screen, int width, int x, int y)#endif xcount =VIDEO_LOGO_WIDTH ;while (xcount--) { - r = logo_red[*source -VIDEO_LOGO_LUT_OFFSET ]; - g = logo_green[*source -VIDEO_LOGO_LUT_OFFSET ]; - b = logo_blue[*source -VIDEO_LOGO_LUT_OFFSET ]; +if (black) { + r =0x00 ; + g =0x00 ; + b =0x00 ; + }else { + r = logo_red[*source -VIDEO_LOGO_LUT_OFFSET ]; + g = logo_green[*source -VIDEO_LOGO_LUT_OFFSET ]; + b = logo_blue[*source -VIDEO_LOGO_LUT_OFFSET ]; + }switch (VIDEO_DATA_FORMAT ) {case GDF__8BIT_INDEX :
Signature · 1 line
1.7.0.4
PATCH v4 5/6 da850/omap-l138: davinci_emac: Suppress auto negotiation if needed
In reply to Anatolij GustschinPATCH v4 5/6 da850/omap-l138: davinci_emac: Suppress auto negotiation if needed
Hi Bastian,
Thanks for the patch.
Quoted 11 lines · Bastian Ruppert
From this commit id:
b78375a806ed04eb22b963255cfdef8df702de47auto negotiation is enabled in RMII mode. Some boards based on da850 need to suppress this procedure.CC Rajashekhara, Sudhakar <[email protected]>CC Lad, Prabhakar <[email protected]>CC Hadli, Manjunath <[email protected]>CC sbabic at denx.deAcked-by Stefano Babic <[email protected]>CC Tom Rini <[email protected]>Signed-off-by Bastian Ruppert <[email protected]>
Thanks,
--Prabhakar
Quoted 32 lines
---
v4:
- use more expressive CONFIG namev3:
v2:
- related to other patches of this series--- drivers/net/davinci_emac.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)drivers/net/davinci_emac.c +2
-2@@ -897,7 +897,8 @@ int davinci_emac_initialize(void) }#if defined(CONFIG_DRIVER_TI_EMAC_USE_RMII ) && \ - defined(CONFIG_MACH_DAVINCI_DA850_EVM ) + defined(CONFIG_MACH_DAVINCI_DA850_EVM ) && \ + !defined(CONFIG_DRIVER_TI_EMAC_RMII_NO_NEGOTIATE )for (i =0 ; i < num_phy; i++) {if (phy[i].is_phy_connected (i)) phy[i].auto_negotiate (i); --1.7.0.4
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
PATCH v4 6/6 davinci: ea20: add some configs and default environmet variables
In reply to Anatolij Gustschin---
v4:
- use more expressive CONFIG name for emac rmii no autonegotiation
v3:
v2:
- related to other patches of this series
--- include/configs/ea20.h | 106 ++++++++++++++++++++++++++++++------------------ 1 files changed, 66 insertions(+), 40 deletions(-)
include/configs/ea20.h +66 -40
@@ -30,6 +30,7 @@#define CONFIG_USE_SPIFLASH #define CONFIG_SYS_USE_NAND #define CONFIG_DRIVER_TI_EMAC_USE_RMII +#define CONFIG_DRIVER_TI_EMAC_RMII_NO_NEGOTIATE #define CONFIG_BOARD_EARLY_INIT_F #define CONFIG_BOARD_LATE_INIT #define CONFIG_VIDEO
@@ -98,6 +99,7 @@* Network & Ethernet Configuration */ #ifdef CONFIG_DRIVER_TI_EMAC +#define CONFIG_EMAC_MDIO_PHY_NUM 0#define CONFIG_MII #define CONFIG_BOOTP_DEFAULT #define CONFIG_BOOTP_DNS
@@ -121,9 +123,11 @@#define CONFIG_VIDEO_DA8XX #define CONFIG_CFB_CONSOLE #define CONFIG_VGA_AS_SINGLE_DEVICE -#define CONFIG_SPLASH_SCREEN +#define CONFIG_SPLASH_SCREEN_ALIGN #define CONFIG_VIDEO_LOGO +#define CONFIG_SYS_CONSOLE_INFO_QUIET #define CONFIG_VIDEO_BMP_RLE8 +#define CONFIG_VIDEO_BMP_LOGO #define CONFIG_CMD_BMP #define CONFIG_SYS_CONSOLE_IS_IN_ENV #define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE
@@ -197,6 +201,7 @@#define CONFIG_NAND_DAVINCI #define CONFIG_SYS_NAND_PAGE_2K +#define CONFIG_SYS_NAND_NO_SUBPAGE #define CONFIG_SYS_NAND_CS 2#define CONFIG_SYS_NAND_BASE DAVINCI_ASYNC_EMIF_DATA_CE2_BASE#undef CONFIG_SYS_NAND_HW_ECC
@@ -235,31 +240,39 @@#define xstr (s) str(s)#define str (s) #s -#define CONFIG_HOSTNAME ea20 -#define CONFIG_EXTRA_ENV_SETTINGS \ +#define CONFIG_EXTRA_ENV_SETTINGS \ "as=3\0" \ - "netdev=eth0\0" \ + "netdev=eth0\0" \ "nfsargs=setenv bootargs root=/dev/nfs rw " \ "nfsroot=${serverip}:${rootpath}\0" \ "rfsbargs=setenv bootargs root=/dev/nfs rw " \ "nfsroot=${serverip}:${rfsbpath}\0" \ - "ramargs=setenv bootargs root=/dev/ram rw\0" \ - "mtdids=nand0=davinci_nand.0\0" \ - "mtdparts=mtdparts=davinci_nand.0:8m(Settings),8m(aKernel)," \ - "8m(bKernel),76m(aRootfs),76m(bRootfs),-(MassSD)\0" \ + "testrfsargs=setenv bootargs root=/dev/nfs rw " \ + "nfsroot=${serverip}:${testrfspath}\0" \ + "ramargs=setenv bootargs root=/dev/ram rw initrd=" \ + "0x${ramdisk_addr_r},4M\0" \ + "mtdids=nand0=davinci_nand.0\0" \ + "serverip=192.168.5.249\0" \ + "ipaddr=192.168.5.248\0" \ + "rootpath=/opt/eldk/arm\0" \ + "splashpos=230,180\0" \ + "testrfspath=/opt/eldk/test_arm\0" \ + "tempmac=setenv ethaddr 02:ea:20:ff:ff:ff\0" \ "nandargs=setenv bootargs rootfstype=ubifs ro chk_data_crc " \ "ubi.mtd=${as} root=ubi0:rootfs\0" \ + "nandrwargs=setenv bootargs rootfstype=ubifs rw chk_data_crc " \ + "ubi.mtd=${as} root=ubi0:rootfs\0" \ "addip_sta=setenv bootargs ${bootargs} " \ "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \ ":${hostname}:${netdev}:off panic=1\0" \ "addip_dyn=setenv bootargs ${bootargs} ip=dhcp\0" \ - "addip=if test -n ${ipdyn};then run addip_dyn;" \ + "addip=if test -n ${ipdyn};then run addip_dyn;" \ "else run addip_sta;fi\0" \ "addmtd=setenv bootargs ${bootargs} ${mtdparts}\0" \ "addtty=setenv bootargs ${bootargs}" \ " console=${consoledev},${baudrate}n8\0" \ - "addmisc=setenv bootargs ${bootargs} ${misc}\0" \ + "addmisc=setenv bootargs ${bootargs} ${misc}\0" \ "addmem=setenv bootargs ${bootargs} mem=${memory}\0" \ "consoledev=ttyS0\0" \ "loadaddr=c0000014\0" \
@@ -267,44 +280,57 @@"kernel_addr_r=c0700000\0" \ "hostname=" xstr(CONFIG_HOSTNAME) "\0" \ "bootfile=" xstr(CONFIG_HOSTNAME) "/uImage\0" \ - "ramdisk_file=" xstr(CONFIG_HOSTNAME) "/uRamdisk\0" \ + "ramdisk_file=" xstr(CONFIG_HOSTNAME) "/image.ext2\0" \"flash_self=run ramargs addip addtty addmtd addmisc addmem;" \ -"bootm ${kernel_addr} ${ramdisk_addr}\0" \ +"bootm ${kernel_addr_r}\0" \"flash_nfs=run nfsargs addip addtty addmtd addmisc addmem;" \"bootm ${kernel_addr}\0" \ -"net_nfs=tftp ${kernel_addr_r} ${bootfile}; " \ +"net_nfs=tftp ${kernel_addr_r} ${bootfile}; " \"run nfsargs addip addtty addmtd addmisc addmem;" \ -"bootm ${kernel_addr_r}\0" \ -"net_rfsb=tftp ${kernel_addr_r} ${bootfile}; " \ -"run rfsbargs addip addtty addmtd addmisc addmem; " \ -"bootm ${kernel_addr_r}\0" \ +"bootm ${kernel_addr_r}\0" \ +"net_rfsb=tftp ${kernel_addr_r} ${bootfile}; " \ +"run rfsbargs addip addtty addmtd addmisc addmem; " \ +"bootm ${kernel_addr_r}\0" \ +"net_testrfs=tftp ${kernel_addr_r} ${bootfile}; " \ +"run testrfsargs addip addtty addmtd addmisc addmem; " \ +"bootm ${kernel_addr_r}\0" \"net_self_load=tftp ${kernel_addr_r} ${bootfile};" \"tftp ${ramdisk_addr_r} ${ramdisk_file};\0" \ -"nand_nand=ubi part nand0,${as};ubifsmount rootfs;" \ -"ubifsload ${kernel_addr_r} /boot/uImage;" \ -"ubifsumount; run nandargs addip addtty " \ -"addmtd addmisc addmem;bootm ${kernel_addr_r}\0" \ - "u-boot=" xstr(CONFIG_HOSTNAME) "/u-boot.bin\0" \ -"load_magic=if sf probe 0;then sf " \ -"read c0000000 0x10000 0x60000;fi\0" \ -"load_nand=ubi part nand0,${as};ubifsmount rootfs;" \ -"if ubifsload c0000014 /boot/u-boot.bin;" \ -"then mw c0000008 ${filesize};else echo Error reading " \ -"u-boot from nand!;fi\0" \ -"load_net=if sf probe 0;then sf read c0000000 0x10000 0x60000;" \ -"tftp c0000014 ${u-boot};" \ -"mw c0000008 ${filesize};" \ -"fi\0" \ -"upd=if sf probe 0;then sf erase 10000 60000;" \ -"sf write c0000000 10000 60000;" \ -"fi\0" \ -"ubootupd_net=if run load_net;then echo Updating u-boot;" \ -"if run upd; then echo U-Boot updated;" \ +"nand_nand=ubi part nand0,${as};ubifsmount rootfs;" \ +"ubifsload ${kernel_addr_r} /boot/uImage;" \ +"ubifsumount; run nandargs addip addtty " \ +"addmtd addmisc addmem;clrlogo;" \ +"bootm ${kernel_addr_r}\0" \ +"nand_nandrw=ubi part nand0,${as};ubifsmount rootfs;" \ +"ubifsload ${kernel_addr_r} /boot/uImage;" \ +"ubifsumount; run nandrwargs addip addtty " \ +"addmtd addmisc addmem;clrlogo;" \ +"bootm ${kernel_addr_r}\0" \ +"net_nandrw=tftp ${kernel_addr_r} ${bootfile}; run nandrwargs" \ +" addip addtty addmtd addmisc addmem;" \ +"clrlogo;bootm ${kernel_addr_r}\0" \ + "u-boot=" xstr(CONFIG_HOSTNAME) "/u-boot.bin\0" \ +"load_magic=if sf probe 0;then sf " \ +"read c0000000 0x10000 0x60000;fi\0" \ +"load_nand=ubi part nand0,${as};ubifsmount rootfs;" \ +"if ubifsload c0000014 /boot/u-boot.bin;" \ +"then mw c0000008 ${filesize};else echo Error reading" \ +" u-boot from nand!;fi\0" \ +"load_net=if sf probe 0;then sf read c0000000 0x10000 " \ +"0x60000;tftp c0000014 ${u-boot};" \ +"mw c0000008 ${filesize};fi\0" \ +"upd=if sf probe 0;then sf erase 10000 60000;" \ +"sf write c0000000 10000 60000;fi\0" \ +"ublupdate=if tftp C0700000 ${ublname};then sf probe 0; " \ +"sf erase 0 10000;" \ +"sf write 0xc0700000 0 ${filesize};fi\0" \ +"ubootupd_net=if run load_net;then echo Updating u-boot;" \ +"if run upd; then echo U-Boot updated;" \"else echo Error updating u-boot !;" \"echo Board without bootloader !!;" \"fi;" \ -"else echo U-Boot not downloaded..exiting;fi\0" \ -"ubootupd_nand=echo run load_magic,run load_nand,run upd;\0" \ - "bootcmd=run net_nfs\0" +"else echo U-Boot not downloaded..exiting;fi\0" \ +"ubootupd_nand=echo run load_magic,run load_nand,run upd;\0" \ + "bootcmd=run tempmac;run net_testrfs\0"#endif /* __CONFIG_H */
Signature · 1 line
1.7.0.4
PATCH 4/6 video: cfb_console: add function to plot the logo area black
In reply to Bastian Ruppert--- drivers/video/cfb_console.c | 46 +++++++++++++++++++++++++++++++++++++++--- 1 files changed, 42 insertions(+), 4 deletions(-)
drivers/video/cfb_console.c +42 -4
@@ -1486,7 +1486,39 @@ int video_display_bitmap(ulong bmp_image, int x, int y)#ifdef CONFIG_VIDEO_LOGO -void logo_plot (void *screen,int width,int x,int y) +static void plot_logo_or_black (void *screen,int width,int x,int y, \ +int black); + +static void logo_plot (void *screen,int width,int x,int y) +{ +plot_logo_or_black (screen, width, x, y,0 ); +} + +static void logo_black (void ) +{ +plot_logo_or_black (video_fb_address, \ +VIDEO_COLS , \ + video_logo_xpos, \ + video_logo_ypos, \ +1 ); +} + +static int do_clrlogo (cmd_tbl_t *cmdtp,int flag,int argc,char *const argv[]) +{ +if (argc !=1 ) +return cmd_usage (cmdtp); + +logo_black (); +return 0 ; +} + +U_BOOT_CMD ( + clrlogo,1 ,0 , do_clrlogo, +"fill the boot logo area with black" , +" " + ); + +static void plot_logo_or_black (void *screen,int width,int x,int y,int black) {int xcount, i;
@@ -1531,9 +1563,15 @@ void logo_plot(void *screen, int width, int x, int y)#endif xcount =VIDEO_LOGO_WIDTH ;while (xcount--) { - r = logo_red[*source -VIDEO_LOGO_LUT_OFFSET ]; - g = logo_green[*source -VIDEO_LOGO_LUT_OFFSET ]; - b = logo_blue[*source -VIDEO_LOGO_LUT_OFFSET ]; +if (black) { + r =0x00 ; + g =0x00 ; + b =0x00 ; + }else { + r = logo_red[*source -VIDEO_LOGO_LUT_OFFSET ]; + g = logo_green[*source -VIDEO_LOGO_LUT_OFFSET ]; + b = logo_blue[*source -VIDEO_LOGO_LUT_OFFSET ]; + }switch (VIDEO_DATA_FORMAT ) {case GDF__8BIT_INDEX :
Signature · 1 line
1.7.0.4
PATCH 5/6 da850/omap-l138: davinci_emac: Suppress auto negotiation if needed
In reply to Bastian RuppertPATCH 5/6 da850/omap-l138: davinci_emac: Suppress auto negotiation if needed
Quoted 20 lines · Bastian Ruppert
From this commit id:
b78375a806ed04eb22b963255cfdef8df702de47auto negotiation is enabled in RMII mode. Some boards based on da850 need to suppress this procedure.CC Rajashekhara, Sudhakar <[email protected]>CC Lad, Prabhakar <[email protected]>CC Hadli, Manjunath <[email protected]>CC sbabic at denx.deCC Tom Rini <[email protected]>Signed-off-by Bastian Ruppert <[email protected]>--- drivers/net/davinci_emac.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)drivers/net/davinci_emac.c +0
-0
drivers/net/davinci_emac.c int davinci_emac_initialize(void) · line 904
Quoted 9 lines
drivers/net/davinci_emac.c +2
-1@@ -897,7 +897,8 @@ int davinci_emac_initialize(void) }#if defined(CONFIG_DRIVER_TI_EMAC_USE_RMII ) && \ - defined(CONFIG_MACH_DAVINCI_DA850_EVM ) + defined(CONFIG_MACH_DAVINCI_DA850_EVM ) && \ + !defined(CONFIG_DRIVER_TI_EMAC_RMII_NONEG )for (i =0 ; i < num_phy; i++) {if (phy[i].is_phy_connected (i)) phy[i].auto_negotiate (i);
Best regards,
Stefano Babic
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-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH 6/6 davinci: ea20: add some configs and default environmet variables
In reply to Bastian Ruppert--- include/configs/ea20.h | 106 ++++++++++++++++++++++++++++++------------------ 1 files changed, 66 insertions(+), 40 deletions(-)
include/configs/ea20.h +66 -40
@@ -30,6 +30,7 @@#define CONFIG_USE_SPIFLASH #define CONFIG_SYS_USE_NAND #define CONFIG_DRIVER_TI_EMAC_USE_RMII +#define CONFIG_DRIVER_TI_EMAC_RMII_NONEG #define CONFIG_BOARD_EARLY_INIT_F #define CONFIG_BOARD_LATE_INIT #define CONFIG_VIDEO
@@ -98,6 +99,7 @@* Network & Ethernet Configuration */ #ifdef CONFIG_DRIVER_TI_EMAC +#define CONFIG_EMAC_MDIO_PHY_NUM 0#define CONFIG_MII #define CONFIG_BOOTP_DEFAULT #define CONFIG_BOOTP_DNS
@@ -121,9 +123,11 @@#define CONFIG_VIDEO_DA8XX #define CONFIG_CFB_CONSOLE #define CONFIG_VGA_AS_SINGLE_DEVICE -#define CONFIG_SPLASH_SCREEN +#define CONFIG_SPLASH_SCREEN_ALIGN #define CONFIG_VIDEO_LOGO +#define CONFIG_SYS_CONSOLE_INFO_QUIET #define CONFIG_VIDEO_BMP_RLE8 +#define CONFIG_VIDEO_BMP_LOGO #define CONFIG_CMD_BMP #define CONFIG_SYS_CONSOLE_IS_IN_ENV #define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE
@@ -197,6 +201,7 @@#define CONFIG_NAND_DAVINCI #define CONFIG_SYS_NAND_PAGE_2K +#define CONFIG_SYS_NAND_NO_SUBPAGE #define CONFIG_SYS_NAND_CS 2#define CONFIG_SYS_NAND_BASE DAVINCI_ASYNC_EMIF_DATA_CE2_BASE#undef CONFIG_SYS_NAND_HW_ECC
@@ -235,31 +240,39 @@#define xstr (s) str(s)#define str (s) #s -#define CONFIG_HOSTNAME ea20 -#define CONFIG_EXTRA_ENV_SETTINGS \ +#define CONFIG_EXTRA_ENV_SETTINGS \ "as=3\0" \ - "netdev=eth0\0" \ + "netdev=eth0\0" \ "nfsargs=setenv bootargs root=/dev/nfs rw " \ "nfsroot=${serverip}:${rootpath}\0" \ "rfsbargs=setenv bootargs root=/dev/nfs rw " \ "nfsroot=${serverip}:${rfsbpath}\0" \ - "ramargs=setenv bootargs root=/dev/ram rw\0" \ - "mtdids=nand0=davinci_nand.0\0" \ - "mtdparts=mtdparts=davinci_nand.0:8m(Settings),8m(aKernel)," \ - "8m(bKernel),76m(aRootfs),76m(bRootfs),-(MassSD)\0" \ + "testrfsargs=setenv bootargs root=/dev/nfs rw " \ + "nfsroot=${serverip}:${testrfspath}\0" \ + "ramargs=setenv bootargs root=/dev/ram rw initrd=" \ + "0x${ramdisk_addr_r},4M\0" \ + "mtdids=nand0=davinci_nand.0\0" \ + "serverip=192.168.5.249\0" \ + "ipaddr=192.168.5.248\0" \ + "rootpath=/opt/eldk/arm\0" \ + "splashpos=230,180\0" \ + "testrfspath=/opt/eldk/test_arm\0" \ + "tempmac=setenv ethaddr 02:ea:20:ff:ff:ff\0" \ "nandargs=setenv bootargs rootfstype=ubifs ro chk_data_crc " \ "ubi.mtd=${as} root=ubi0:rootfs\0" \ + "nandrwargs=setenv bootargs rootfstype=ubifs rw chk_data_crc " \ + "ubi.mtd=${as} root=ubi0:rootfs\0" \ "addip_sta=setenv bootargs ${bootargs} " \ "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \ ":${hostname}:${netdev}:off panic=1\0" \ "addip_dyn=setenv bootargs ${bootargs} ip=dhcp\0" \ - "addip=if test -n ${ipdyn};then run addip_dyn;" \ + "addip=if test -n ${ipdyn};then run addip_dyn;" \ "else run addip_sta;fi\0" \ "addmtd=setenv bootargs ${bootargs} ${mtdparts}\0" \ "addtty=setenv bootargs ${bootargs}" \ " console=${consoledev},${baudrate}n8\0" \ - "addmisc=setenv bootargs ${bootargs} ${misc}\0" \ + "addmisc=setenv bootargs ${bootargs} ${misc}\0" \ "addmem=setenv bootargs ${bootargs} mem=${memory}\0" \ "consoledev=ttyS0\0" \ "loadaddr=c0000014\0" \
@@ -267,44 +280,57 @@"kernel_addr_r=c0700000\0" \ "hostname=" xstr(CONFIG_HOSTNAME) "\0" \ "bootfile=" xstr(CONFIG_HOSTNAME) "/uImage\0" \ - "ramdisk_file=" xstr(CONFIG_HOSTNAME) "/uRamdisk\0" \ + "ramdisk_file=" xstr(CONFIG_HOSTNAME) "/image.ext2\0" \"flash_self=run ramargs addip addtty addmtd addmisc addmem;" \ -"bootm ${kernel_addr} ${ramdisk_addr}\0" \ +"bootm ${kernel_addr_r}\0" \"flash_nfs=run nfsargs addip addtty addmtd addmisc addmem;" \"bootm ${kernel_addr}\0" \ -"net_nfs=tftp ${kernel_addr_r} ${bootfile}; " \ +"net_nfs=tftp ${kernel_addr_r} ${bootfile}; " \"run nfsargs addip addtty addmtd addmisc addmem;" \ -"bootm ${kernel_addr_r}\0" \ -"net_rfsb=tftp ${kernel_addr_r} ${bootfile}; " \ -"run rfsbargs addip addtty addmtd addmisc addmem; " \ -"bootm ${kernel_addr_r}\0" \ +"bootm ${kernel_addr_r}\0" \ +"net_rfsb=tftp ${kernel_addr_r} ${bootfile}; " \ +"run rfsbargs addip addtty addmtd addmisc addmem; " \ +"bootm ${kernel_addr_r}\0" \ +"net_testrfs=tftp ${kernel_addr_r} ${bootfile}; " \ +"run testrfsargs addip addtty addmtd addmisc addmem; " \ +"bootm ${kernel_addr_r}\0" \"net_self_load=tftp ${kernel_addr_r} ${bootfile};" \"tftp ${ramdisk_addr_r} ${ramdisk_file};\0" \ -"nand_nand=ubi part nand0,${as};ubifsmount rootfs;" \ -"ubifsload ${kernel_addr_r} /boot/uImage;" \ -"ubifsumount; run nandargs addip addtty " \ -"addmtd addmisc addmem;bootm ${kernel_addr_r}\0" \ - "u-boot=" xstr(CONFIG_HOSTNAME) "/u-boot.bin\0" \ -"load_magic=if sf probe 0;then sf " \ -"read c0000000 0x10000 0x60000;fi\0" \ -"load_nand=ubi part nand0,${as};ubifsmount rootfs;" \ -"if ubifsload c0000014 /boot/u-boot.bin;" \ -"then mw c0000008 ${filesize};else echo Error reading " \ -"u-boot from nand!;fi\0" \ -"load_net=if sf probe 0;then sf read c0000000 0x10000 0x60000;" \ -"tftp c0000014 ${u-boot};" \ -"mw c0000008 ${filesize};" \ -"fi\0" \ -"upd=if sf probe 0;then sf erase 10000 60000;" \ -"sf write c0000000 10000 60000;" \ -"fi\0" \ -"ubootupd_net=if run load_net;then echo Updating u-boot;" \ -"if run upd; then echo U-Boot updated;" \ +"nand_nand=ubi part nand0,${as};ubifsmount rootfs;" \ +"ubifsload ${kernel_addr_r} /boot/uImage;" \ +"ubifsumount; run nandargs addip addtty " \ +"addmtd addmisc addmem;clrlogo;" \ +"bootm ${kernel_addr_r}\0" \ +"nand_nandrw=ubi part nand0,${as};ubifsmount rootfs;" \ +"ubifsload ${kernel_addr_r} /boot/uImage;" \ +"ubifsumount; run nandrwargs addip addtty " \ +"addmtd addmisc addmem;clrlogo;" \ +"bootm ${kernel_addr_r}\0" \ +"net_nandrw=tftp ${kernel_addr_r} ${bootfile}; run nandrwargs" \ +" addip addtty addmtd addmisc addmem;" \ +"clrlogo;bootm ${kernel_addr_r}\0" \ + "u-boot=" xstr(CONFIG_HOSTNAME) "/u-boot.bin\0" \ +"load_magic=if sf probe 0;then sf " \ +"read c0000000 0x10000 0x60000;fi\0" \ +"load_nand=ubi part nand0,${as};ubifsmount rootfs;" \ +"if ubifsload c0000014 /boot/u-boot.bin;" \ +"then mw c0000008 ${filesize};else echo Error reading" \ +" u-boot from nand!;fi\0" \ +"load_net=if sf probe 0;then sf read c0000000 0x10000 " \ +"0x60000;tftp c0000014 ${u-boot};" \ +"mw c0000008 ${filesize};fi\0" \ +"upd=if sf probe 0;then sf erase 10000 60000;" \ +"sf write c0000000 10000 60000;fi\0" \ +"ublupdate=if tftp C0700000 ${ublname};then sf probe 0; " \ +"sf erase 0 10000;" \ +"sf write 0xc0700000 0 ${filesize};fi\0" \ +"ubootupd_net=if run load_net;then echo Updating u-boot;" \ +"if run upd; then echo U-Boot updated;" \"else echo Error updating u-boot !;" \"echo Board without bootloader !!;" \"fi;" \ -"else echo U-Boot not downloaded..exiting;fi\0" \ -"ubootupd_nand=echo run load_magic,run load_nand,run upd;\0" \ - "bootcmd=run net_nfs\0" +"else echo U-Boot not downloaded..exiting;fi\0" \ +"ubootupd_nand=echo run load_magic,run load_nand,run upd;\0" \ + "bootcmd=run tempmac;run net_testrfs\0"#endif /* __CONFIG_H */
Signature · 1 line
1.7.0.4
PATCH 6/6 davinci: ea20: add some configs and default environmet variables
Quoted 176 lines · Bastian Ruppert
Signed-off-by Bastian Ruppert <[email protected]>CC Tom Rini <[email protected]>CC Stefano Babic <[email protected]>--- include/configs/ea20.h | 106 ++++++++++++++++++++++++++++++------------------ 1 files changed, 66 insertions(+), 40 deletions(-)include/configs/ea20.h +63
-37@@ -30,6 +30,7 @@#define CONFIG_USE_SPIFLASH #define CONFIG_SYS_USE_NAND #define CONFIG_DRIVER_TI_EMAC_USE_RMII +#define CONFIG_DRIVER_TI_EMAC_RMII_NONEG #define CONFIG_BOARD_EARLY_INIT_F #define CONFIG_BOARD_LATE_INIT #define CONFIG_VIDEO @@ -98,6 +99,7 @@* Network & Ethernet Configuration */ #ifdef CONFIG_DRIVER_TI_EMAC +#define CONFIG_EMAC_MDIO_PHY_NUM 0#define CONFIG_MII #define CONFIG_BOOTP_DEFAULT #define CONFIG_BOOTP_DNS @@ -121,9 +123,11 @@#define CONFIG_VIDEO_DA8XX #define CONFIG_CFB_CONSOLE #define CONFIG_VGA_AS_SINGLE_DEVICE -#define CONFIG_SPLASH_SCREEN +#define CONFIG_SPLASH_SCREEN_ALIGN #define CONFIG_VIDEO_LOGO +#define CONFIG_SYS_CONSOLE_INFO_QUIET #define CONFIG_VIDEO_BMP_RLE8 +#define CONFIG_VIDEO_BMP_LOGO #define CONFIG_CMD_BMP #define CONFIG_SYS_CONSOLE_IS_IN_ENV #define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE @@ -197,6 +201,7 @@#define CONFIG_NAND_DAVINCI #define CONFIG_SYS_NAND_PAGE_2K +#define CONFIG_SYS_NAND_NO_SUBPAGE #define CONFIG_SYS_NAND_CS 2#define CONFIG_SYS_NAND_BASE DAVINCI_ASYNC_EMIF_DATA_CE2_BASE#undef CONFIG_SYS_NAND_HW_ECC@@ -235,31 +240,39 @@#define xstr (s) str(s)#define str (s) #s -#define CONFIG_HOSTNAME ea20 -#define CONFIG_EXTRA_ENV_SETTINGS \ +#define CONFIG_EXTRA_ENV_SETTINGS \ "as=3\0" \ - "netdev=eth0\0" \ + "netdev=eth0\0" \ "nfsargs=setenv bootargs root=/dev/nfs rw " \ "nfsroot=${serverip}:${rootpath}\0" \ "rfsbargs=setenv bootargs root=/dev/nfs rw " \ "nfsroot=${serverip}:${rfsbpath}\0" \ - "ramargs=setenv bootargs root=/dev/ram rw\0" \ - "mtdids=nand0=davinci_nand.0\0" \ - "mtdparts=mtdparts=davinci_nand.0:8m(Settings),8m(aKernel)," \ - "8m(bKernel),76m(aRootfs),76m(bRootfs),-(MassSD)\0" \ + "testrfsargs=setenv bootargs root=/dev/nfs rw " \ + "nfsroot=${serverip}:${testrfspath}\0" \ + "ramargs=setenv bootargs root=/dev/ram rw initrd=" \ + "0x${ramdisk_addr_r},4M\0" \ + "mtdids=nand0=davinci_nand.0\0" \ + "serverip=192.168.5.249\0" \ + "ipaddr=192.168.5.248\0" \ + "rootpath=/opt/eldk/arm\0" \ + "splashpos=230,180\0" \ + "testrfspath=/opt/eldk/test_arm\0" \ + "tempmac=setenv ethaddr 02:ea:20:ff:ff:ff\0" \ "nandargs=setenv bootargs rootfstype=ubifs ro chk_data_crc " \ "ubi.mtd=${as} root=ubi0:rootfs\0" \ + "nandrwargs=setenv bootargs rootfstype=ubifs rw chk_data_crc " \ + "ubi.mtd=${as} root=ubi0:rootfs\0" \ "addip_sta=setenv bootargs ${bootargs} " \ "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \ ":${hostname}:${netdev}:off panic=1\0" \ "addip_dyn=setenv bootargs ${bootargs} ip=dhcp\0" \ - "addip=if test -n ${ipdyn};then run addip_dyn;" \ + "addip=if test -n ${ipdyn};then run addip_dyn;" \ "else run addip_sta;fi\0" \ "addmtd=setenv bootargs ${bootargs} ${mtdparts}\0" \ "addtty=setenv bootargs ${bootargs}" \ " console=${consoledev},${baudrate}n8\0" \ - "addmisc=setenv bootargs ${bootargs} ${misc}\0" \ + "addmisc=setenv bootargs ${bootargs} ${misc}\0" \ "addmem=setenv bootargs ${bootargs} mem=${memory}\0" \ "consoledev=ttyS0\0" \ "loadaddr=c0000014\0" \@@ -267,44 +280,57 @@"kernel_addr_r=c0700000\0" \ "hostname=" xstr(CONFIG_HOSTNAME) "\0" \ "bootfile=" xstr(CONFIG_HOSTNAME) "/uImage\0" \ - "ramdisk_file=" xstr(CONFIG_HOSTNAME) "/uRamdisk\0" \ + "ramdisk_file=" xstr(CONFIG_HOSTNAME) "/image.ext2\0" \"flash_self=run ramargs addip addtty addmtd addmisc addmem;" \ -"bootm ${kernel_addr} ${ramdisk_addr}\0" \ +"bootm ${kernel_addr_r}\0" \"flash_nfs=run nfsargs addip addtty addmtd addmisc addmem;" \"bootm ${kernel_addr}\0" \ -"net_nfs=tftp ${kernel_addr_r} ${bootfile}; " \ +"net_nfs=tftp ${kernel_addr_r} ${bootfile}; " \"run nfsargs addip addtty addmtd addmisc addmem;" \ -"bootm ${kernel_addr_r}\0" \ -"net_rfsb=tftp ${kernel_addr_r} ${bootfile}; " \ -"run rfsbargs addip addtty addmtd addmisc addmem; " \ -"bootm ${kernel_addr_r}\0" \ +"bootm ${kernel_addr_r}\0" \ +"net_rfsb=tftp ${kernel_addr_r} ${bootfile}; " \ +"run rfsbargs addip addtty addmtd addmisc addmem; " \ +"bootm ${kernel_addr_r}\0" \ +"net_testrfs=tftp ${kernel_addr_r} ${bootfile}; " \ +"run testrfsargs addip addtty addmtd addmisc addmem; " \ +"bootm ${kernel_addr_r}\0" \"net_self_load=tftp ${kernel_addr_r} ${bootfile};" \"tftp ${ramdisk_addr_r} ${ramdisk_file};\0" \ -"nand_nand=ubi part nand0,${as};ubifsmount rootfs;" \ -"ubifsload ${kernel_addr_r} /boot/uImage;" \ -"ubifsumount; run nandargs addip addtty " \ -"addmtd addmisc addmem;bootm ${kernel_addr_r}\0" \ - "u-boot=" xstr(CONFIG_HOSTNAME) "/u-boot.bin\0" \ -"load_magic=if sf probe 0;then sf " \ -"read c0000000 0x10000 0x60000;fi\0" \ -"load_nand=ubi part nand0,${as};ubifsmount rootfs;" \ -"if ubifsload c0000014 /boot/u-boot.bin;" \ -"then mw c0000008 ${filesize};else echo Error reading " \ -"u-boot from nand!;fi\0" \ -"load_net=if sf probe 0;then sf read c0000000 0x10000 0x60000;" \ -"tftp c0000014 ${u-boot};" \ -"mw c0000008 ${filesize};" \ -"fi\0" \ -"upd=if sf probe 0;then sf erase 10000 60000;" \ -"sf write c0000000 10000 60000;" \ -"fi\0" \ -"ubootupd_net=if run load_net;then echo Updating u-boot;" \ -"if run upd; then echo U-Boot updated;" \ +"nand_nand=ubi part nand0,${as};ubifsmount rootfs;" \ +"ubifsload ${kernel_addr_r} /boot/uImage;" \ +"ubifsumount; run nandargs addip addtty " \ +"addmtd addmisc addmem;clrlogo;" \ +"bootm ${kernel_addr_r}\0" \ +"nand_nandrw=ubi part nand0,${as};ubifsmount rootfs;" \ +"ubifsload ${kernel_addr_r} /boot/uImage;" \ +"ubifsumount; run nandrwargs addip addtty " \ +"addmtd addmisc addmem;clrlogo;" \ +"bootm ${kernel_addr_r}\0" \ +"net_nandrw=tftp ${kernel_addr_r} ${bootfile}; run nandrwargs" \ +" addip addtty addmtd addmisc addmem;" \ +"clrlogo;bootm ${kernel_addr_r}\0" \ + "u-boot=" xstr(CONFIG_HOSTNAME) "/u-boot.bin\0" \ +"load_magic=if sf probe 0;then sf " \ +"read c0000000 0x10000 0x60000;fi\0" \ +"load_nand=ubi part nand0,${as};ubifsmount rootfs;" \ +"if ubifsload c0000014 /boot/u-boot.bin;" \ +"then mw c0000008 ${filesize};else echo Error reading" \ +" u-boot from nand!;fi\0" \ +"load_net=if sf probe 0;then sf read c0000000 0x10000 " \ +"0x60000;tftp c0000014 ${u-boot};" \ +"mw c0000008 ${filesize};fi\0" \ +"upd=if sf probe 0;then sf erase 10000 60000;" \ +"sf write c0000000 10000 60000;fi\0" \ +"ublupdate=if tftp C0700000 ${ublname};then sf probe 0; " \ +"sf erase 0 10000;" \ +"sf write 0xc0700000 0 ${filesize};fi\0" \ +"ubootupd_net=if run load_net;then echo Updating u-boot;" \ +"if run upd; then echo U-Boot updated;" \"else echo Error updating u-boot !;" \
include/configs/ea20.h line 336
Quoted 10 lines
include/configs/ea20.h +3
-3"echo Board without bootloader !!;" \"fi;" \ -"else echo U-Boot not downloaded..exiting;fi\0" \ -"ubootupd_nand=echo run load_magic,run load_nand,run upd;\0" \ - "bootcmd=run net_nfs\0" +"else echo U-Boot not downloaded..exiting;fi\0" \ +"ubootupd_nand=echo run load_magic,run load_nand,run upd;\0" \ + "bootcmd=run tempmac;run net_testrfs\0"#endif /* __CONFIG_H */
Best regards,
Stefano Babic
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-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH 1/6 davinci: ea20: reorganisation LCD startup
In reply to Bastian RuppertQuoted 3 lines · Bastian Ruppert
Signed-off-by Bastian Ruppert <[email protected]>CC Tom Rini <[email protected]>CC Stefano Babic <[email protected]>
For the series, I'm fine with the davinci side of the changes but want Anatolij and Stefano to ack as well before I pull into u-boot-ti, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120815/f1626906/attachment.pgp>
PATCH 1/6 davinci: ea20: reorganisation LCD startup
Quoted 9 lines · Tom Rini
Quoted 3 lines · Bastian Ruppert
Signed-off-by Bastian Ruppert <[email protected]>CC Tom Rini <[email protected]>CC Stefano Babic <[email protected]>For the series, I'm fine with the davinci side of the changes but want Anatolij and Stefano to ack as well before I pull into u-boot-ti, thanks!
Still waiting for Anatolij (thanks Stefano!) before I take this, FYI.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120824/eec05d1b/attachment.pgp>
PATCH 1/6 davinci: ea20: reorganisation LCD startup
Hello Tom,
Quoted 9 lines
Re: [U-Boot] [PATCH 1/6] davinci: ea20: reorganisation LCD startup
Quoted 6 lines · Tom Rini
Quoted 3 lines · Bastian Ruppert
Signed-off-by Bastian Ruppert <[email protected]>CC Tom Rini <[email protected]>CC Stefano Babic <[email protected]>
Quoted 6 lines
Quoted 3 lines
For the series, I'm fine with the davinci side of the changes but want Anatolij and Stefano to ack as well before I pull into u-boot-ti, thanks!
Still waiting for Anatolij (thanks Stefano!) before I take this, FYI.
with the version 3 for this patches, Anatolij seems to be pleased.
Thanks,
Bastian.
PATCH 1/6 davinci: ea20: reorganisation LCD startup
In reply to Bastian RuppertQuoted 60 lines · Bastian Ruppert
Signed-off-by Bastian Ruppert <[email protected]>CC Tom Rini <[email protected]>CC Stefano Babic <[email protected]>--- board/davinci/ea20/ea20.c | 23 +++++++++++++++-------- 1 files changed, 15 insertions(+), 8 deletions(-)board/davinci/ea20/ea20.c +8
-8@@ -176,6 +176,9 @@ int board_early_init_f(void)if (davinci_configure_pin_mux (gpio_pins,ARRAY_SIZE (gpio_pins)) !=0 )return 1 ; +/* Set DISP_ON high to enable LCD output*/ +gpio_direction_output (97 ,1 ); +/* Set the RESETOUTn low */ gpio_direction_output (111 ,0 );@@ -188,9 +191,6 @@ int board_early_init_f(void)/* Set LCD_B_PWR low to power down LCD Backlight*/ gpio_direction_output (102 ,0 ); -/* Set DISP_ON low to disable LCD output*/ -gpio_direction_output (97 ,0 ); -#ifndef CONFIG_USE_IRQ irq_init ();#endif @@ -250,11 +250,6 @@ int board_early_init_f(void)writel (readl (&davinci_syscfg_regs->mstpri[2 ]) &0x0fffffff , &davinci_syscfg_regs->mstpri[2 ]); -/* Set LCD_B_PWR low to power up LCD Backlight*/ -gpio_set_value (102 ,1 ); - -/* Set DISP_ON low to disable LCD output*/ -gpio_set_value (97 ,1 );return 0 ; }@@ -276,6 +271,9 @@ int board_init(void)int board_late_init (void ) { +unsigned char buf[2 ]; +int ret; +/* PinMux for HALTEN */ if (davinci_configure_pin_mux (halten_pin,ARRAY_SIZE (halten_pin)) !=0 )return 1 ;@@ -285,6 +283,15 @@ int board_late_init(void)setenv ("stdout" ,"serial" ); +/* Set fixed contrast settings for LCD via I2C potentiometer */ + buf[0 ] =0x00 ;
board/davinci/ea20/ea20.c int board_late_init(void) · line 297
Quoted 10 lines
board/davinci/ea20/ea20.c +7
-0+ buf[1 ] =0xd7 ; + ret =i2c_write (0x2e ,6 ,1 , buf,2 ); +if (ret) +puts ("\nContrast Settings FAILED\n" ); + +/* Set LCD_B_PWR high to power up LCD Backlight*/ +gpio_set_value (102 ,1 ); return 0; }#endif /* CONFIG_BOARD_LATE_INIT */
Best regards,
Stefano Babic
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-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================