Change CFG_ENV_SIZE to CFG_ENV_SECT_SIZE for SPI sector erase
authorTsiChung Liew <Tsi-Chung.Liew@freescale.com>
Thu, 7 Aug 2008 00:37:17 +0000 (19:37 -0500)
committerJohn Rigby <jrigby@freescale.com>
Thu, 14 Aug 2008 18:31:56 +0000 (12:31 -0600)
commit07efc9e321619c3dec213310c32e011aa6f02783
tree076d8858958bd9e1a0ca6ca8294ce8e0a4dcffc4
parent4cb4e654cafabaa1ac180d37b00c8f6095dae9c9
Change CFG_ENV_SIZE to CFG_ENV_SECT_SIZE for SPI sector erase

The CFG_ENV_SIZE is not suitable used for SPI flash erase
sector size if CFG_ENV_SIZE is less than CFG_ENV_SECT_SIZE.
Add condition check if CFG_ENV_SIZE is larger than
CFG_ENV_SECT_SIZE, calculate the right number of sectors for
erasing.

Signed-off-by: TsiChung Liew <Tsi-Chung.Liew@freescale.com>
common/env_sf.c