Commit 8c25cf5e authored by Sergei Poselenov's avatar Sergei Poselenov

RT #72064. Adedd support for the flash-based environment.

parent d644116b
......@@ -984,6 +984,13 @@ int flash_erase (flash_info_t * info, int s_first, int s_last)
flash_unlock_seq (info, sect);
flash_write_cmd (info, sect, 0,
AMD_CMD_ERASE_SECTOR);
/* Wait before checking the status.
* This is added after the similar delay in
* linux/drivers/mtd/chips/cfi_cmdset_0002.c:do_erase_oneblock().
* FIXME: why erase_blk_tout is so big, vs to
* the value in the Linux mtd driver?
*/
udelay(500000);
break;
#ifdef CONFIG_FLASH_CFI_LEGACY
case CFI_CMDSET_AMD_LEGACY:
......
......@@ -150,8 +150,11 @@
/*
* Store env in memory only
*/
#define CONFIG_ENV_IS_NOWHERE
#define CONFIG_ENV_IS_IN_FLASH
#define CONFIG_ENV_SIZE (4 * 1024)
#define CONFIG_ENV_ADDR CONFIG_SYS_FLASH_BANK1_BASE
#define CONFIG_INFERNO 1
#define CONFIG_ENV_OVERWRITE 1
#define CONFIG_ENV_OVERWRITE 1
/*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment