[U-Boot] [PATCH v4 1/6] davinci: ea20: reorganisation LCD startup
Signed-off-by: Bastian Ruppert bastian.rupp...@sewerin.de CC: Tom Rini tr...@ti.com Acked-by: Stefano Babic sba...@denx.de --- board/davinci/ea20/ea20.c | 23 +++ 1 files changed, 15 insertions(+), 8 deletions(-) diff --git a/board/davinci/ea20/ea20.c b/board/davinci/ea20/ea20.c index 7e00040..69307e4 100644 --- a/board/davinci/ea20/ea20.c +++ b/board/davinci/ea20/ea20.c @@ -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]) 0x0fff, 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 */ -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v4 2/6] davinci: ea20: the console is always set to the serial line
Do not allow to overwrite it when video is enabled. Signed-off-by: Bastian Ruppert bastian.rupp...@sewerin.de CC: Tom Rini tr...@ti.com Acked-by: Stefano Babic sba...@denx.de --- board/davinci/ea20/ea20.c | 11 +-- include/configs/ea20.h|2 ++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/board/davinci/ea20/ea20.c b/board/davinci/ea20/ea20.c index 69307e4..0edd910 100644 --- a/board/davinci/ea20/ea20.c +++ b/board/davinci/ea20/ea20.c @@ -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; diff --git a/include/configs/ea20.h b/include/configs/ea20.h index a9caa81..f9a1462 100644 --- a/include/configs/ea20.h +++ b/include/configs/ea20.h @@ -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 /* -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v4 6/6] davinci: ea20: add some configs and default environmet variables
Signed-off-by: Bastian Ruppert bastian.rupp...@sewerin.de CC: Tom Rini tr...@ti.com Acked-by: Stefano Babic sba...@denx.de --- 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(-) diff --git a/include/configs/ea20.h b/include/configs/ea20.h index f9a1462..e237fd0 100644 --- a/include/configs/ea20.h +++ b/include/configs/ea20.h @@ -30,6 +30,7 @@ #define CONFIG_USE_SPIFLASH #defineCONFIG_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 #defineCONFIG_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 -#defineCONFIG_EXTRA_ENV_SETTINGS \ +#defineCONFIG_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=c014\0 \ @@ -267,44 +280,57 @@ kernel_addr_r=c070\0 \ hostname= xstr
[U-Boot] [PATCH v4 4/6] video: cfb_console: add function to plot the logo area black
Signed-off-by: Bastian Ruppert bastian.rupp...@sewerin.de CC: Anatolij Gustschin ag...@denx.de CC: Tom Rini tr...@ti.com CC: Stefano Babic sba...@denx.de --- drivers/video/cfb_console.c | 46 +++--- 1 files changed, 42 insertions(+), 4 deletions(-) diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c index 3ae420b..c3e36c4 100644 --- a/drivers/video/cfb_console.c +++ b/drivers/video/cfb_console.c @@ -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: -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v4 3/6] video: cfb_console: logo can be positioned via the splashpos variable
Extend the driver for placing the video/bmp logo as specified by splashpos environment variable. Signed-off-by: Bastian Ruppert bastian.rupp...@sewerin.de Signed-off-by: Anatolij Gustschin ag...@denx.de CC: Tom Rini tr...@ti.com CC: Stefano Babic sba...@denx.de --- 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(-) diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c index 19d061f..3ae420b 100644 --- a/drivers/video/cfb_console.c +++ b/drivers/video/cfb_console.c @@ -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
[U-Boot] [PATCH v4 5/6] da850/omap-l138: davinci_emac: Suppress auto negotiation if needed
From this commit id: b78375a806ed04eb22b963255cfdef8df702de47 auto negotiation is enabled in RMII mode. Some boards based on da850 need to suppress this procedure. CC: Rajashekhara, Sudhakar sudhakar@ti.com CC: Lad, Prabhakar prabhakar@ti.com CC: Hadli, Manjunath manjunath.ha...@ti.com CC: sba...@denx.de Acked-by: Stefano Babic sba...@denx.de CC: Tom Rini tr...@ti.com Signed-off-by: Bastian Ruppert bastian.rupp...@sewerin.de --- v4: - use more expressive CONFIG name v3: v2: - related to other patches of this series --- drivers/net/davinci_emac.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c index b2516d1..1db586d 100644 --- a/drivers/net/davinci_emac.c +++ b/drivers/net/davinci_emac.c @@ -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@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 5/6] da850/omap-l138: davinci_emac: Suppress auto negotiation if needed
Hello, Re: [U-Boot] [PATCH v3 5/6] da850/omap-l138: davinci_emac: Suppress auto negotiation if needed On Fri, Sep 7, 2012 at 1:08 AM, Prabhakar Lad prabhakar.cse...@gmail.com wrote: Hi Bastian, Thanks for the patch. On Thu, Sep 6, 2012 at 11:37 AM, Bastian Ruppert bastian.rupp...@sewerin.de wrote: From this commit id: b78375a806ed04eb22b963255cfdef8df702de47 auto negotiation is enabled in RMII mode. Some boards based on da850 need to suppress this procedure. CC: Rajashekhara, Sudhakar sudhakar@ti.com CC: Lad, Prabhakar prabhakar@ti.com CC: Hadli, Manjunath manjunath.ha...@ti.com CC: sba...@denx.de Acked-by: Stefano Babic sba...@denx.de CC: Tom Rini tr...@ti.com Signed-off-by: Bastian Ruppert bastian.rupp...@sewerin.de --- drivers/net/davinci_emac.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c index b2516d1..fe988d7 100644 --- a/drivers/net/davinci_emac.c +++ b/drivers/net/davinci_emac.c @@ -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 ? 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. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 5/6] da850/omap-l138: davinci_emac: Suppress auto negotiation if needed
Hello, Prabhakar, hello Tom On Monday 10 September 2012 09:38 PM, Tom Rini wrote: On Sun, Sep 9, 2012 at 11:01 PM, bastian.rupp...@sewerin.de wrote: Hello, Re: [U-Boot] [PATCH v3 5/6] da850/omap-l138: davinci_emac: Suppress auto negotiation if needed On Fri, Sep 7, 2012 at 1:08 AM, Prabhakar Lad prabhakar.cse...@gmail.com wrote: Hi Bastian, Thanks for the patch. On Thu, Sep 6, 2012 at 11:37 AM, Bastian Ruppert bastian.rupp...@sewerin.de wrote: From this commit id: b78375a806ed04eb22b963255cfdef8df702de47 auto negotiation is enabled in RMII mode. Some boards based on da850 need to suppress this procedure. CC: Rajashekhara, Sudhakar sudhakar@ti.com CC: Lad, Prabhakar prabhakar@ti.com CC: Hadli, Manjunath manjunath.ha...@ti.com CC: sba...@denx.de Acked-by: Stefano Babic sba...@denx.de CC: Tom Rini tr...@ti.com Signed-off-by: Bastian Ruppert bastian.rupp...@sewerin.de --- drivers/net/davinci_emac.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c index b2516d1..fe988d7 100644 --- a/drivers/net/davinci_emac.c +++ b/drivers/net/davinci_emac.c @@ -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 ? 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. 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. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v3 2/6] davinci: ea20: the console is always set to the serial line
Do not allow to overwrite it when video is enabled. Signed-off-by: Bastian Ruppert bastian.rupp...@sewerin.de CC: Tom Rini tr...@ti.com Acked-by: Stefano Babic sba...@denx.de --- board/davinci/ea20/ea20.c | 11 +-- include/configs/ea20.h|2 ++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/board/davinci/ea20/ea20.c b/board/davinci/ea20/ea20.c index 69307e4..0edd910 100644 --- a/board/davinci/ea20/ea20.c +++ b/board/davinci/ea20/ea20.c @@ -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; diff --git a/include/configs/ea20.h b/include/configs/ea20.h index a9caa81..f9a1462 100644 --- a/include/configs/ea20.h +++ b/include/configs/ea20.h @@ -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 /* -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v3 4/6] video: cfb_console: add function to plot the logo area black
Signed-off-by: Bastian Ruppert bastian.rupp...@sewerin.de CC: Anatolij Gustschin ag...@denx.de CC: Tom Rini tr...@ti.com CC: Stefano Babic sba...@denx.de --- drivers/video/cfb_console.c | 46 +++--- 1 files changed, 42 insertions(+), 4 deletions(-) diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c index 3ae420b..c3e36c4 100644 --- a/drivers/video/cfb_console.c +++ b/drivers/video/cfb_console.c @@ -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: -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v3 6/6] davinci: ea20: add some configs and default environmet variables
Signed-off-by: Bastian Ruppert bastian.rupp...@sewerin.de CC: Tom Rini tr...@ti.com Acked-by: Stefano Babic sba...@denx.de --- include/configs/ea20.h | 106 ++-- 1 files changed, 66 insertions(+), 40 deletions(-) diff --git a/include/configs/ea20.h b/include/configs/ea20.h index f9a1462..373db74 100644 --- a/include/configs/ea20.h +++ b/include/configs/ea20.h @@ -30,6 +30,7 @@ #define CONFIG_USE_SPIFLASH #defineCONFIG_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 #defineCONFIG_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 -#defineCONFIG_EXTRA_ENV_SETTINGS \ +#defineCONFIG_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=c014\0 \ @@ -267,44 +280,57 @@ kernel_addr_r=c070\0 \ hostname= xstr(CONFIG_HOSTNAME) \0 \ bootfile= xstr(CONFIG_HOSTNAME) /uImage\0 \ - ramdisk_file= xstr
[U-Boot] [PATCH v3 5/6] da850/omap-l138: davinci_emac: Suppress auto negotiation if needed
From this commit id: b78375a806ed04eb22b963255cfdef8df702de47 auto negotiation is enabled in RMII mode. Some boards based on da850 need to suppress this procedure. CC: Rajashekhara, Sudhakar sudhakar@ti.com CC: Lad, Prabhakar prabhakar@ti.com CC: Hadli, Manjunath manjunath.ha...@ti.com CC: sba...@denx.de Acked-by: Stefano Babic sba...@denx.de CC: Tom Rini tr...@ti.com Signed-off-by: Bastian Ruppert bastian.rupp...@sewerin.de --- drivers/net/davinci_emac.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c index b2516d1..fe988d7 100644 --- a/drivers/net/davinci_emac.c +++ b/drivers/net/davinci_emac.c @@ -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); -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v3 1/6] davinci: ea20: reorganisation LCD startup
Signed-off-by: Bastian Ruppert bastian.rupp...@sewerin.de CC: Tom Rini tr...@ti.com Acked-by: Stefano Babic sba...@denx.de --- board/davinci/ea20/ea20.c | 23 +++ 1 files changed, 15 insertions(+), 8 deletions(-) diff --git a/board/davinci/ea20/ea20.c b/board/davinci/ea20/ea20.c index 7e00040..69307e4 100644 --- a/board/davinci/ea20/ea20.c +++ b/board/davinci/ea20/ea20.c @@ -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]) 0x0fff, 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 */ -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v3 3/6] video: cfb_console: logo can be positioned via the splashpos variable
Extend the driver for placing the video/bmp logo as specified by splashpos environment variable. Signed-off-by: Bastian Ruppert bastian.rupp...@sewerin.de Signed-off-by: Anatolij Gustschin ag...@denx.de CC: Tom Rini tr...@ti.com CC: Stefano Babic sba...@denx.de --- 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(-) diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c index 19d061f..3ae420b 100644 --- a/drivers/video/cfb_console.c +++ b/drivers/video/cfb_console.c @@ -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
Re: [U-Boot] [PATCH 1/6] davinci: ea20: reorganisation LCD startup
Hello Tom, Re: [U-Boot] [PATCH 1/6] davinci: ea20: reorganisation LCD startup On Wed, Aug 15, 2012 at 09:55:40AM -0700, Tom Rini wrote: On Fri, Aug 10, 2012 at 09:26:41AM +0200, Bastian Ruppert wrote: Signed-off-by: Bastian Ruppert bastian.rupp...@sewerin.de CC: Tom Rini tr...@ti.com CC: Stefano Babic sba...@denx.de 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. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 3/6] video: cfb_console: logo can be positioned via the splashpos variable
Hello Anatolij, [U-Boot] [PATCH v2 3/6] video: cfb_console: logo can be positioned via the splashpos variable From: Bastian Ruppert bastian.rupp...@sewerin.de Extend the driver for placing the video/bmp logo as specified by splashpos environment variable. Signed-off-by: Bastian Ruppert bastian.rupp...@sewerin.de Signed-off-by: Anatolij Gustschin ag...@denx.de CC: Tom Rini tr...@ti.com CC: Stefano Babic sba...@denx.de --- 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(-) diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c index 19d061f..81e5e08 100644 --- a/drivers/video/cfb_console.c +++ b/drivers/video/cfb_console.c @@ -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 */ 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
Re: [U-Boot] [PATCH 3/6] video: cfb_console: logo can be positioned via the splashpos variable
Hi Bastian, Hello Anatolij, there is a number of issues with this patch, please see comments below. On Fri, 10 Aug 2012 09:26:43 +0200 Bastian Ruppert bastian.rupp...@sewerin.de wrote: Signed-off-by: Bastian Ruppert bastian.rupp...@sewerin.de CC: Anatolij Gustschin ag...@denx.de CC: Tom Rini tr...@ti.com CC: Stefano Babic sba...@denx.de --- drivers/video/cfb_console.c | 61 +++ +--- 1 files changed, 40 insertions(+), 21 deletions(-) diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c index 19d061f..21b52bd 100644 --- a/drivers/video/cfb_console.c +++ b/drivers/video/cfb_console.c @@ -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 these ifdefs should be better reduced, I think we can use __maybe_unused here, like for y_off above. OK. +#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). ... + + if (video_display_bitmap(addr, \ + video_logo_xpos, \ no need to use \ here. ... + logo_plot(video_fb_address, \ + VIDEO_COLS, \ + video_logo_xpos, \ ditto. ... OK. +#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 Thank you for your effort, Bastian. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/6] davinci: ea20: reorganisation LCD startup
Signed-off-by: Bastian Ruppert bastian.rupp...@sewerin.de CC: Tom Rini tr...@ti.com CC: Stefano Babic sba...@denx.de --- board/davinci/ea20/ea20.c | 23 +++ 1 files changed, 15 insertions(+), 8 deletions(-) diff --git a/board/davinci/ea20/ea20.c b/board/davinci/ea20/ea20.c index 7e00040..69307e4 100644 --- a/board/davinci/ea20/ea20.c +++ b/board/davinci/ea20/ea20.c @@ -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]) 0x0fff, 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 */ -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/6] davinci: ea20: the console is always set to the serial line
Do not allow to overwrite it when video is enabled. Signed-off-by: Bastian Ruppert bastian.rupp...@sewerin.de CC: Tom Rini tr...@ti.com CC: Stefano Babic sba...@denx.de --- board/davinci/ea20/ea20.c | 11 +-- include/configs/ea20.h|2 ++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/board/davinci/ea20/ea20.c b/board/davinci/ea20/ea20.c index 69307e4..0edd910 100644 --- a/board/davinci/ea20/ea20.c +++ b/board/davinci/ea20/ea20.c @@ -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; diff --git a/include/configs/ea20.h b/include/configs/ea20.h index a9caa81..f9a1462 100644 --- a/include/configs/ea20.h +++ b/include/configs/ea20.h @@ -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 /* -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 3/6] video: cfb_console: logo can be positioned via the splashpos variable
Signed-off-by: Bastian Ruppert bastian.rupp...@sewerin.de CC: Anatolij Gustschin ag...@denx.de CC: Tom Rini tr...@ti.com CC: Stefano Babic sba...@denx.de --- drivers/video/cfb_console.c | 61 --- 1 files changed, 40 insertions(+), 21 deletions(-) diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c index 19d061f..21b52bd 100644 --- a/drivers/video/cfb_console.c +++ b/drivers/video/cfb_console.c @@ -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); -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 5/6] da850/omap-l138: davinci_emac: Suppress auto negotiation if needed
From this commit id: b78375a806ed04eb22b963255cfdef8df702de47 auto negotiation is enabled in RMII mode. Some boards based on da850 need to suppress this procedure. CC: Rajashekhara, Sudhakar sudhakar@ti.com CC: Lad, Prabhakar prabhakar@ti.com CC: Hadli, Manjunath manjunath.ha...@ti.com CC: sba...@denx.de CC: Tom Rini tr...@ti.com Signed-off-by: Bastian Ruppert bastian.rupp...@sewerin.de --- drivers/net/davinci_emac.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c index b2516d1..fe988d7 100644 --- a/drivers/net/davinci_emac.c +++ b/drivers/net/davinci_emac.c @@ -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); -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 6/6] davinci: ea20: add some configs and default environmet variables
Signed-off-by: Bastian Ruppert bastian.rupp...@sewerin.de CC: Tom Rini tr...@ti.com CC: Stefano Babic sba...@denx.de --- include/configs/ea20.h | 106 ++-- 1 files changed, 66 insertions(+), 40 deletions(-) diff --git a/include/configs/ea20.h b/include/configs/ea20.h index f9a1462..373db74 100644 --- a/include/configs/ea20.h +++ b/include/configs/ea20.h @@ -30,6 +30,7 @@ #define CONFIG_USE_SPIFLASH #defineCONFIG_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 #defineCONFIG_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 -#defineCONFIG_EXTRA_ENV_SETTINGS \ +#defineCONFIG_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=c014\0 \ @@ -267,44 +280,57 @@ kernel_addr_r=c070\0 \ hostname= xstr(CONFIG_HOSTNAME) \0 \ bootfile= xstr(CONFIG_HOSTNAME) /uImage\0 \ - ramdisk_file= xstr
[U-Boot] [PATCH 4/6] video: cfb_console: add function to plot the logo area black
Signed-off-by: Bastian Ruppert bastian.rupp...@sewerin.de CC: Anatolij Gustschin ag...@denx.de CC: Tom Rini tr...@ti.com CC: Stefano Babic sba...@denx.de --- drivers/video/cfb_console.c | 46 +++--- 1 files changed, 42 insertions(+), 4 deletions(-) diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c index 21b52bd..b5e8a00 100644 --- a/drivers/video/cfb_console.c +++ b/drivers/video/cfb_console.c @@ -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: -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] UBIFS: Change ubifsload to set the filesize variable
This is the same behaviour like tftp or fatload command. Signed-off-by: Bastian Ruppert bastian.rupp...@sewerin.de CC: kmp...@infradead.org --- fs/ubifs/ubifs.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/fs/ubifs/ubifs.c b/fs/ubifs/ubifs.c index 5a5c739..2b9d2d2 100644 --- a/fs/ubifs/ubifs.c +++ b/fs/ubifs/ubifs.c @@ -688,6 +688,7 @@ int ubifs_load(char *filename, u32 addr, u32 size) int i; int count; int last_block_size = 0; + char buf [10]; c-ubi = ubi_open_volume(c-vi.ubi_num, c-vi.vol_id, UBI_READONLY); /* ubifs_findfile will resolve symlinks, so we know that we get @@ -719,6 +720,9 @@ int ubifs_load(char *filename, u32 addr, u32 size) printf(Loading file '%s' to addr 0x%08x with size %d (0x%08x)...\n, filename, addr, size, size); + sprintf(buf, %lX, size); + setenv(filesize, buf); + page.addr = (void *)addr; page.index = 0; page.inode = inode; -- 1.6.3.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2] UBIFS: Change ubifsload to set the filesize variable
This is the same behaviour like tftp or fatload command. Signed-off-by: Bastian Ruppert bastian.rupp...@sewerin.de CC: kmp...@infradead.org --- fs/ubifs/ubifs.c |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/fs/ubifs/ubifs.c b/fs/ubifs/ubifs.c index 5a5c739..75a2edc 100644 --- a/fs/ubifs/ubifs.c +++ b/fs/ubifs/ubifs.c @@ -688,6 +688,7 @@ int ubifs_load(char *filename, u32 addr, u32 size) int i; int count; int last_block_size = 0; + char buf [10]; c-ubi = ubi_open_volume(c-vi.ubi_num, c-vi.vol_id, UBI_READONLY); /* ubifs_findfile will resolve symlinks, so we know that we get @@ -739,8 +740,11 @@ int ubifs_load(char *filename, u32 addr, u32 size) if (err) printf(Error reading file '%s'\n, filename); - else + else { + sprintf(buf, %lX, size); + setenv(filesize, buf); printf(Done\n); + } ubifs_iput(inode); -- 1.6.3.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot