mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2026-02-20 19:32:37 +01:00
ARM: env_nand: Updated env to use complete partition
nand env size was restricted to 256KB out of the available 512KB to keep it compatible with kernel. When a badblock is introduced, env fails to save due to the restricted range. With this patch, it can now use upto the end of partition upon skipping any badblocks but only saving 256KB. Change-Id: I27f6932fe537fa4c63d890bfe583c48e45fe156b Signed-off-by: Gokul Sriram Palanisamy <gokulsri@codeaurora.org>
This commit is contained in:
parent
b77ce142bb
commit
8a3c619b47
1 changed files with 2 additions and 2 deletions
|
|
@ -128,7 +128,7 @@ int nand_env_init(void)
|
|||
*/
|
||||
static int writeenv(size_t offset, u_char *buf)
|
||||
{
|
||||
size_t end = offset + CONFIG_ENV_RANGE;
|
||||
size_t end = offset + board_env_size;
|
||||
size_t amount_saved = 0;
|
||||
size_t blocksize, len;
|
||||
u_char *char_ptr;
|
||||
|
|
@ -243,7 +243,7 @@ static int readenv(size_t offset, u_char *buf)
|
|||
#else
|
||||
static int readenv(size_t offset, u_char *buf)
|
||||
{
|
||||
size_t end = offset + CONFIG_ENV_RANGE;
|
||||
size_t end = offset + board_env_size;
|
||||
size_t amount_loaded = 0;
|
||||
size_t blocksize, len;
|
||||
u_char *char_ptr;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue