Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 310179
b: refs/heads/master
c: 59fdd5b
h: refs/heads/master
i:
  310177: bcdffc9
  310175: ce161ee
v: v3
  • Loading branch information
Prabhakar Kushwaha authored and David Woodhouse committed May 14, 2012
1 parent 4fc2af8 commit b72ac2d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 287558fe0e06a85c32863ec9204ed39fc218c5e3
refs/heads/master: 59fdd5b96aa633ffd40e8ce314f126206dfff86f
22 changes: 16 additions & 6 deletions trunk/drivers/mtd/nand/fsl_ifc_nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -375,21 +375,31 @@ static void fsl_ifc_cmdfunc(struct mtd_info *mtd, unsigned int command,

return;

/* READID must read all 8 possible bytes */
case NAND_CMD_READID:
case NAND_CMD_PARAM: {
int timing = IFC_FIR_OP_RB;
if (command == NAND_CMD_PARAM)
timing = IFC_FIR_OP_RBCD;

out_be32(&ifc->ifc_nand.nand_fir0,
(IFC_FIR_OP_CMD0 << IFC_NAND_FIR0_OP0_SHIFT) |
(IFC_FIR_OP_UA << IFC_NAND_FIR0_OP1_SHIFT) |
(IFC_FIR_OP_RB << IFC_NAND_FIR0_OP2_SHIFT));
(timing << IFC_NAND_FIR0_OP2_SHIFT));
out_be32(&ifc->ifc_nand.nand_fcr0,
NAND_CMD_READID << IFC_NAND_FCR0_CMD0_SHIFT);
/* 8 bytes for manuf, device and exts */
out_be32(&ifc->ifc_nand.nand_fbcr, 8);
ifc_nand_ctrl->read_bytes = 8;
command << IFC_NAND_FCR0_CMD0_SHIFT);
out_be32(&ifc->ifc_nand.row3, column);

/*
* although currently it's 8 bytes for READID, we always read
* the maximum 256 bytes(for PARAM)
*/
out_be32(&ifc->ifc_nand.nand_fbcr, 256);
ifc_nand_ctrl->read_bytes = 256;

set_addr(mtd, 0, 0, 0);
fsl_ifc_run_command(mtd);
return;
}

/* ERASE1 stores the block and page address */
case NAND_CMD_ERASE1:
Expand Down

0 comments on commit b72ac2d

Please sign in to comment.