Skip to content
Snippets Groups Projects
Commit 6fcfd1e8 authored by Stefan Agner's avatar Stefan Agner Committed by Scott Wood
Browse files

mtd: vf610_nfc: remove read on SEQIN


Since we do not support sub-page writes anyway, reading the page
back to the controller on SEQIN command is not required. Remove
the page read on SEQIN.

However, the column/page values relevant to the SEQIN command, hence
set the column/row address on SEQIN command.

Signed-off-by: default avatarStefan Agner <stefan@agner.ch>
parent f55bc296
No related branches found
No related tags found
No related merge requests found
...@@ -345,24 +345,26 @@ static void vf610_nfc_command(struct mtd_info *mtd, unsigned command, ...@@ -345,24 +345,26 @@ static void vf610_nfc_command(struct mtd_info *mtd, unsigned command,
nfc->alt_buf = 0; nfc->alt_buf = 0;
switch (command) { switch (command) {
case NAND_CMD_SEQIN:
/* Use valid column/page from preread... */
vf610_nfc_addr_cycle(mtd, column, page);
/*
* SEQIN => data => PAGEPROG sequence is done by the controller
* hence we do not need to issue the command here...
*/
return;
case NAND_CMD_PAGEPROG: case NAND_CMD_PAGEPROG:
vf610_nfc_transfer_size(nfc->regs, nfc->page_sz); vf610_nfc_transfer_size(nfc->regs, nfc->page_sz);
vf610_nfc_send_commands(nfc->regs, NAND_CMD_SEQIN, vf610_nfc_send_commands(nfc->regs, NAND_CMD_SEQIN,
command, PROGRAM_PAGE_CMD_CODE); command, PROGRAM_PAGE_CMD_CODE);
vf610_nfc_addr_cycle(mtd, column, page);
break; break;
case NAND_CMD_RESET: case NAND_CMD_RESET:
vf610_nfc_transfer_size(nfc->regs, 0); vf610_nfc_transfer_size(nfc->regs, 0);
vf610_nfc_send_command(nfc->regs, command, RESET_CMD_CODE); vf610_nfc_send_command(nfc->regs, command, RESET_CMD_CODE);
break; break;
/*
* NFC does not support sub-page reads and writes,
* so emulate them using full page transfers.
*/
case NAND_CMD_READOOB: case NAND_CMD_READOOB:
nfc->spareonly = 1; nfc->spareonly = 1;
case NAND_CMD_SEQIN: /* Pre-read for partial writes. */
case NAND_CMD_READ0: case NAND_CMD_READ0:
column = 0; column = 0;
vf610_nfc_transfer_size(nfc->regs, nfc->page_sz); vf610_nfc_transfer_size(nfc->regs, nfc->page_sz);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment