Loading u-boot-tree/drivers/mtd/nand/zynq_nand.c +14 −4 Original line number Diff line number Diff line Loading @@ -279,6 +279,7 @@ static int zynq_nand_init_nand_flash(int option) status = zynq_nand_waitfor_ecc_completion(); if (status < 0) { printf("%s: Timeout\n", __func__); udelay(100); return status; } Loading Loading @@ -776,6 +777,9 @@ static void zynq_nand_cmd_function(struct mtd_info *mtd, unsigned int command, unsigned long end_cmd_valid = 0; unsigned long i; /* Wait max 10 time units */ int timeout = 10; //printf(" zynq_nand(): Command=0x%02x Column=0x%02x PageAddr=0x%08x\n",command,column,page_addr); xnand = (struct zynq_nand_info *)chip->priv; Loading Loading @@ -896,8 +900,14 @@ static void zynq_nand_cmd_function(struct mtd_info *mtd, unsigned int command, (command == NAND_CMD_RESET) || (command == NAND_CMD_PARAM) || (command == NAND_CMD_GET_FEATURES)) { while (!chip->dev_ready(mtd)) ; while (!chip->dev_ready(mtd)){ if (timeout==0) { printf("ERROR: nand flash command timeout\n"); break; } timeout--; udelay(10); } return; } } Loading Loading
u-boot-tree/drivers/mtd/nand/zynq_nand.c +14 −4 Original line number Diff line number Diff line Loading @@ -279,6 +279,7 @@ static int zynq_nand_init_nand_flash(int option) status = zynq_nand_waitfor_ecc_completion(); if (status < 0) { printf("%s: Timeout\n", __func__); udelay(100); return status; } Loading Loading @@ -776,6 +777,9 @@ static void zynq_nand_cmd_function(struct mtd_info *mtd, unsigned int command, unsigned long end_cmd_valid = 0; unsigned long i; /* Wait max 10 time units */ int timeout = 10; //printf(" zynq_nand(): Command=0x%02x Column=0x%02x PageAddr=0x%08x\n",command,column,page_addr); xnand = (struct zynq_nand_info *)chip->priv; Loading Loading @@ -896,8 +900,14 @@ static void zynq_nand_cmd_function(struct mtd_info *mtd, unsigned int command, (command == NAND_CMD_RESET) || (command == NAND_CMD_PARAM) || (command == NAND_CMD_GET_FEATURES)) { while (!chip->dev_ready(mtd)) ; while (!chip->dev_ready(mtd)){ if (timeout==0) { printf("ERROR: nand flash command timeout\n"); break; } timeout--; udelay(10); } return; } } Loading