summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2012-02-11 22:16:50 +0100
committerWolfgang Denk <wd@denx.de>2012-02-11 22:16:50 +0100
commite3b36210224f07cc798fef15e83db3500529c7bb (patch)
tree6972f544fe05a5ec6f80b0931bc244cda75b0bcb
parentf57a94c2b566a647003c7885a450ba0f28dbff34 (diff)
parent7100a54604442176dc1785a7644f3df8c85d6c55 (diff)
downloadu-boot-imx-e3b36210224f07cc798fef15e83db3500529c7bb.zip
u-boot-imx-e3b36210224f07cc798fef15e83db3500529c7bb.tar.gz
u-boot-imx-e3b36210224f07cc798fef15e83db3500529c7bb.tar.bz2
Merge branch 'master' of /home/wd/git/u-boot/custodians
* 'master' of /home/wd/git/u-boot/custodians: add STM29F400BB to table of supported legacy flashs * Fix: watchdog timed out, if flash blank (0xFF) blocks
-rw-r--r--drivers/mtd/cfi_flash.c3
-rw-r--r--drivers/mtd/jedec_flash.c20
2 files changed, 23 insertions, 0 deletions
diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c
index 5494bcf..722c3fc 100644
--- a/drivers/mtd/cfi_flash.c
+++ b/drivers/mtd/cfi_flash.c
@@ -40,6 +40,7 @@
#include <asm/byteorder.h>
#include <environment.h>
#include <mtd/cfi_flash.h>
+#include <watchdog.h>
/*
* This file implements a Common Flash Interface (CFI) driver for
@@ -577,6 +578,7 @@ static int flash_status_check (flash_info_t * info, flash_sect_t sector,
reset_timer();
#endif
start = get_timer (0);
+ WATCHDOG_RESET();
while (flash_is_busy (info, sector)) {
if (get_timer (start) > tout) {
printf ("Flash %s timeout at address %lx data %lx\n",
@@ -668,6 +670,7 @@ static int flash_status_poll(flash_info_t *info, void *src, void *dst,
reset_timer();
#endif
start = get_timer(0);
+ WATCHDOG_RESET();
while (1) {
switch (info->portwidth) {
case FLASH_CFI_8BIT:
diff --git a/drivers/mtd/jedec_flash.c b/drivers/mtd/jedec_flash.c
index 36d30c3..2350f36 100644
--- a/drivers/mtd/jedec_flash.c
+++ b/drivers/mtd/jedec_flash.c
@@ -69,6 +69,9 @@
#define SST39SF010A 0x00B5
#define SST39SF020A 0x00B6
+/* STM */
+#define STM29F400BB 0x00D6
+
/* MXIC */
#define MX29LV040 0x004F
@@ -346,6 +349,23 @@ static const struct amd_flash_info jedec_table[] = {
ERASEINFO(0x10000, 15),
}
},
+ {
+ .mfr_id = (u16)STM_MANUFACT,
+ .dev_id = STM29F400BB,
+ .name = "ST Micro M29F400BB",
+ .uaddr = {
+ [1] = MTD_UADDR_0x0555_0x02AA /* x16 */
+ },
+ .DevSize = SIZE_512KiB,
+ .CmdSet = CFI_CMDSET_AMD_LEGACY,
+ .NumEraseRegions = 4,
+ .regions = {
+ ERASEINFO(0x04000, 1),
+ ERASEINFO(0x02000, 2),
+ ERASEINFO(0x08000, 1),
+ ERASEINFO(0x10000, 7),
+ }
+ },
#endif
};