From patchwork Fri Sep 13 17:45:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Chan X-Patchwork-Id: 13803894 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 08334FC616A for ; Fri, 13 Sep 2024 17:47:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=KMmVvlnDTI/iTSI2Zh5vhwF1oFsJYU1HFV/JLiFZUNw=; b=oFDrUBBRh7QwTrwp3a+GBOP8vL nbxAhky4XFnwSgdt83fnE07qtKqq4cxVVEgZ+lQwRROcAvbfQqqIu4h4/Yj2QuMQGDTGXmx9pvel8 9KtimK20xCJVct+acJgBaQPR1ZV+UqYkmppT+DZnW8Qz5Xr0Ipici6MFThHZ/HAqobf8rHMDQdJFe VVdyRDz015nHefDBsZtgZNJGHpUxukGAn9dAHKBuXnHCZUN/uSTi9q2d3Pks6NcMYGRKwLkUTOZCO u7Nb2BG/ezBwD5GT8B23rwgP/4kUGV1iAkqHemGePRTlbClna6G+1NtnEehXyoOCTldqzdh+/oSRE 77F9LIuQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1spANx-0000000Ghp0-48KX; Fri, 13 Sep 2024 17:47:10 +0000 Received: from mail-pl1-x633.google.com ([2607:f8b0:4864:20::633]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1spAMt-0000000Ghj7-2GRC for linux-arm-kernel@lists.infradead.org; Fri, 13 Sep 2024 17:46:04 +0000 Received: by mail-pl1-x633.google.com with SMTP id d9443c01a7336-207115e3056so23833605ad.2 for ; Fri, 13 Sep 2024 10:46:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1726249562; x=1726854362; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=KMmVvlnDTI/iTSI2Zh5vhwF1oFsJYU1HFV/JLiFZUNw=; b=R/T/y5kGeapPT87a2jgXZQy5M5sMhHqq+OZ73kLaVP3ug+XpG568z59rTefAZ2XF/k h/PLmjc9xGPsJBdFjE8qEjQJXKjtTSK96V0cNt42qaiAQqWyyMTOSOZdECqn1gSVE/93 emyhDQWVAWYBg1suEQV8PJeSaVWm/H7h1SrPo//5cj1tP9oxRcThnVsLTXyzRxsS5m+n EgttqTSkujrpHkdu/wEmfFO//s28EVaO14WfMpG9YTro4BPtzfM6N3d95PHc4xS6pE03 Duq+t8OUFWdBhYj1ea9qDTUqmocvCGninQWQwWiac+IU+TG+UVxgD6skF4OeGu5fpfvd fEeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726249562; x=1726854362; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=KMmVvlnDTI/iTSI2Zh5vhwF1oFsJYU1HFV/JLiFZUNw=; b=lTzsaX2VQNyTqWFGMKy7M87qXiIcBhmauLYpL5eJ3eIIoR7d9S56QHZvf/7vYzOeFw kaIA+Ky/8sg6Tz2nlbrU/E/BYQAb7ExqzwTZCnllFn4mncnbD/Ol16opLZqtwQT8zC3M 7VBbZHp3QFnrPALyj0hnVItz3fc1OY6/WO109HOp/8l8QTkMNRYn7h+6CLyZpnsULimz ifVs7nGX4Bm9vk1JegIjiOV2SuS18wQPyV2KQrj3JR1WMXTyRwX6Ap8k1J7uxFSfY5c/ 9GURe2prg/sW7E/jBu4rwmf1CVlqgEAP7kGTQoePeJPucYUlv2823whl0SaMpUUZW+R0 SBsQ== X-Forwarded-Encrypted: i=1; AJvYcCVKKp23seDm0feNcjJomPQ7MLgRo1bA6FpOPO7dK0Rwa/u+iadbwhDaWhcWRaixcpYaUXhafmVIxBPYNe13wgQS@lists.infradead.org X-Gm-Message-State: AOJu0YxPmoxpGpUeotPBE+Js6SdKiVn0eKF38eOYp1BipiaFhnhny7Xw hU6ipurgRhaySvxKgZ5WmKU9juikxZdcpp46mZjOStep1m8zL+/m X-Google-Smtp-Source: AGHT+IGQ8EysGx88b1xm+qR1UoKo/PQr2FXhFG58fEJbseDMvs0OFF/hkxWoZMnNYF7N3WdCAQ4J9g== X-Received: by 2002:a17:902:b48f:b0:1fc:57b7:995c with SMTP id d9443c01a7336-2076e36cc53mr87095525ad.7.1726249561902; Fri, 13 Sep 2024 10:46:01 -0700 (PDT) Received: from localhost.localdomain ([59.188.211.160]) by smtp.googlemail.com with ESMTPSA id d9443c01a7336-2076afdd667sm30300465ad.140.2024.09.13.10.45.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Sep 2024 10:46:01 -0700 (PDT) From: Nick Chan To: Hector Martin , Sven Peter , Alyssa Rosenzweig , Wim Van Sebroeck , Guenter Roeck , asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Nick Chan Subject: [PATCH] watchdog: apple: Increase reset delay to 150ms Date: Sat, 14 Sep 2024 01:45:05 +0800 Message-ID: <20240913174540.45551-1-towinchenmi@gmail.com> X-Mailer: git-send-email 2.46.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240913_104603_603053_5E5E8F72 X-CRM114-Status: GOOD ( 13.10 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The Apple A8X SoC seems to be slowest at resetting, taking up to around 125ms to reset. Wait 150ms to be safe here. Signed-off-by: Nick Chan Reviewed-by: Guenter Roeck Reviewed-by: Sven Peter --- drivers/watchdog/apple_wdt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) base-commit: 5acd9952f95fb4b7da6d09a3be39195a80845eb6 diff --git a/drivers/watchdog/apple_wdt.c b/drivers/watchdog/apple_wdt.c index d4f739932f0b..353ecf0b04dc 100644 --- a/drivers/watchdog/apple_wdt.c +++ b/drivers/watchdog/apple_wdt.c @@ -127,11 +127,11 @@ static int apple_wdt_restart(struct watchdog_device *wdd, unsigned long mode, /* * Flush writes and then wait for the SoC to reset. Even though the * reset is queued almost immediately experiments have shown that it - * can take up to ~20-25ms until the SoC is actually reset. Just wait - * 50ms here to be safe. + * can take up to ~120-125ms until the SoC is actually reset. Just + * wait 150ms here to be safe. */ (void)readl_relaxed(wdt->regs + APPLE_WDT_WD1_CUR_TIME); - mdelay(50); + mdelay(150); return 0; }