Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5281AC433F5 for ; Thu, 7 Oct 2021 14:17:38 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AC8D2610CC for ; Thu, 7 Oct 2021 14:17:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org AC8D2610CC Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B491B835B6; Thu, 7 Oct 2021 16:14:22 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1633616063; bh=P82tqkLHaGZaDnJIywVHZQhdTABfyLCKXSqrK51dl3Q=; h=From:To:Subject:In-reply-to:Date:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From; b=Aa7CE43GzGEvVscrY4RA0EkGr+OfGbvm/fnomKREDUNF9cWjs0Y7CSC51bG/fdp4/ +q8yv2o4QGG0HplfYqBHwtCdXW/oXPjm/N/i9gPBTWBw7iDVAneq0V8GbxJKAn4qpl 4ta8Y9D11wYJkCR0koQ9z/VKmZOhS9L4bENeIBn+yd/Jw6rRG87UlzDB6EkM7VQbnH hmH7ZLBYiqFeYEPG9aBFZTu7qwNN1jLS3iCAiHp7w26sDfiMx+Gr0JpAUDD3YDUUvZ 5VATsSCUMGRg3SW9XV1LrYwuKMGKKyFmdHnep5goFWD1AB2lTzB+CK5Sz7a8mqcnmS RstjTxjZzQYyQ== Received: by phobos.denx.de (Postfix, from userid 109) id 15463834F4; Thu, 7 Oct 2021 16:13:53 +0200 (CEST) Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.9]) (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 6A1B2835A1 for ; Thu, 7 Oct 2021 16:13:48 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=sbabic@denx.de Received: from frontend02.mail.m-online.net (unknown [192.168.8.183]) by mail-out.m-online.net (Postfix) with ESMTP id 4HQCwr0jmLz1qwdP; Thu, 7 Oct 2021 16:13:48 +0200 (CEST) Received: from localhost (dynscan2.mnet-online.de [192.168.6.68]) by mail.m-online.net (Postfix) with ESMTP id 4HQCwr0MKPz1qqkS; Thu, 7 Oct 2021 16:13:48 +0200 (CEST) X-Amavis-Alert: BAD HEADER SECTION, Missing required header field: "Date" Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan2.mail.m-online.net [192.168.6.68]) (amavisd-new, port 10024) with ESMTP id tpb5KzYuDfK8; Thu, 7 Oct 2021 16:13:47 +0200 (CEST) Received: from papero (host-88-217-136-221.customer.m-online.net [88.217.136.221]) by mail.mnet-online.de (Postfix) with ESMTP; Thu, 7 Oct 2021 16:13:47 +0200 (CEST) From: sbabic@denx.de X-Patchwork-Submitter: Oleksandr Suvorov X-Patchwork-Id: 1531735 X-Patchwork-Delegate: sbabic@denx.de To: Oleksandr Suvorov ,U-Boot@lists.denx.de Subject: [PATCH 1/1] mx7ulp: Update wdog disable sequence In-reply-to: <20210923140116.60318-2-oleksandr.suvorov@foundries.io> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Message-Id: <20211007141353.15463834F4@phobos.denx.de> Date: Thu, 7 Oct 2021 16:13:49 +0200 (CEST) X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean > From: Ye Li > Update the mx7ulp wdog disable sequence to avoid potential reset > issue in unlock or refresh sequence. Both sequence need two words > write to wdog CNT register in 16 bus clocks window, if miss the > window, the write will cause violation in wdog and reset the chip. > Current u-boot code is using writel() function which has a DMB > barrier to order the memory access. The DMB between two words write > may introduce some delay in certain circumstance, causing the wdog > reset due to 16 bus clock window requirement. > Also, WDOG1 might have been enabled already depending on FUSE hence > we need to be as close as possible to its reconfiguration timing > requirement of 128 bus clock limit. > This patch replaces writel() function by __raw_writel() to avoid such > issue, and improve to check if watchdog is already disabled or > unlocked. > Signed-off-by: Ye Li > Co-developed-by: Jorge Ramirez-Ortiz > Signed-off-by: Jorge Ramirez-Ortiz > Co-developed-by: Ricardo Salveti > Signed-off-by: Ricardo Salveti > Signed-off-by: Oleksandr Suvorov Applied to u-boot-imx, master, thanks ! Best regards, Stefano Babic -- ===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de =====================================================================