Re: [U-Boot] [PATCH] TI DaVinci: DM365: Minor Updates to DM365 EVM

2009-09-08 Thread Wolfgang Denk
Dear Sandeep,

In message <1252422547-27960-1-git-send-email-s-paul...@ti.com> you wrote:
> From: Sandeep Paulraj 
> 
> The patch does the following
> 1) Gets rid of dependency on asm/sizes.h and replaces references
> to "SZ_xx" with their equivalent values

This is actually a good idea, I think. Yet I have some comments...


> diff --git a/board/davinci/dm365evm/dm365evm.c 
> b/board/davinci/dm365evm/dm365evm.c
> index e30184b..1c88b30 100644
> --- a/board/davinci/dm365evm/dm365evm.c
> +++ b/board/davinci/dm365evm/dm365evm.c
> @@ -17,7 +17,7 @@
>  
>  #include 
>  #include 
> -#include 
> +#include 

This is an unrelated fix, it seems. It should be split into a separate
commit.

> --- a/include/configs/davinci_dm365evm.h
> +++ b/include/configs/davinci_dm365evm.h
...
> @@ -38,7 +37,7 @@
>  /* Memory Info */
>  #define CONFIG_NR_DRAM_BANKS 1
>  #define PHYS_SDRAM_1 0x8000
> -#define PHYS_SDRAM_1_SIZESZ_128M
> +#define PHYS_SDRAM_1_SIZE0x0800

I recommend to use a way to write such constants that can quickly read
(without much thinking) by a huan, for example here:

#define PHYS_SDRAM_1_SIZE   (128 << 20) /* 128 MiB */

Please consider adding a comment as I did to make it even easier to
understand.

> @@ -74,7 +73,6 @@
>  
>  /* NAND: socketed, two chipselects, normally 2 GBytes */
>  #define CONFIG_NAND_DAVINCI
> -#define CONFIG_SYS_NAND_HW_ECC

This is also an unrelated change that should be split into a separate
commit.

> @@ -125,7 +123,7 @@
>  #define CONFIG_SYS_LONGHELP
>  
>  #ifdef CONFIG_NAND_DAVINCI
> -#define CONFIG_ENV_SIZE  SZ_256K
> +#define CONFIG_ENV_SIZE  0x0004

How about:

#define CONFIG_ENV_SIZE (256 << 10) /* 256 KiB */

> @@ -143,8 +141,8 @@
>  #define CONFIG_TIMESTAMP
>  
>  /* U-Boot memory configuration */
> -#define CONFIG_STACKSIZE SZ_256K /* regular stack */
> -#define CONFIG_SYS_MALLOC_LENSZ_1M   /* malloc() arena */
> +#define CONFIG_STACKSIZE 0x0004  /* regular stack */
> +#define CONFIG_SYS_MALLOC_LEN0x0008  /* malloc() 
> arena */

#define CONFIG_STACKSIZE(256 << 10) /* 256 KiB regular 
stack */
#define CONFIG_SYS_MALLOC_LEN   (1 << 20)   /* 1 MiB malloc() arena 
*/

Thanks.

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: w...@denx.de
The optimum committee has no members.
   - Norman Augustine
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] TI DaVinci: DM365: Minor Updates to DM365 EVM

2009-09-08 Thread s-paulraj
From: Sandeep Paulraj 

The patch does the following
1) Gets rid of dependency on asm/sizes.h and replaces references
to "SZ_xx" with their equivalent values
2) Disables EMAC as the EMAC is broken due to recent changes that have been
added to the net driver. Board does not compile with this enabled
Patch to add EMAC will be sent to u-boot-net soon.


Signed-off-by: Sandeep Paulraj 
---
 board/davinci/dm365evm/dm365evm.c  |2 +-
 include/configs/davinci_dm365evm.h |   12 +---
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/board/davinci/dm365evm/dm365evm.c 
b/board/davinci/dm365evm/dm365evm.c
index e30184b..1c88b30 100644
--- a/board/davinci/dm365evm/dm365evm.c
+++ b/board/davinci/dm365evm/dm365evm.c
@@ -17,7 +17,7 @@
 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
diff --git a/include/configs/davinci_dm365evm.h 
b/include/configs/davinci_dm365evm.h
index 47cb554..e74f27a 100644
--- a/include/configs/davinci_dm365evm.h
+++ b/include/configs/davinci_dm365evm.h
@@ -18,7 +18,6 @@
 
 #ifndef __CONFIG_H
 #define __CONFIG_H
-#include 
 
 /* Spectrum Digital TMS320DM365 EVM board */
 #define DAVINCI_DM365EVM
@@ -38,7 +37,7 @@
 /* Memory Info */
 #define CONFIG_NR_DRAM_BANKS   1
 #define PHYS_SDRAM_1   0x8000
-#define PHYS_SDRAM_1_SIZE  SZ_128M
+#define PHYS_SDRAM_1_SIZE  0x0800
 
 /* Serial Driver info: UART0 for console  */
 #define CONFIG_SYS_NS16550
@@ -57,7 +56,7 @@
 #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS  20
 
 /* Network Configuration */
-#define CONFIG_DRIVER_TI_EMAC
+/* NYET: #define CONFIG_DRIVER_TI_EMAC */
 #define CONFIG_MII
 #define CONFIG_BOOTP_DEFAULT
 #define CONFIG_BOOTP_DNS
@@ -74,7 +73,6 @@
 
 /* NAND: socketed, two chipselects, normally 2 GBytes */
 #define CONFIG_NAND_DAVINCI
-#define CONFIG_SYS_NAND_HW_ECC
 #define CONFIG_SYS_NAND_USE_FLASH_BBT
 #define CONFIG_SYS_NAND_4BIT_HW_ECC_OOBFIRST
 #define CONFIG_SYS_NAND_PAGE_2K
@@ -125,7 +123,7 @@
 #define CONFIG_SYS_LONGHELP
 
 #ifdef CONFIG_NAND_DAVINCI
-#define CONFIG_ENV_SIZESZ_256K
+#define CONFIG_ENV_SIZE0x0004
 #define CONFIG_ENV_IS_IN_NAND
 #define CONFIG_ENV_OFFSET  0x3C
 #undef CONFIG_ENV_IS_IN_FLASH
@@ -143,8 +141,8 @@
 #define CONFIG_TIMESTAMP
 
 /* U-Boot memory configuration */
-#define CONFIG_STACKSIZE   SZ_256K /* regular stack */
-#define CONFIG_SYS_MALLOC_LEN  SZ_1M   /* malloc() arena */
+#define CONFIG_STACKSIZE   0x0004  /* regular stack */
+#define CONFIG_SYS_MALLOC_LEN  0x0008  /* malloc() arena */
 #define CONFIG_SYS_GBL_DATA_SIZE   128 /* for initial data */
 #define CONFIG_SYS_MEMTEST_START   0x8700  /* physical address */
 #define CONFIG_SYS_MEMTEST_END 0x8800  /* test 16MB RAM */
-- 
1.6.0.4

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot