Patchwork [5/5] mtd: nand: pxa3xx: Add support for Read parameter page command

login
register
mail settings
Submitter Ezequiel Garcia
Date May 14, 2013, 11:15 a.m.
Message ID <1368530125-12959-6-git-send-email-elezegarcia@gmail.com>
Download mbox | patch
Permalink /patch/243939/
State Accepted
Commit ce0268f650ad26e103d82ce5a58379737adc2ab9
Headers show

Comments

Ezequiel Garcia - May 14, 2013, 11:15 a.m.
From: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>

This command is required to identify ONFI-compliant devices.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
---
 drivers/mtd/nand/pxa3xx_nand.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

Patch

diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c
index 36780e2..d63d378 100644
--- a/drivers/mtd/nand/pxa3xx_nand.c
+++ b/drivers/mtd/nand/pxa3xx_nand.c
@@ -590,6 +590,16 @@  static int prepare_command_pool(struct pxa3xx_nand_info *info, int command,
 				| addr_cycle;
 		break;
 
+	case NAND_CMD_PARAM:
+		cmd = NAND_CMD_PARAM;
+		info->buf_count = 256;
+		info->ndcb0 |= NDCB0_CMD_TYPE(0)
+				| NDCB0_ADDR_CYC(1)
+				| cmd;
+		info->ndcb1 = (column & 0xFF);
+		info->data_size = 256;
+		break;
+
 	case NAND_CMD_READID:
 		cmd = host->cmdset->read_id;
 		info->buf_count = host->read_id_bytes;