summaryrefslogtreecommitdiff
path: root/drivers/mtd
diff options
context:
space:
mode:
authorAlbert ARIBAUD <albert.u.boot@aribaud.net>2014-10-11 01:20:30 +0200
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2014-10-11 01:20:30 +0200
commit790af815436bc6a93e4c581840be2419897f23b1 (patch)
tree1ba0aaacad86092aea67d3612ae066b33b117619 /drivers/mtd
parentd0b3723034aa865b8618428739efe1d98b1a2e2b (diff)
parentdb67801bf92f7fae6131dbc0d387131698fb9490 (diff)
downloadu-boot-imx-790af815436bc6a93e4c581840be2419897f23b1.zip
u-boot-imx-790af815436bc6a93e4c581840be2419897f23b1.tar.gz
u-boot-imx-790af815436bc6a93e4c581840be2419897f23b1.tar.bz2
Merge branch 'u-boot/master' into 'u-boot-arm/master'
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/cfi_flash.c2
-rw-r--r--drivers/mtd/nand/denali.c12
2 files changed, 11 insertions, 3 deletions
diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c
index c4b5bc1..9b3175d 100644
--- a/drivers/mtd/cfi_flash.c
+++ b/drivers/mtd/cfi_flash.c
@@ -593,7 +593,7 @@ static int flash_full_status_check (flash_info_t * info, flash_sect_t sector,
case CFI_CMDSET_INTEL_PROG_REGIONS:
case CFI_CMDSET_INTEL_EXTENDED:
case CFI_CMDSET_INTEL_STANDARD:
- if ((retcode != ERR_OK)
+ if ((retcode == ERR_OK)
&& !flash_isequal (info, sector, 0, FLASH_STATUS_DONE)) {
retcode = ERR_INVAL;
printf ("Flash %s error at address %lx\n", prompt,
diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c
index ba3de1a..308b784 100644
--- a/drivers/mtd/nand/denali.c
+++ b/drivers/mtd/nand/denali.c
@@ -1059,9 +1059,8 @@ static void denali_cmdfunc(struct mtd_info *mtd, unsigned int cmd, int col,
addr = MODE_11 | BANK(denali->flash_bank);
index_addr(denali, addr | 0, cmd);
break;
- case NAND_CMD_PARAM:
- clear_interrupts(denali);
case NAND_CMD_READID:
+ case NAND_CMD_PARAM:
reset_buf(denali);
/* sometimes ManufactureId read from register is not right
* e.g. some of Micron MT29F32G08QAA MLC NAND chips
@@ -1070,6 +1069,15 @@ static void denali_cmdfunc(struct mtd_info *mtd, unsigned int cmd, int col,
addr = MODE_11 | BANK(denali->flash_bank);
index_addr(denali, addr | 0, cmd);
index_addr(denali, addr | 1, col & 0xFF);
+ if (cmd == NAND_CMD_PARAM)
+ udelay(50);
+ break;
+ case NAND_CMD_RNDOUT:
+ addr = MODE_11 | BANK(denali->flash_bank);
+ index_addr(denali, addr | 0, cmd);
+ index_addr(denali, addr | 1, col & 0xFF);
+ index_addr(denali, addr | 1, col >> 8);
+ index_addr(denali, addr | 0, NAND_CMD_RNDOUTSTART);
break;
case NAND_CMD_READ0:
case NAND_CMD_SEQIN: