[U-Boot-Users] [PATCH 2/2] Update the RRvision port to a modern version of u-boot.

Wolfgang Denk wd at denx.de
Thu Jun 19 16:51:52 CEST 2008


In message <20080619110522.2b31cc84 at peedub.jennejohn.org> you wrote:
> 
> The port now uses the CFI-driver so board/RRvision/flash.c has been removed.
> Signed-off-by: Gary Jennejohn <garyj at denx.de>
> ---
>  Makefile                     |  385 +++++++++++++++++++++++++++++++
>  board/RRvision/Makefile      |    4 +-
>  board/RRvision/RRvision.c    |    9 +-
>  board/RRvision/flash.c       |  522 ------------------------------------------
>  common/lcd.c                 |    9 +-
>  cpu/mpc8xx/cpu_init.c        |    2 +-
>  cpu/mpc8xx/fec.c             |    8 +
>  cpu/mpc8xx/lcd.c             |  185 ++++++++++++++-
>  cpu/mpc8xx/video.c           |   22 ++-
>  include/configs/RRvision.h   |  210 +++++++++++++----
>  include/configs/TTTech_env.h |   99 ++++++++
>  tools/Makefile               |   20 ++
>  12 files changed, 891 insertions(+), 584 deletions(-)
>  delete mode 100644 board/RRvision/flash.c
>  create mode 100644 include/configs/TTTech_env.h
> 
> diff --git a/common/lcd.c b/common/lcd.c
> index ebf377a..e54d4f5 100644
> --- a/common/lcd.c
> +++ b/common/lcd.c
> @@ -70,6 +70,13 @@
>  # if (CONSOLE_COLOR_WHITE >= BMP_LOGO_OFFSET)
>  #  error Default Color Map overlaps with Logo Color Map
>  # endif
> +
> +# ifndef CONFIG_LCD_LOGO_X
> +# define CONFIG_LCD_LOGO_X      0
> +# endif
> +# ifndef CONFIG_LCD_LOGO_Y
> +# define CONFIG_LCD_LOGO_Y      0
> +# endif
>  #endif
>  
>  DECLARE_GLOBAL_DATA_PTR;
> @@ -768,7 +775,7 @@ static void *lcd_logo (void)
>  #endif /* CONFIG_SPLASH_SCREEN */
>  
>  #ifdef CONFIG_LCD_LOGO
> -	bitmap_plot (0, 0);
> +	bitmap_plot (CONFIG_LCD_LOGO_X, CONFIG_LCD_LOGO_Y);
>  #endif /* CONFIG_LCD_LOGO */

Umm... this was already submitted with your previous patch, I think.

Please make sure to split your parts orthogonally.

> diff --git a/cpu/mpc8xx/cpu_init.c b/cpu/mpc8xx/cpu_init.c
> index fb3414a..400c2bc 100644
> --- a/cpu/mpc8xx/cpu_init.c
> +++ b/cpu/mpc8xx/cpu_init.c
> @@ -62,7 +62,7 @@ void cpu_init_f (volatile immap_t * immr)
>  #endif /* CONFIG_WATCHDOG */
>  
>  	/* SIUMCR - contains debug pin configuration (11-6) */
> -#ifndef CONFIG_SVM_SC8xx
> +#if !defined (CONFIG_SVM_SC8xx) && !defined (CONFIG_RRVISION)
>  	immr->im_siu_conf.sc_siumcr |= CFG_SIUMCR;

Ditto.

>  	immr->im_siu_conf.sc_siumcr = CFG_SIUMCR;
> diff --git a/cpu/mpc8xx/fec.c b/cpu/mpc8xx/fec.c
> index 37eb481..59da088 100644
> --- a/cpu/mpc8xx/fec.c
> +++ b/cpu/mpc8xx/fec.c
> @@ -837,6 +837,8 @@ static void fec_halt(struct eth_device* dev)
>  #define PHY_ID_LSI80225B	0x0016f880	/* LSI 80225/B */
>  #define PHY_ID_DM9161		0x0181B880	/* Davicom DM9161 */
>  #define PHY_ID_KSM8995M		0x00221450	/* MICREL KS8995MA */
> +#define PHY_ID_DP83846A		0x20005c20	/* NatSem DP83846A */
> +#define PHY_ID_DP83847		0x20005c30	/* NatSem DP83847 */

Ditto!!!

> diff --git a/cpu/mpc8xx/lcd.c b/cpu/mpc8xx/lcd.c
> index 3c64a9b..13469a8 100644
> --- a/cpu/mpc8xx/lcd.c
> +++ b/cpu/mpc8xx/lcd.c

Please make a separate patch so the responsible custodian can pick it
up.

>  vidinfo_t panel_info = {
>      640, 480, 212, 158, CFG_HIGH, CFG_HIGH, CFG_LOW, CFG_LOW, CFG_HIGH,
> -    3, 0, 0, 1, 1, 144, 2, 0, 33
> +    3, 0, 0, 1, 1, 88, 2, 0, 33

Indentation by TABs, please (here and everywhere else).

> +vidinfo_t panel_info = {
> +    800,            /* Number of columns (i.e. 640) */
...

Ditto. etc. etc.

> diff --git a/include/configs/RRvision.h b/include/configs/RRvision.h
> index 6a71801..1ffd9f3 100644
> --- a/include/configs/RRvision.h
> +++ b/include/configs/RRvision.h
> @@ -29,12 +29,19 @@
>  #define __CONFIG_H
>  
>  /*
> + * Extra environment settings common for TTTech.  Moved fron include

Typo - "from"

> @@ -48,39 +55,93 @@
>  #define CONFIG_BOOTDELAY	3	/* autoboot after 5 seconds	*/
>  #endif
>  
> -#define	CONFIG_CLOCKS_IN_MHZ	1	/* clocks passsed to Linux in MHz */
> +#undef	CONFIG_CLOCKS_IN_MHZ		/* clocks passsed to Linux in MHz */

Just delete this line, please.

> -#define CONFIG_PREBOOT	"setenv stdout serial"
> +#define CONFIG_PREBOOT  "run holdpower; run sensor_supply_on"

Alignment by TABs, please.

> +#define CONFIG_ETHADDR			00:50:C2:00:E0:70
> +#define CONFIG_OVERWRITE_ETHADDR_ONCE	1
> +#define CONFIG_IPADDR			10.120.30.2
> +#define CONFIG_SERVERIP			10.120.20.27
> +#define CONFIG_NETMASK			255.255.0.0
> +#define CONFIG_GATEWAYIP		10.255.255.254

Please delete this block. We do not accept such settings in default
config files.

> +#define CONFIG_STDIN			"serial"
> +#define CONFIG_STDOUT			"serial"
> +#define CONFIG_STDERR			"serial"

Is this really necessary?

> +/*
> + * Note that the ocan driver under Linux does its own mapping, so we
> + * don't need it here. Also note that enabling this needs some work
> + * because the default mapping below is wrong (CS3 is the TTP-Controller
> + * not the CAN)
> + */
>  #undef	CONFIG_CAN_DRIVER		/* CAN Driver support disabled	*/

Then please delete this, plus the wrong mappings below.

> -#define I2C_SDA(bit)	if(bit) immr->im_cpm.cp_pbdat |=  PB_SDA; \
> +#define I2C_SDA(bit)	if((bit)) immr->im_cpm.cp_pbdat |=  PB_SDA; \
>  			else    immr->im_cpm.cp_pbdat &= ~PB_SDA
> -#define I2C_SCL(bit)	if(bit) immr->im_cpm.cp_pbdat |=  PB_SCL; \
> +#define I2C_SCL(bit)	if((bit)) immr->im_cpm.cp_pbdat |=  PB_SCL; \
>  			else    immr->im_cpm.cp_pbdat &= ~PB_SCL

Please wrap these in do { ... } while (0) constructs.

> +#undef CONFIG_CMD_REGINFO		/* could be useful		*/
>  #undef CONFIG_CMD_PCMCIA
>  #undef CONFIG_CMD_IDE
> +#undef CONFIG_CMD_FPGA
> +#undef CONFIG_CMD_SETGETDCR		/* DCR support on 4xx		*/

Is it really necessary to undef stuff that is not definued anyway?

> +/*
> + * Note that the CAN chip uses CS7 (not 3) so before enabling this,
> + * correct the setting.
> + */
>  #ifndef	CONFIG_CAN_DRIVER
>  #define	CFG_OR3_PRELIM	CFG_OR2_PRELIM
>  #define CFG_BR3_PRELIM	((SDRAM_BASE3_PRELIM & BR_BA_MSK) | BR_MS_UPMA | BR_V )

Please either correct it now, so it can be just enabled, or delete
alltogether.

> diff --git a/include/configs/TTTech_env.h b/include/configs/TTTech_env.h
> new file mode 100644
> index 0000000..8cdeafd
> --- /dev/null
> +++ b/include/configs/TTTech_env.h
> @@ -0,0 +1,99 @@
> +/*
> + * (C) Copyright 2008
> + * Wolfgang Denk, DENX Software Engineering, wd at denx.de.

This is not correct. Please do not blame me  foir  this.  I  did  not
write this file.

Again - indentation and alignment by TABs, please.

> index 8533a8e..f68acba 100644
> --- a/tools/Makefile
> +++ b/tools/Makefile
> @@ -41,6 +41,26 @@ LIBFDT_OBJ_FILES	= $(obj)fdt.o $(obj)fdt_ro.o $(obj)fdt_rw.o $(obj)fdt_strerror.
>  
>  LOGO_H	= $(OBJTREE)/include/bmp_logo.h
>  
> +ifeq ($(LOGO),palfin)
> +LOGO_BMP= logos/linux_logo_ttcontrol_palfin.bmp
> +else
> +ifeq ($(LOGO),ttcontrol)
> +LOGO_BMP= logos/linux_logo_ttcontrol.bmp
> +else
> +ifeq ($(LOGO),patria)
> +LOGO_BMP= logos/linux_logo_ttcontrol_patria.bmp
> +else
> +ifeq ($(LOGO),eaton)
> +LOGO_BMP= logos/linux_logo_ttcontrol_eaton.bmp
> +else
> +ifeq ($(LOGO),void)
> +LOGO_BMP= logos/linux_logo_void.bmp
> +endif
> +endif
> +endif
> +endif
> +endif

Do we really need such a compelx construct here?

Best regards,

Wolfgang Denk

-- 
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
The one who says it cannot be done should never interrupt the one who
is doing it.




More information about the U-Boot mailing list