From patchwork Mon Sep 30 06:06:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Chan X-Patchwork-Id: 13815413 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 AC19ECF6491 for ; Mon, 30 Sep 2024 06:09:01 +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=DMwZ52rgNs2z/qva8eWDKf1Jz818c0mIJR5j/Mc97DA=; b=f+81JKFEA7SmlC5UltP4/rS9kA 1wP+t8orpDrvHi7D6l+4rrhNarrBZ/7GqmrnMVAQMvhbZ2Yvi5EWDAbrAxGm9ZNB/0GADifAxrrjq ivRvTfzGEYqygvnslW9w1qIkeKabvxC0Dm72zIV+FVPVcoLaZgtWlmvx0+EitSG4pzUMl+oLTEOpl ZgM2H+Ikh1CpXcIT8Xv/GXaMey0egiyrMfH0QwsWCOXN0D3g+01wgmRYmHbPNZpVjQXtM0BFmyV0x xnDKxmLsVEajwa+w4uuNfNWdN/HXjcDhS+NS1ZLHtSgwXXCqqhf+vOJxwzEhxxhFLwwhZsn7+bjLU Ar8+4Dpw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1sv9aS-0000000G2H3-1gZo; Mon, 30 Sep 2024 06:08:48 +0000 Received: from mail-pg1-x52a.google.com ([2607:f8b0:4864:20::52a]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1sv9ZF-0000000G2Cd-1cLi for linux-arm-kernel@lists.infradead.org; Mon, 30 Sep 2024 06:07:34 +0000 Received: by mail-pg1-x52a.google.com with SMTP id 41be03b00d2f7-7d4f85766f0so3389570a12.2 for ; Sun, 29 Sep 2024 23:07:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727676452; x=1728281252; 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=DMwZ52rgNs2z/qva8eWDKf1Jz818c0mIJR5j/Mc97DA=; b=BaLFyPdhXU5mcX0jFkx1nYd0eC1/pzaeOC4pJtbA8MFMGvausb8ZOK5PD6Mi6X7Ktt MMxHg63h17am24Z3cM7g4yPkkdyGO9hWKPrXqQMBUfHfp7RTHNTMKe/w+8IBXVt4Ubw7 TP+eNinoymWqo1WygwETzf3lozQKVlX8kWIsA09dusDUnBgd7EtqK+vel1mHwH9SiO9P McOUA7m7I4gHv/UwVos0YRDJaKflszuYvLhS1/v8kFWZYewir7IuVq0DrFOyL0MlwKGh q/qBpofVN+1b8JccaQuRZe7R9r6hHaCHbgnjor5feLb+bDUaJ8E09aDQIHMWfYdZrFd2 DF7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727676452; x=1728281252; 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=DMwZ52rgNs2z/qva8eWDKf1Jz818c0mIJR5j/Mc97DA=; b=LdXC8W0vt6ouUPbzsYQ1NeLQGFHUAmkRZpVWLP3Ket00jnjxbmcM2KttUNsL+w+zm4 cvsNep+Vi6NX+ybjqlJUbWVEzHKtvO5TYr87stqFY5dNZu/VxkUuwOx5FZZwCGhayeKF uqAfo7Ot4kcDTqHIV8J6C+iT9DT0c7XWefrNjbmLL/9nDNszkOcNcJlJn8JqhFFVke+E qr9tR5OXFgttlrYlbPKgWtnMxH6Cev+cotsS3Y+mqK5llAq8sHUxaPyYGGBwEjT+yV/w OlORGB5yPQMA6a/F/g14nzexHR5gSuIhgsURi4seLB9A1AAZV5zPyu9TmCGAhk5Mp3yc Lbvw== X-Forwarded-Encrypted: i=1; AJvYcCXu6MYRK28rufviFlIXSET8TKCoWX60Y64wSKc957qHBx7JwSDdnP94U2K4/mPwg5PctBz7bYRE8s7tZ1UKqf1d@lists.infradead.org X-Gm-Message-State: AOJu0YzhuGxm75gphmugddEfmNoivfsv6Ok6Rb78Rl6E/scbJe0hf/G9 IZdJaR5EEmAB2JwPt+qG+5d4m7Zd0uQo8XWN/4+WGCYZ0XbMyUN4 X-Google-Smtp-Source: AGHT+IE3Cw/qK4kCNeEhAnR/8b7y5fEBPaeUkjz0+6Dgitm2s6Z0BNGPar86SjGu4uqzL46UjUAdqg== X-Received: by 2002:a05:6a20:b70f:b0:1d4:fadf:2d14 with SMTP id adf61e73a8af0-1d4fadf3c80mr14163323637.0.1727676451567; Sun, 29 Sep 2024 23:07:31 -0700 (PDT) Received: from localhost.localdomain ([59.188.211.160]) by smtp.googlemail.com with ESMTPSA id d2e1a72fcca58-71b264bb351sm5506246b3a.62.2024.09.29.23.07.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Sep 2024 23:07:31 -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 RESEND] watchdog: apple: Increase reset delay to 150ms Date: Mon, 30 Sep 2024 14:06:33 +0800 Message-ID: <20240930060653.4024-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-20240929_230733_445799_B4A29004 X-CRM114-Status: GOOD ( 13.37 ) 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. Reviewed-by: Sven Peter Reviewed-by: Guenter Roeck Signed-off-by: Nick Chan --- drivers/watchdog/apple_wdt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) base-commit: cea5425829f77e476b03702426f6b3701299b925 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; }