From patchwork Thu Feb 22 13:33:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miquel Raynal X-Patchwork-Id: 876705 X-Patchwork-Delegate: jagannadh.teki@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3znG1H6pndz9s5R for ; Fri, 23 Feb 2018 00:49:23 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 98F7EC21F9A; Thu, 22 Feb 2018 13:39:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 6294BC21E68; Thu, 22 Feb 2018 13:34:59 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id E6721C21F59; Thu, 22 Feb 2018 13:34:13 +0000 (UTC) Received: from mail.free-electrons.com (mail.free-electrons.com [62.4.15.54]) by lists.denx.de (Postfix) with ESMTP id 5F200C21F21 for ; Thu, 22 Feb 2018 13:34:13 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 110) id 7B5F4207C1; Thu, 22 Feb 2018 14:34:12 +0100 (CET) Received: from localhost.localdomain (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.free-electrons.com (Postfix) with ESMTPSA id 9DE27207D7; Thu, 22 Feb 2018 14:33:53 +0100 (CET) From: Miquel Raynal To: Albert Aribaud , Jagan Teki , Maxime Ripard , Hans de Goede , FUKAUMI Naoki , Scott Wood Date: Thu, 22 Feb 2018 14:33:37 +0100 Message-Id: <20180222133350.8033-8-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180222133350.8033-1-miquel.raynal@bootlin.com> References: <20180222133350.8033-1-miquel.raynal@bootlin.com> Cc: u-boot@lists.denx.de Subject: [U-Boot] [PATCH v2 07/20] spl: nand: sunxi: add missing status clear X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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" It is best practice to always clear the status register before executing a command to be sure that the status read afterwards is relevant. Signed-off-by: Miquel Raynal --- drivers/mtd/nand/sunxi_nand_spl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mtd/nand/sunxi_nand_spl.c b/drivers/mtd/nand/sunxi_nand_spl.c index f100eff6ac..e21a102a09 100644 --- a/drivers/mtd/nand/sunxi_nand_spl.c +++ b/drivers/mtd/nand/sunxi_nand_spl.c @@ -245,6 +245,7 @@ static int nand_reset_column(void) (NFC_CMD_RNDOUT << NFC_RANDOM_READ_CMD0_OFFSET) | (NFC_CMD_RNDOUTSTART << NFC_READ_CMD_OFFSET), SUNXI_NFC_BASE + NFC_RCMD_SET); + writel(NFC_ST_CMD_INT_FLAG, SUNXI_NFC_BASE + NFC_ST); writel(0, SUNXI_NFC_BASE + NFC_ADDR_LOW); writel(NFC_SEND_CMD1 | NFC_SEND_CMD2 | NFC_RAW_CMD | (1 << NFC_ADDR_NUM_OFFSET) | NFC_SEND_ADDR | NFC_CMD_RNDOUT,