diff mbox

[U-Boot,v2,3/6] sbc8641d: set proper environment sector size.

Message ID 1445114431-9524-4-git-send-email-paul.gortmaker@windriver.com
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Paul Gortmaker Oct. 17, 2015, 8:40 p.m. UTC
When debugging an env fail due to too small a malloc pool, it
was noted that the env write was 256k.  But the device sector
size is 1/2 that, as can be seen from "fli" output:

Bank # 1: CFI conformant flash (16 x 16)  Size: 16 MB in 131 Sectors
  Intel Extended command set, Manufacturer ID: 0x89, Device ID: 0x1888
  Erase timeout: 4096 ms, write timeout: 1 ms
  Buffer write timeout: 2 ms, buffer size: 64 bytes

  Sector Start Addresses:
  FF000000 E RO   FF020000 E RO   FF040000 E RO   FF060000 E RO   FF080000 E RO
  FF0A0000 E RO   FF0C0000 E RO   FF0E0000 E RO   FF100000 E RO   FF120000 E RO
  [...]
  FFF00000   RO   FFF20000   RO   FFF40000   RO   FFF60000   RO   FFF80000   RO
  FFFA0000   RO   FFFC0000   RO   FFFE0000 E RO   FFFE8000   RO   FFFF0000 E RO
  FFFF8000   RO
=>

The desired env sector is FFF40000->FFF60000, or 0x20000 in length,
just after the 256k u-boot image which starts @ FFF00000.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 include/configs/sbc8641d.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Tom Rini Oct. 20, 2015, 12:07 a.m. UTC | #1
On Sat, Oct 17, 2015 at 04:40:28PM -0400, Paul Gortmaker wrote:

> When debugging an env fail due to too small a malloc pool, it
> was noted that the env write was 256k.  But the device sector
> size is 1/2 that, as can be seen from "fli" output:
> 
> Bank # 1: CFI conformant flash (16 x 16)  Size: 16 MB in 131 Sectors
>   Intel Extended command set, Manufacturer ID: 0x89, Device ID: 0x1888
>   Erase timeout: 4096 ms, write timeout: 1 ms
>   Buffer write timeout: 2 ms, buffer size: 64 bytes
> 
>   Sector Start Addresses:
>   FF000000 E RO   FF020000 E RO   FF040000 E RO   FF060000 E RO   FF080000 E RO
>   FF0A0000 E RO   FF0C0000 E RO   FF0E0000 E RO   FF100000 E RO   FF120000 E RO
>   [...]
>   FFF00000   RO   FFF20000   RO   FFF40000   RO   FFF60000   RO   FFF80000   RO
>   FFFA0000   RO   FFFC0000   RO   FFFE0000 E RO   FFFE8000   RO   FFFF0000 E RO
>   FFFF8000   RO
> =>
> 
> The desired env sector is FFF40000->FFF60000, or 0x20000 in length,
> just after the 256k u-boot image which starts @ FFF00000.
> 
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/include/configs/sbc8641d.h b/include/configs/sbc8641d.h
index d248eff42005..9fe90f00ff2a 100644
--- a/include/configs/sbc8641d.h
+++ b/include/configs/sbc8641d.h
@@ -473,7 +473,7 @@ 
  */
 #define CONFIG_ENV_IS_IN_FLASH	1
 #define CONFIG_ENV_ADDR		(CONFIG_SYS_MONITOR_BASE + 0x40000)
-#define CONFIG_ENV_SECT_SIZE	0x40000	/* 256K(one sector) for env */
+#define CONFIG_ENV_SECT_SIZE	0x20000	/* 128k(one sector) for env */
 #define CONFIG_ENV_SIZE		0x2000
 
 #define CONFIG_LOADS_ECHO	1	/* echo on for serial download */