From patchwork Sun Sep 11 16:10:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jit Loon Lim X-Patchwork-Id: 1676546 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=I2jsnTPU; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MQZVy1hTKz1ync for ; Mon, 12 Sep 2022 02:12:10 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6C99684B9F; Sun, 11 Sep 2022 18:11:21 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="I2jsnTPU"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4E2C28495B; Sun, 11 Sep 2022 18:11:01 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 4FFAD84B7A for ; Sun, 11 Sep 2022 18:10:57 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=jitloonl@ecsmtp.png.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1662912657; x=1694448657; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=tHtEMfx+EfPmKYmaGJtt4XunZNCN3xVizFDPp6FTzc4=; b=I2jsnTPUIcz3MoR49ch/iKgLzYjvSO/w/2VzE3EzLQv2vW7CBJD2I5G5 ehqPk1Te+iKiL2TNEtTsb5znu3ZsQYH25BTwwK9eRKI5546kntJLJmmze Y6wPZLls1odIsMRASsrdp7P/dqW6LthEqgIJiX4g8n3vsy9w4v9ND8apU BKCXW7HdStIp/pysYaLCCtNylmTnuOW7SeOMidHL+tYeoih+0gI2i01FK XeEOLEvauHyBtvuogjtXp1o2qIrvOWYzi7LcvGzlruv2+P+JOQ9B5Y/dT gY+akzHS4cInzjJM/v+DMNgoWhh0SKz40wgauEq2rFyZkMcm2qiKkAzjQ g==; X-IronPort-AV: E=McAfee;i="6500,9779,10467"; a="361687731" X-IronPort-AV: E=Sophos;i="5.93,307,1654585200"; d="scan'208";a="361687731" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Sep 2022 09:10:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,307,1654585200"; d="scan'208";a="615816492" Received: from pglmail07.png.intel.com ([10.221.193.207]) by orsmga002.jf.intel.com with ESMTP; 11 Sep 2022 09:10:49 -0700 Received: from localhost (pgli0028.png.intel.com [10.221.84.177]) by pglmail07.png.intel.com (Postfix) with ESMTP id 19C9132FB; Mon, 12 Sep 2022 00:10:49 +0800 (+08) Received: by localhost (Postfix, from userid 12048045) id 17D02E00414; Mon, 12 Sep 2022 00:10:49 +0800 (+08) From: Jit Loon Lim To: u-boot@lists.denx.de Cc: Jagan Teki , Vignesh R , Marek , Simon , Tien Fong , Kok Kiang , Siew Chin , Sin Hui , Raaj , Dinesh , Boon Khai , Alif , Teik Heng , Hazim , Jit Loon Lim , Sieu Mun Tang , Ley Foon Tan , Radu Bacrau Subject: [PATCH 8/8] drivers: mtd: nand: HSD #1508104447-13: mtd: nand: raw: denali: Wait for reset completion status Date: Mon, 12 Sep 2022 00:10:32 +0800 Message-Id: <20220911161032.23861-8-jit.loon.lim@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20220911161032.23861-1-jit.loon.lim@intel.com> References: <20220911161032.23861-1-jit.loon.lim@intel.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean From: Ley Foon Tan Fixed delay 200us is not working in certain platform. Change to poll for reset completion status to have more reliable reset process. Controller will set the rst_comp bit in intr_status register after controller has completed its reset and initialization process. Signed-off-by: Radu Bacrau Signed-off-by: Ley Foon Tan Signed-off-by: Jit Loon Lim --- drivers/mtd/nand/raw/denali_dt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/nand/raw/denali_dt.c b/drivers/mtd/nand/raw/denali_dt.c index cf4df0168a..5a4c11e159 100644 --- a/drivers/mtd/nand/raw/denali_dt.c +++ b/drivers/mtd/nand/raw/denali_dt.c @@ -154,8 +154,8 @@ static int denali_dt_probe(struct udevice *dev) /* * When the reset is deasserted, the initialization sequence is - * kicked (bootstrap process). The driver must wait until it is - * finished. Otherwise, it will result in unpredictable behavior. + * kicked. The driver must wait until it is finished. Otherwise, + * it will result in unpredictable behavior. */ ret = denali_wait_reset_complete(denali); if (ret) {