[U-Boot-Users] [PATCH 2/4] TQM885D: adjust for doubled flash sector size + some minor fixes

Wolfgang Denk wd at denx.de
Mon Jul 30 17:42:08 CEST 2007


In message <20070724085839.20151.56293.stgit at tq-sewsrv-4.tq-net.de> you wrote:
> 
> diff --git a/include/common.h b/include/common.h
...
> --- a/include/common.h
> +++ b/include/common.h
> @@ -126,20 +126,21 @@ typedef void (interrupt_handler_t)(void *);
>  
>  /*
>   * enable common handling for all TQM8xxL/M boards:
> - * - CONFIG_TQM8xxM will be defined for all TQM8xxM and TQM885D boards
> + * - CONFIG_TQM8xxM will be defined for all TQM8xxM

... boards

>   * - CONFIG_TQM8xxL will be defined for all TQM8xxL _and_ TQM8xxM boards
> + *                  and for the TQM885D board
>   */
>  #if defined(CONFIG_TQM823M) || defined(CONFIG_TQM850M) || \
>      defined(CONFIG_TQM855M) || defined(CONFIG_TQM860M) || \
> -    defined(CONFIG_TQM862M) || defined(CONFIG_TQM866M) || \
> -    defined(CONFIG_TQM885D)
> +    defined(CONFIG_TQM862M) || defined(CONFIG_TQM866M)

Please keep lists sorted, i. e. TQM885 sorts after all others.

> diff --git a/include/commproc.h b/include/commproc.h
> index 12400e3..8cb2986 100644
> --- a/include/commproc.h
> +++ b/include/commproc.h
> @@ -1440,10 +1440,6 @@ typedef struct scc_enet {
>  #define SICR_ENET_MASK	((uint)0x0000ff00)
>  #define SICR_ENET_CLKRT	((uint)0x00002600)
>  
> -# ifdef CONFIG_FEC_ENET		/* Use FEC for Fast Ethernet */
> -#define FEC_ENET
> -# endif	/* CONFIG_FEC_ENET */
> -
>  #endif	/* CONFIG_MVS v1, CONFIG_TQM823L/M, CONFIG_TQM850L/M, etc. */

I think this will break a couple of boards...

> +	"ramdisk_addr=401C0000\0"					\
> +	"load=tftp 200000 ${u-boot}\0"					\
> +	"update=protect off 40000000 4003FFFF;"				\
> +		"erase 40000000 4003FFFF;"				\

I recommend to use "protect off 40000000 +${filesize}" and
"erase 40000000 +${filesize}" instead.

>  #define CFG_FLASH_BASE		0x40000000
> -#define CFG_MONITOR_LEN		(256 << 10)	/* Reserve 256 kB for Monitor	*/
> +#define CFG_MONITOR_LEN		(256 << 10)	/* Reserve 256 kB for Monitor */
>  #define CFG_MONITOR_BASE	CFG_FLASH_BASE
> -#define CFG_MALLOC_LEN		(128 << 10)	/* Reserve 128 kB for malloc()	*/
> +#define CFG_MALLOC_LEN		(256 << 10)	/* Reserve 128 kB for malloc() */

Why do you destroy the nice alignement of the closing comments? Don't
do that.

>  /*
>   * For booting Linux, the board info and command line data
> @@ -239,9 +244,9 @@
>  #define CFG_FLASH_WRITE_TOUT	500	/* Timeout for Flash Write (in ms)	*/
>  
>  #define CFG_ENV_IS_IN_FLASH	1
> -#define CFG_ENV_OFFSET		0x40000 /*   Offset   of Environment Sector	*/
> -#define CFG_ENV_SIZE		0x08000 /* Total Size of Environment Sector	*/
> -#define CFG_ENV_SECT_SIZE	0x20000 /* Total Size of Environment Sector	*/
> +#define CFG_ENV_OFFSET		0x40000 /* Offset of Environment Sector */
> +#define CFG_ENV_SIZE		0x08000 /* Total Size of Environment */
> +#define CFG_ENV_SECT_SIZE	0x40000 /* Total Size of Environment Sector */

Again, why such reformatting which makes things only worse?

>  /* Address and size of Redundant Environment Sector	*/
>  #define CFG_ENV_OFFSET_REDUND	(CFG_ENV_OFFSET+CFG_ENV_SECT_SIZE)
> @@ -475,6 +480,7 @@
>   */
>  #define CONFIG_SCC2_ENET		/* enable ethernet on SCC2 */
>  #define CONFIG_FEC_ENET			/* enable ethernet on FEC */
> +#define FEC_ENET			/* enable the FEC driver */

This is not a good  idea.  You  should  only  use  CFG_  and  CONFIG_
#defines  in  your  board  config file. Please don;t mess around with
internal definitions (even if other boards do this as well).

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
Es ist offensichtlich, dass das menschliche Gehirn wie  ein  Computer
funktioniert.  Da  es  keine  dummen Computer gibt, gibt es also auch
keine dummen Menschen. Nur ein paar Leute, die unter DOS laufen.
                                                       -- <unbekannt>




More information about the U-Boot mailing list