[U-Boot-Users] FIX: dataflash.c

Wolfgang Denk wd at denx.de
Sun Aug 19 02:50:29 CEST 2007


In message <20070818231206.GA4040 at gandalf.sssup.it> you wrote:
> Change in dataflash.c for fixing
> 
> Signed-off-by: Trimarchi Michael <trimarchimichael at yahoo.it>
> 
> ---
> 
> --- drivers/dataflash.c.orig	2007-08-18 17:36:08.000000000 +0200
> +++ drivers/dataflash.c	2007-08-18 17:37:05.000000000 +0200
> @@ -27,16 +27,16 @@ AT91S_DATAFLASH_INFO dataflash_info[CFG_
>  static AT91S_DataFlash DataFlashInst;
>  
>  #ifdef CONFIG_AT91SAM9260EK
> -int cs[][CFG_MAX_DATAFLASH_BANKS] = {
> +int cs[][2] = {
>  	{CFG_DATAFLASH_LOGIC_ADDR_CS0, 0},	/* Logical adress, CS */
>  	{CFG_DATAFLASH_LOGIC_ADDR_CS1, 1}
>  };
>  #elif defined(CONFIG_AT91SAM9263EK)
> -int cs[][CFG_MAX_DATAFLASH_BANKS] = {
> +int cs[][2] = {
>  	{CFG_DATAFLASH_LOGIC_ADDR_CS0, 0}	/* Logical adress, CS */
>  };
>  #else
> -int cs[][CFG_MAX_DATAFLASH_BANKS] = {
> +int cs[][2] = {
>  	{CFG_DATAFLASH_LOGIC_ADDR_CS0, 0},	/* Logical adress, CS */
>  	{CFG_DATAFLASH_LOGIC_ADDR_CS3, 3}
>  };

I hereby reject this patch.

Replacing a configuration option by a hardwired constant which is
probably wrong on most of the boards is definitely a Bad Thing.

Also, you did not even mention what sort of problem you are trying to
fix.

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
There is an order of things in this universe.
	-- Apollo, "Who Mourns for Adonais?" stardate 3468.1




More information about the U-Boot mailing list