From patchwork Fri May 8 17:07:07 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Agner X-Patchwork-Id: 470103 X-Patchwork-Delegate: scottwood@freescale.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 3C12B140283 for ; Sat, 9 May 2015 03:07:38 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=agner.ch header.i=@agner.ch header.b=z3VA0GVY; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B0EDA4B676; Fri, 8 May 2015 19:07:31 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qdcjASKE8S9L; Fri, 8 May 2015 19:07:31 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 282B84B652; Fri, 8 May 2015 19:07:26 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7A5624B617 for ; Fri, 8 May 2015 19:07:20 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rQITNKy3or-m for ; Fri, 8 May 2015 19:07:20 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail.kmu-office.ch (mail.kmu-office.ch [178.209.48.109]) by theia.denx.de (Postfix) with ESMTP id 34FBD4B616 for ; Fri, 8 May 2015 19:07:17 +0200 (CEST) Received: from trochilidae.toradex.int (195-226-23-137.pool.cyberlink.ch [195.226.23.137]) by mail.kmu-office.ch (Postfix) with ESMTPSA id 1F66F5C0D4B; Fri, 8 May 2015 19:05:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=agner.ch; s=dkim; t=1431104741; bh=GnauTfyfL83Gfcv0zmXZypwnTUOeruW7BC6qRwUc8So=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=z3VA0GVYO0bcTXQkF3BzLyqBk8cSNvMDIZww0iPELSvoHQXx4+AHF5C5EcPJ41uo/ 2A8Fl12C95MMKiWZJB0FsGry2mxy7G9MqWzV2qtirshDpa4Kxhz7fNGQvhAEjXm21t +JDLMU22kK1FG2Rl3gkjSl1u5pIifQp4FVNSRqPw= From: Stefan Agner To: scottwood@freescale.com, trini@konsulko.com Date: Fri, 8 May 2015 19:07:07 +0200 Message-Id: <1431104833-9731-3-git-send-email-stefan@agner.ch> X-Mailer: git-send-email 2.3.7 In-Reply-To: <1431104833-9731-1-git-send-email-stefan@agner.ch> References: <1431104833-9731-1-git-send-email-stefan@agner.ch> Cc: u-boot@lists.denx.de, bpringlemeir@gmail.com Subject: [U-Boot] [PATCH v3 2/8] mtd: vf610_nfc: remove read on SEQIN X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" 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: Stefan Agner --- drivers/mtd/nand/vf610_nfc.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/mtd/nand/vf610_nfc.c b/drivers/mtd/nand/vf610_nfc.c index fa0bb9d..66b335d 100644 --- a/drivers/mtd/nand/vf610_nfc.c +++ b/drivers/mtd/nand/vf610_nfc.c @@ -345,24 +345,26 @@ static void vf610_nfc_command(struct mtd_info *mtd, unsigned command, nfc->alt_buf = 0; 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: vf610_nfc_transfer_size(nfc->regs, nfc->page_sz); vf610_nfc_send_commands(nfc->regs, NAND_CMD_SEQIN, command, PROGRAM_PAGE_CMD_CODE); - vf610_nfc_addr_cycle(mtd, column, page); break; case NAND_CMD_RESET: vf610_nfc_transfer_size(nfc->regs, 0); vf610_nfc_send_command(nfc->regs, command, RESET_CMD_CODE); break; - /* - * NFC does not support sub-page reads and writes, - * so emulate them using full page transfers. - */ case NAND_CMD_READOOB: nfc->spareonly = 1; - case NAND_CMD_SEQIN: /* Pre-read for partial writes. */ case NAND_CMD_READ0: column = 0; vf610_nfc_transfer_size(nfc->regs, nfc->page_sz);