Changes ADS5121 splash screen from hard-coded bmp to flash bmp
A message that is not in the archive (sent off-list or not yet received): 7dfd7c063710b30e15af1060006674ebfdd1ae30.1212085162.git.mmarx@silicontkx.com
PATCH 1/1 Changes ADS5121 splash screen from hard-coded bmp to flash bmp
--- board/ads5121/Makefile | 1 - board/ads5121/ads5121_diu.c | 66 +++++++++++++++++++++++++++++++---- board/freescale/common/fsl_diu_fb.c | 6 +++- include/configs/ads5121.h | 2 + 4 files changed, 66 insertions(+), 9 deletions(-)
board/ads5121/Makefile +0 -1
@@ -30,7 +30,6 @@ LIB = $(obj)lib$(BOARD).a COBJS-y := $(BOARD).o COBJS-${CONFIG_FSL_DIU_FB} += ads5121_diu.o COBJS-${CONFIG_FSL_DIU_FB} += ../freescale/common/fsl_diu_fb.o -COBJS-${CONFIG_FSL_DIU_FB} += ../freescale/common/fsl_logo_bmp.o COBJS-$(CONFIG_PCI) += pci.o COBJS := $(COBJS-y)
board/ads5121/ads5121_diu.c +59 -7
81 lines not on this page · raw message
board/freescale/common/fsl_diu_fb.c +5 -1
@@ -301,11 +301,15 @@ int fsl_diu_init(int xres,debug ("Fix gamma table\n" ); gamma_table_base = gamma.paddr;for (i =0 ; i <256 *3 ; i++) { +#ifdef CONFIG_ADS5121 + gamma_table_base[i] = ((gamma_table_base[i] %4 ) <<6 ) + | (gamma_table_base[i] >>2 ); +#else gamma_table_base[i] = (gamma_table_base[i] <<2 ) | ((gamma_table_base[i] >>6 ) &0x03 ); +#endif } } -debug ("update-lcdc: HW - %p\n Disabling DIU\n" , hw);/* Program DIU registers */
include/configs/ads5121.h +2 -0
@@ -45,6 +45,7 @@*/ #define CONFIG_E300 1/* E300 Family */ #define CONFIG_MPC512X 1/* MPC512X family */ +#define CONFIG_ADS5121 1/* ADS5121 board */ #define CONFIG_FSL_DIU_FB 1/* FSL DIU */ /* video */
@@ -222,6 +223,7 @@#define CFG_MONITOR_LEN (256 * 1024)/* Reserve 256 kB for Mon */ #ifdef CONFIG_FSL_DIU_FB #define CFG_MALLOC_LEN (6 * 1024 * 1024)/* Reserved for malloc */ +#define CFG_SPLASH_SIZE (2 * 1024 * 1024)#else #define CFG_MALLOC_LEN (512 * 1024)#endif
Signature · 1 line
1.5.2.4
PATCH 1/1 Changes ADS5121 splash screen from hard-coded bmp to flash bmp
Quoted 1 line · Martha Marx
Signed-off-by Martha Marx <[email protected]>
You need to include a description of what your change does and why in every patch. In general, your commit message should be in the form:
----
1-line short description
multiline detailed description; feel free to be verbose here and split up into paragraphs as needed
signed-of/acked-by lines.
---
Also, you should include relevant maintainers in the to: line when you email patches, not just the mailing list. In this case, I believe it is York Sun.
Cheers,
g.
Quoted 160 lines
--- board/ads5121/Makefile | 1 - board/ads5121/ads5121_diu.c | 66 +++++++++++++++++++++++++++++++---- board/freescale/common/fsl_diu_fb.c | 6 +++- include/configs/ads5121.h | 2 + 4 files changed, 66 insertions(+), 9 deletions(-)board/ads5121/Makefile +0
-1@@ -30,7 +30,6 @@ LIB = $(obj)lib$(BOARD).a COBJS-y := $(BOARD).o COBJS-${CONFIG_FSL_DIU_FB} += ads5121_diu.o COBJS-${CONFIG_FSL_DIU_FB} += ../freescale/common/fsl_diu_fb.o -COBJS-${CONFIG_FSL_DIU_FB} += ../freescale/common/fsl_logo_bmp.o COBJS-$(CONFIG_PCI) += pci.o COBJS := $(COBJS-y)board/ads5121/ads5121_diu.c +59
-7@@ -26,6 +26,7 @@#include <common.h> #include <command.h> #include <asm/io.h> +#include <malloc.h> #ifdef CONFIG_FSL_DIU_FB @@ -61,16 +62,67 @@ void diu_set_pixel_clock(unsigned int pixclock)debug ("DIU: Modified value of CLKDVDR = 0x%08x\n" , *clkdvdr); } +char *valid_bmp (char *addr) +{ +unsigned long h_addr; + + h_addr =simple_strtoul (addr,NULL ,16 ); +if (h_addr <CFG_FLASH_BASE || + h_addr >= (CFG_FLASH_BASE +CFG_FLASH_SIZE -1 )) { +printf ("bmp addr %x is not a valid flash address\n" , h_addr); +return 0 ; + }else if ((*(char *)(h_addr) !='B' ) || (*(char *)(h_addr+1 ) !='M' )) { +printf ("bmp addr is not a bmp\n" ); +return 0 ; + }else +return (char *)h_addr; +} +int ads5121_diu_init (void ) { +int gamma_fix;unsigned int pixel_format; - - xres =1024 ; - yres =768 ; - pixel_format =0x88883316 ; - -return fsl_diu_init (xres, pixel_format,0 , - (unsigned char *)FSL_Logo_BMP); +char *bmp_env, *bmp, *monitor_port; +unsigned char *dest; +long bmp_sz; + +debug ("ads5121_diu_init\n" ); + bmp_env =getenv ("bmp_addr" ); +if (bmp_env ==NULL ) { +debug ("Environment Variable bmp_addr is not set \n" ); + bmp =0 ; + }else { + bmp =valid_bmp (bmp_env); + } +if (bmp) { + bmp_sz = (bmp[5 ] <<24 ) | (bmp[4 ] <<16 ) | + (bmp[3 ] <<8 ) | bmp[2 ]; +debug ("bmp_sz = %u\n" , bmp_sz); +if (bmp_sz >CFG_SPLASH_SIZE ) { +printf ("BMP exceeds size limit of %d\n" , +CFG_SPLASH_SIZE ); + bmp =0 ; + }else { + dest =malloc (bmp_sz); + (void )memcpy ((void *)dest, bmp, bmp_sz); + } + } + monitor_port =getenv ("monitor_port" ); +if (!strncmp (monitor_port,"LCD" ,3 )) { +debug ("LCD Monitor port\n" ); + xres =1024 ; + yres =768 ; + pixel_format =0x88883316 ; + gamma_fix =1 ; + }else { +debug ("DVI Monitor port\n" ); + xres =1024 ; + yres =768 ; + pixel_format =0x88883316 ; + gamma_fix =0 ; + } +return fsl_diu_init (xres, pixel_format, gamma_fix, + (unsigned char *)bmp); } int ads5121diu_init_show_bmp(cmd_tbl_t *cmdtp,board/freescale/common/fsl_diu_fb.c +5
-1@@ -301,11 +301,15 @@ int fsl_diu_init(int xres,debug ("Fix gamma table\n" ); gamma_table_base = gamma.paddr;for (i =0 ; i <256 *3 ; i++) { +#ifdef CONFIG_ADS5121 + gamma_table_base[i] = ((gamma_table_base[i] %4 ) <<6 ) + | (gamma_table_base[i] >>2 ); +#else gamma_table_base[i] = (gamma_table_base[i] <<2 ) | ((gamma_table_base[i] >>6 ) &0x03 ); +#endif } } -debug ("update-lcdc: HW - %p\n Disabling DIU\n" , hw);/* Program DIU registers */ include/configs/ads5121.h +2
-1@@ -45,6 +45,7 @@*/ #define CONFIG_E300 1/* E300 Family */ #define CONFIG_MPC512X 1/* MPC512X family */ +#define CONFIG_ADS5121 1/* ADS5121 board */ #define CONFIG_FSL_DIU_FB 1/* FSL DIU */ /* video */ @@ -222,6 +223,7 @@#define CFG_MONITOR_LEN (256 * 1024)/* Reserve 256 kB for Mon */ #ifdef CONFIG_FSL_DIU_FB #define CFG_MALLOC_LEN (6 * 1024 * 1024)/* Reserved for malloc */ +#define CFG_SPLASH_SIZE (2 * 1024 * 1024)#else #define CFG_MALLOC_LEN (512 * 1024)#endif --1.5.2.4
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users
Signature · 2 lines
Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd.
PATCH 1/1 Changes ADS5121 splash screen from hard-coded bmp to flash bmp
York, could you ack this? I'll fix the commit message before checking it in, I'd just like an ack of the actual content.
Thanks
John
Quoted 199 lines · Grant Likely
Quoted 1 line · Martha Marx
Signed-off-by Martha Marx <[email protected]>You need to include a description of what your change does and why in every patch. In general, your commit message should be in the form:
----
1-line short descriptionmultiline detailed description; feel free to be verbose here and split up into paragraphs as needed
signed-of/acked-by lines.
---Also, you should include relevant maintainers in the to: line when you email patches, not just the mailing list. In this case, I believe it is York Sun.
Cheers,
g.Quoted 151 lines
--- board/ads5121/Makefile | 1 - board/ads5121/ads5121_diu.c | 66 +++++++++++++++++++++++++++++++---- board/freescale/common/fsl_diu_fb.c | 6 +++- include/configs/ads5121.h | 2 + 4 files changed, 66 insertions(+), 9 deletions(-)board/ads5121/Makefile +0
-1@@ -30,7 +30,6 @@ LIB = $(obj)lib$(BOARD).a COBJS-y := $(BOARD).o COBJS-${CONFIG_FSL_DIU_FB} += ads5121_diu.o COBJS-${CONFIG_FSL_DIU_FB} += ../freescale/common/fsl_diu_fb.o -COBJS-${CONFIG_FSL_DIU_FB} += ../freescale/common/fsl_logo_bmp.o COBJS-$(CONFIG_PCI) += pci.o COBJS := $(COBJS-y)board/ads5121/ads5121_diu.c +59
-7@@ -26,6 +26,7 @@#include <common.h> #include <command.h> #include <asm/io.h> +#include <malloc.h> #ifdef CONFIG_FSL_DIU_FB @@ -61,16 +62,67 @@ void diu_set_pixel_clock(unsigned int pixclock)debug ("DIU: Modified value of CLKDVDR = 0x%08x\n" , *clkdvdr); } +char *valid_bmp (char *addr) +{ +unsigned long h_addr; + + h_addr =simple_strtoul (addr,NULL ,16 ); +if (h_addr <CFG_FLASH_BASE || + h_addr >= (CFG_FLASH_BASE +CFG_FLASH_SIZE -1 )) { +printf ("bmp addr %x is not a valid flash address\n" , h_addr); +return 0 ; + }else if ((*(char *)(h_addr) !='B' ) || (*(char *)(h_addr+1 ) !='M' )) { +printf ("bmp addr is not a bmp\n" ); +return 0 ; + }else +return (char *)h_addr; +} +int ads5121_diu_init (void ) { +int gamma_fix;unsigned int pixel_format; - - xres =1024 ; - yres =768 ; - pixel_format =0x88883316 ; - -return fsl_diu_init (xres, pixel_format,0 , - (unsigned char *)FSL_Logo_BMP); +char *bmp_env, *bmp, *monitor_port; +unsigned char *dest; +long bmp_sz; + +debug ("ads5121_diu_init\n" ); + bmp_env =getenv ("bmp_addr" ); +if (bmp_env ==NULL ) { +debug ("Environment Variable bmp_addr is not set \n" ); + bmp =0 ; + }else { + bmp =valid_bmp (bmp_env); + } +if (bmp) { + bmp_sz = (bmp[5 ] <<24 ) | (bmp[4 ] <<16 ) | + (bmp[3 ] <<8 ) | bmp[2 ]; +debug ("bmp_sz = %u\n" , bmp_sz); +if (bmp_sz >CFG_SPLASH_SIZE ) { +printf ("BMP exceeds size limit of %d\n" , +CFG_SPLASH_SIZE ); + bmp =0 ; + }else { + dest =malloc (bmp_sz); + (void )memcpy ((void *)dest, bmp, bmp_sz); + } + } + monitor_port =getenv ("monitor_port" ); +if (!strncmp (monitor_port,"LCD" ,3 )) { +debug ("LCD Monitor port\n" ); + xres =1024 ; + yres =768 ; + pixel_format =0x88883316 ; + gamma_fix =1 ; + }else { +debug ("DVI Monitor port\n" ); + xres =1024 ; + yres =768 ; + pixel_format =0x88883316 ; + gamma_fix =0 ; + } +return fsl_diu_init (xres, pixel_format, gamma_fix, + (unsigned char *)bmp); } int ads5121diu_init_show_bmp(cmd_tbl_t *cmdtp,board/freescale/common/fsl_diu_fb.c +5
-1@@ -301,11 +301,15 @@ int fsl_diu_init(int xres,debug ("Fix gamma table\n" ); gamma_table_base = gamma.paddr;for (i =0 ; i <256 *3 ; i++) { +#ifdef CONFIG_ADS5121 + gamma_table_base[i] = ((gamma_table_base[i] %4 ) <<6 ) + | (gamma_table_base[i] >>2 ); +#else gamma_table_base[i] = (gamma_table_base[i] <<2 ) | ((gamma_table_base[i] >>6 ) &0x03 ); +#endif } } -debug ("update-lcdc: HW - %p\n Disabling DIU\n" , hw);/* Program DIU registers */ include/configs/ads5121.h +2
-1@@ -45,6 +45,7 @@*/ #define CONFIG_E300 1/* E300 Family */ #define CONFIG_MPC512X 1/* MPC512X family */ +#define CONFIG_ADS5121 1/* ADS5121 board */ #define CONFIG_FSL_DIU_FB 1/* FSL DIU */ /* video */ @@ -222,6 +223,7 @@#define CFG_MONITOR_LEN (256 * 1024)/* Reserve 256 kB for Mon */ #ifdef CONFIG_FSL_DIU_FB #define CFG_MALLOC_LEN (6 * 1024 * 1024)/* Reserved for malloc */ +#define CFG_SPLASH_SIZE (2 * 1024 * 1024)#else #define CFG_MALLOC_LEN (512 * 1024)#endif --1.5.2.4
Quoted 9 lines
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users