update the EB+MCF-EV123 board support
PATCH 2/2 update the EB+MCF-EV123 board support
This patch updates the support for EB+MCF-EV123 board
and needs the [PATCH 1/2] new video driver for bus vcxk framebuffers
* remove the board framebuffer driver
* use the common bus_vcxk framebuffer driver
* adds bmp support
* adds splashimage support
* fix serveral cosmetical errors
---
board/BuS/EB+MCF-EV123/EB+MCF-EV123.c +96 -15
@@ -27,7 +27,18 @@#include <common.h> #include <command.h> #include "asm/m5282.h" -#include "VCxK.h" +#include <bmp_layout.h> +#include <status_led.h> +#include <bus_vcxk.h> + +/*---------------------------------------------------------------------------*/ + +DECLARE_GLOBAL_DATA_PTR ; + +unsigned long display_width; +unsigned long display_height; + +/*---------------------------------------------------------------------------*/ int checkboard (void ) {
@@ -89,7 +100,6 @@ phys_size_t initdram (int board_type)return size; } -#if defined(CONFIG_SYS_DRAM_TEST )int testdram (void ) {
@@ -126,37 +136,108 @@ int testdram (void)int misc_init_r (void ) { -init_vcxk (); +#ifdef CONFIG_HW_WATCHDOG +hw_watchdog_init (); +#endif +#ifndef CONFIG_VIDEO +vcxk_init (16 ,16 ); +#endif return 1 ; } +#if defined(CONFIG_VIDEO ) + +/*---------------------------------------------------------------------------- +****h* EB+CPU5282-T1/drv_video_init +* FUNCTION +*** +----------------------------------------------------------------------------*/ + +int drv_video_init (void ) +{ +char *s; +unsigned long splash; + +printf ("Init Video as " ); + +if ((s =getenv ("displaywidth" )) !=NULL ) + { + display_width =simple_strtoul (s,NULL ,10 ); + } +else + { + display_width=256 ; + } +if ((s =getenv ("displayheight" )) !=NULL ) + { + display_height =simple_strtoul (s,NULL ,10 ); + } +else + { + display_height=256 ; + } +printf ("%lu x %lu pixel matrix\n" ,display_width,display_height); +vcxk_init (display_width,display_height); + +#ifdef CONFIG_SPLASH_SCREEN +if ((s =getenv ("splashimage" )) !=NULL ) + { +debug ("use splashimage: %s\n" ,s); + splash =simple_strtoul (s,NULL ,16 ); +debug ("use splashimage: %x\n" ,splash); +vcxk_acknowledge_wait (); +video_display_bitmap (splash,0 ,0 ); + } +#endif +return 0 ; +} + +#endif +/*---------------------------------------------------------------------------*/ -int do_vcimage (cmd_tbl_t *cmdtp,int flag,int argc,char *argv[]) +#ifdef CONFIG_VIDEO +int do_brightness (cmd_tbl_t *cmdtp,int flag,int argc,char *argv[]) {int rcode =0 ; -ulong source; +ulong side; +ulong bright;switch (argc) { -case 2 : - source =simple_strtoul (argv[1 ],NULL ,16 ); -vcxk_loadimage (source); - rcode =0 ; +case 3 : + side =simple_strtoul (argv[1 ],NULL ,10 ); + bright =simple_strtoul (argv[2 ],NULL ,10 ); +if ((side>=0 ) && (side<=3 ) && + (bright>=0 ) && (bright<=1000 )) + { +vcxk_setbrightness (side,bright); + rcode =0 ; + } +else + { +printf ("parameters out of range\n" ); +printf ("Usage:\n%s\n" , cmdtp->usage); + rcode =1 ; + }break ;default : -cmd_usage (cmdtp); +printf ("Usage:\n%s\n" , cmdtp->usage); rcode =1 ;break ; }return rcode; } -/***************************************************/ +/*---------------------------------------------------------------------------*/ U_BOOT_CMD ( - vcimage,2 ,0 , do_vcimage, -"loads an image to Display" , -"vcimage addr\n" + bright,3 ,0 , do_brightness, +"sets the display brightness\n" , +" <side> <0..1000>\n side: 0/3=both; 1=first; 2=second\n" ); -/* EOF EB+MCF-EV123c */ +#endif + +/*---------------------------------------------------------------------------*/ +/* EOF EB+MCF-EV123.c */ +/*---------------------------------------------------------------------------*/
board/BuS/EB+MCF-EV123/Makefile +1 -1
@@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(BOARD).a -COBJS = $(BOARD).o cfm_flash.o flash.o VCxK.o +COBJS = $(BOARD).o cfm_flash.o flash.o SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS))
board/BuS/EB+MCF-EV123/VCxK.c deleted +0 -136
136 lines not on this page · raw message
board/BuS/EB+MCF-EV123/VCxK.h deleted +0 -48
48 lines not on this page · raw message
include/configs/EB+MCF-EV123.h +123 -74
292 lines not on this page · raw message
PATCH v2 2/2 update the EB+MCF-EV123 board support
This patch updates the support for EB+MCF-EV123 board and needs the [PATCH 1/2 V2] new video driver for bus vcxk framebuffers
* remove the board framebuffer driver
* use the common bus_vcxk framebuffer driver
* adds bmp support
* adds splashimage support
* fix serveral cosmetical errors
---
board/BuS/EB+MCF-EV123/EB+MCF-EV123.c +100 -15
@@ -27,7 +27,18 @@#include <common.h> #include <command.h> #include "asm/m5282.h" -#include "VCxK.h" +#include <bmp_layout.h> +#include <status_led.h> +#include <bus_vcxk.h> + +/*---------------------------------------------------------------------------*/ + +DECLARE_GLOBAL_DATA_PTR ; + +unsigned long display_width; +unsigned long display_height; + +/*---------------------------------------------------------------------------*/ int checkboard (void ) {
@@ -89,7 +100,6 @@ phys_size_t initdram (int board_type)return size; } -#if defined(CONFIG_SYS_DRAM_TEST )int testdram (void ) {
@@ -126,37 +136,112 @@ int testdram (void)int misc_init_r (void ) { -init_vcxk (); +#ifdef CONFIG_HW_WATCHDOG +hw_watchdog_init (); +#endif +#ifndef CONFIG_VIDEO +vcxk_init (16 ,16 ); +#endif return 1 ; } +#if defined(CONFIG_VIDEO ) + +/*---------------------------------------------------------------------------- +****h* EB+CPU5282-T1/drv_video_init +* FUNCTION +*** +----------------------------------------------------------------------------*/ + +int drv_video_init (void ) +{ +char *s; +unsigned long splash; + +printf ("Init Video as " ); + +if ((s =getenv ("displaywidth" )) !=NULL ) + { + display_width =simple_strtoul (s,NULL ,10 ); + } +else + { + display_width=256 ; + } +if ((s =getenv ("displayheight" )) !=NULL ) + { + display_height =simple_strtoul (s,NULL ,10 ); + } +else + { + display_height=256 ; + } +printf ("%lu x %lu pixel matrix\n" ,display_width,display_height); + +MCFCCM_CCR &= ~MCFCCM_CCR_SZEN ; +MCFGPIO_PEPAR &= ~MCFGPIO_PEPAR_PEPA2 ; + +vcxk_init (display_width,display_height); + +#ifdef CONFIG_SPLASH_SCREEN +if ((s =getenv ("splashimage" )) !=NULL ) + { +debug ("use splashimage: %s\n" ,s); + splash =simple_strtoul (s,NULL ,16 ); +debug ("use splashimage: %x\n" ,splash); +vcxk_acknowledge_wait (); +video_display_bitmap (splash,0 ,0 ); + } +#endif +return 0 ; +} + +#endif +/*---------------------------------------------------------------------------*/ -int do_vcimage (cmd_tbl_t *cmdtp,int flag,int argc,char *argv[]) +#ifdef CONFIG_VIDEO +int do_brightness (cmd_tbl_t *cmdtp,int flag,int argc,char *argv[]) {int rcode =0 ; -ulong source; +ulong side; +ulong bright;switch (argc) { -case 2 : - source =simple_strtoul (argv[1 ],NULL ,16 ); -vcxk_loadimage (source); - rcode =0 ; +case 3 : + side =simple_strtoul (argv[1 ],NULL ,10 ); + bright =simple_strtoul (argv[2 ],NULL ,10 ); +if ((side>=0 ) && (side<=3 ) && + (bright>=0 ) && (bright<=1000 )) + { +vcxk_setbrightness (side,bright); + rcode =0 ; + } +else + { +printf ("parameters out of range\n" ); +printf ("Usage:\n%s\n" , cmdtp->usage); + rcode =1 ; + }break ;default : -cmd_usage (cmdtp); +printf ("Usage:\n%s\n" , cmdtp->usage); rcode =1 ;break ; }return rcode; } -/***************************************************/ +/*---------------------------------------------------------------------------*/ U_BOOT_CMD ( - vcimage,2 ,0 , do_vcimage, -"loads an image to Display" , -"vcimage addr" + bright,3 ,0 , do_brightness, +"sets the display brightness\n" , +" <side> <0..1000>\n side: 0/3=both; 1=first; 2=second\n" ); -/* EOF EB+MCF-EV123c */ +#endif + +/*---------------------------------------------------------------------------*/ +/* EOF EB+MCF-EV123.c */ +/*---------------------------------------------------------------------------*/
board/BuS/EB+MCF-EV123/Makefile +1 -1
@@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(BOARD).a -COBJS = $(BOARD).o cfm_flash.o flash.o VCxK.o +COBJS = $(BOARD).o cfm_flash.o flash.o SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS))
board/BuS/EB+MCF-EV123/VCxK.c deleted +0 -136
136 lines not on this page · raw message
board/BuS/EB+MCF-EV123/VCxK.h deleted +0 -48
48 lines not on this page · raw message
include/configs/EB+MCF-EV123.h +97 -79
280 lines not on this page · raw message
PATCH v2 2/2 update the EB+MCF-EV123 board support
Dear Jens Scharsig,
Quoted 1 line · In message <[email protected]> you wrote:
This patch updates the support for EB+MCF-EV123 board and needs the [PATCH 1/2 V2] new video driver for bus vcxk framebuffers
Please restrict the line length of the commit message to 70 characters or less.
...
board/BuS/EB+MCF-EV123/EB+MCF-EV123.c int testdram (void) · line 154
Quoted 7 lines
board/BuS/EB+MCF-EV123/EB+MCF-EV123.c +7
-0+#if defined(CONFIG_VIDEO ) + +/*---------------------------------------------------------------------------- +****h* EB+CPU5282-T1/drv_video_init +* FUNCTION +*** +----------------------------------------------------------------------------*/
Incorrect multi-line comment style.
Quoted 13 lines
board/BuS/EB+MCF-EV123/EB+MCF-EV123.c +13
-0+int drv_video_init (void ) +{ +char *s; +unsigned long splash; + +printf ("Init Video as " ); + +if ((s =getenv ("displaywidth" )) !=NULL ) + { + display_width =simple_strtoul (s,NULL ,10 ); + } +else + {
board/BuS/EB+MCF-EV123/EB+MCF-EV123.c int testdram (void) · line 178
Quoted 10 lines
board/BuS/EB+MCF-EV123/EB+MCF-EV123.c +10
-0+ display_width=256 ; + } +if ((s =getenv ("displayheight" )) !=NULL ) + { + display_height =simple_strtoul (s,NULL ,10 ); + } +else + { + display_height=256 ; + }
Incorrect brace style.
board/BuS/EB+MCF-EV123/EB+MCF-EV123.c int testdram (void) · line 179
Quoted 1 line
board/BuS/EB+MCF-EV123/EB+MCF-EV123.c +1
-0+printf ("%lu x %lu pixel matrix\n" ,display_width,display_height);
Please s/,/, /g
Please clean up and resubmit.
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
News is what a chap who doesn't care much about anything wants to
read. And it's only news until he's read it. After that it's dead.
- Evelyn Waugh _Scoop_ (1938) bk. 1, ch. 5PATCH v2 2/2 update the EB+MCF-EV123 board support
Quoted 5 lines · Wolfgang Denk
Dear Jens Scharsig,
Please restrict the line length of the commit message to 70 characters or less.
...
Quoted 4 lines
Incorrect brace style.
...
Quoted 3 lines
Please s/,/, /g
Fixed in [PATCH 2/2 V3] update the EB+MCF-EV123 board support
Best regards,
Jens Scharsig
PATCH 2/2 update the EB+MCF-EV123 board support
In reply to Jens ScharsigThis patch updates the support for EB+MCF-EV123 board and needs the [PATCH 1/2 V3] new video driver for bus vcxk framebuffers
* remove the board framebuffer driver
* use the common bus_vcxk framebuffer driver
* adds bmp support
* adds splashimage support
* fix serveral cosmetical errors
---
board/BuS/EB+MCF-EV123/EB+MCF-EV123.c +88 -16
@@ -1,5 +1,5 @@/* -* (C) Copyright 2005 +* (C) Copyright 2005-2009 * BuS Elektronik GmbH & Co.KG <[email protected]> * * (C) Copyright 2000-2003
@@ -27,7 +27,18 @@#include <common.h> #include <command.h> #include "asm/m5282.h" -#include "VCxK.h" +#include <bmp_layout.h> +#include <status_led.h> +#include <bus_vcxk.h> + +/*---------------------------------------------------------------------------*/ + +DECLARE_GLOBAL_DATA_PTR ; + +unsigned long display_width; +unsigned long display_height; + +/*---------------------------------------------------------------------------*/ int checkboard (void ) {
@@ -89,7 +100,6 @@ phys_size_t initdram (int board_type)return size; } -#if defined(CONFIG_SYS_DRAM_TEST )int testdram (void ) {
@@ -126,37 +136,99 @@ int testdram (void)int misc_init_r (void ) { -init_vcxk (); +#ifdef CONFIG_HW_WATCHDOG +hw_watchdog_init (); +#endif +#ifndef CONFIG_VIDEO +vcxk_init (16 ,16 ); +#endif return 1 ; } +#if defined(CONFIG_VIDEO ) + +/* +****h* EB+CPU5282-T1/drv_video_init +* FUNCTION +*** +*/ + +int drv_video_init (void ) +{ +char *s; +unsigned long splash; + +printf ("Init Video as " ); + +if ((s =getenv ("displaywidth" )) !=NULL ) { + display_width =simple_strtoul (s,NULL ,10 ); + }else { + display_width =256 ; + } +if ((s =getenv ("displayheight" )) !=NULL ) + display_height =simple_strtoul (s,NULL ,10 ); +else + display_height =256 ; + +printf ("%lu x %lu pixel matrix\n" , display_width, display_height); + +MCFCCM_CCR &= ~MCFCCM_CCR_SZEN ; +MCFGPIO_PEPAR &= ~MCFGPIO_PEPAR_PEPA2 ; + +vcxk_init (display_width, display_height); + +#ifdef CONFIG_SPLASH_SCREEN +if ((s =getenv ("splashimage" )) !=NULL ) { +debug ("use splashimage: %s\n" ,s); + splash =simple_strtoul (s,NULL ,16 ); +debug ("use splashimage: %x\n" , splash); +vcxk_acknowledge_wait (); +video_display_bitmap (splash,0 ,0 ); + } +#endif +return 0 ; +} +#endif +/*---------------------------------------------------------------------------*/ -int do_vcimage (cmd_tbl_t *cmdtp,int flag,int argc,char *argv[]) +#ifdef CONFIG_VIDEO +int do_brightness (cmd_tbl_t *cmdtp,int flag,int argc,char *argv[]) {int rcode =0 ; -ulong source; +ulong side; +ulong bright;switch (argc) { -case 2 : - source =simple_strtoul (argv[1 ],NULL ,16 ); -vcxk_loadimage (source); - rcode =0 ; +case 3 : + side =simple_strtoul (argv[1 ],NULL ,10 ); + bright =simple_strtoul (argv[2 ],NULL ,10 ); +if ((side >=0 ) && (side <=3 ) && + (bright >=0 ) && (bright <=1000 )) { +vcxk_setbrightness (side, bright); + rcode =0 ; + }else { +printf ("parameters out of range\n" ); +printf ("Usage:\n%s\n" , cmdtp->usage); + rcode =1 ; + }break ;default : -cmd_usage (cmdtp); +printf ("Usage:\n%s\n" , cmdtp->usage); rcode =1 ;break ; }return rcode; } -/***************************************************/ +/*---------------------------------------------------------------------------*/ U_BOOT_CMD ( - vcimage,2 ,0 , do_vcimage, -"loads an image to Display" , -"vcimage addr" + bright,3 ,0 , do_brightness, +"sets the display brightness\n" , +" <side> <0..1000>\n side: 0/3=both; 1=first; 2=second\n" ); -/* EOF EB+MCF-EV123c */ +#endif + +/* EOF EB+MCF-EV123.c */
board/BuS/EB+MCF-EV123/Makefile +1 -1
@@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(BOARD).a -COBJS = $(BOARD).o cfm_flash.o flash.o VCxK.o +COBJS = $(BOARD).o cfm_flash.o flash.o SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS))
board/BuS/EB+MCF-EV123/VCxK.c deleted +0 -136
136 lines not on this page · raw message
board/BuS/EB+MCF-EV123/VCxK.h deleted +0 -48
48 lines not on this page · raw message
include/configs/EB+MCF-EV123.h +97 -79
280 lines not on this page · raw message
PATCH 2/2 update the EB+MCF-EV123 board support
Quoted 10 lines · Jens Scharsig
This patch updates the support for EB+MCF-EV123 board and needs the [PATCH 1/2 V3] new video driver for bus vcxk framebuffers
* remove the board framebuffer driver
* use the commonbus_vcxkframebuffer driver
* adds bmp support
* adds splashimage support
* fix serveral cosmetical errorsSigned-off-by Jens Scharsig <[email protected]>
Applied to u-boot-video. Thanks!
Best regards,
Anatolij