From patchwork Tue Oct 1 16:59:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Chan X-Patchwork-Id: 13818560 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 8A716CEACED for ; Tue, 1 Oct 2024 17:04:34 +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:References:In-Reply-To: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:List-Owner; bh=tgNguRTnjUZaIg7uPr+xWg/1h1wY5swm1wRQT6JqmIA=; b=LzVVFWhpze4KHxW8mHJNx1gNS5 f1ntBdfKJ/Ro+sD4zSMV4nk0LQq3DFRKMQY1EaoYmGeS41coHND63lXkvZk08p1DsIR34NOYtfkjf 0rgg6nOlUPY4j+TXBrg/qtK0qnzXTmPfdi2Css6WSembm6wRMExKwXfxfonotAVgM678iFvkWgG3K QGSsjmco8lf5bGb6v1QwVZgXzd+JQfEAk1wVROF7StiYHM98WTTR0Co5MNf732oHY1E/NEY1/2la2 01bd5dZJx8sH8f4LeYxDe30PdRlVLgkd42y1aCNFuJG4H5uO+5IHIreGgp9vOEwwC0fgQ+q+i39+J I+lS2nPA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1svgIS-00000003cbd-1hdN; Tue, 01 Oct 2024 17:04:24 +0000 Received: from mail-pg1-x52c.google.com ([2607:f8b0:4864:20::52c]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1svgEu-00000003bpg-1v5X for linux-arm-kernel@lists.infradead.org; Tue, 01 Oct 2024 17:00:45 +0000 Received: by mail-pg1-x52c.google.com with SMTP id 41be03b00d2f7-7e6ba3f93fdso3662978a12.1 for ; Tue, 01 Oct 2024 10:00:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727802044; x=1728406844; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=tgNguRTnjUZaIg7uPr+xWg/1h1wY5swm1wRQT6JqmIA=; b=EMbN0/xA6jZm5Oooc4FMhMD/hP8+H7GIyIxtMF8Ms99QHjdBQGGF3XDk2bvVE+13Y2 CKDmDt79t6wi574kF2LQIrvQdeSefM5eQ6nTBtJ6nKLb7RS7NZ7Hzo98HpH7Yg9fpuKh Gc1xqJE/45CEgSislAX8uWsR9cX0JwUkGR5VPq85KX6Dbx9DtWTV7I2Uj+KrytgDTMuD euQ8GKFzyjXQKFWlCHgue6Ft7oUy+e0S6YZeyS9mcl2PMvMDrQa3ouqUC1lL9/SM84Zz reEWwf3ZJpSuWxyOvs0KSJbsr4jVNRp2rQeEFXbX+0O0NA58pF1dNbUQwJMyZ6H2vQBK 4xKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727802044; x=1728406844; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tgNguRTnjUZaIg7uPr+xWg/1h1wY5swm1wRQT6JqmIA=; b=dOv/XaZxCyS91tqtyGYu816ruaU5FaP7DUKq6BAv56e/K9VmxMT/OfNFrqj9doUcOs Pyw58EGRYNmafmzH+swjd+K+4RM1L5hzaindyCex0um0J4pUvSrXZUZH/o+CIkje2TJj QtZjA+xXbmZTMKDo3Pgpt5qGSiafYEPCsPd6JPAkYPBSALbteyfVYCLnFsF7oMTZlRS3 xQmlOQ0pwZUcB2gfujOQoBmKQDeHVT5+kUXBvdHyLQfdCe+JcUfRVp+59nZ1xhpfYZ61 kybOVgHH00K2d6s0O0J593yFbrI1Fav40YhQflW1OpRoDDhszSdt70IGPNqG9k29q6UF kbmQ== X-Forwarded-Encrypted: i=1; AJvYcCU1tphvuPgkRZ6NcLuIKIOoVug6nLBSGUkwf840t3zz1gcuNVaKEnAxo1TnpjPwSStSGF91zfbAuEOPqahZluDy@lists.infradead.org X-Gm-Message-State: AOJu0YyV8Gum7D5Gpm7VU6iepq3r7x8zvPpBLztp5V1yrJvR8ZO75rhs ADGPgW5RHmQCq4uJgOLLQR7jmx7t51xNHuoRdWi7YrQenj1+PdcGNv6Ag9sg X-Google-Smtp-Source: AGHT+IF+p9R1d1pnL6XCGLnTwwX3rwlZj+UtFNg6vndTxf9iMVY8yDmwifeIU5ozJ1PoZ+VX4QFIvw== X-Received: by 2002:a05:6a21:1304:b0:1d2:bbd9:4646 with SMTP id adf61e73a8af0-1d5e2dd9d54mr508335637.38.1727802043346; Tue, 01 Oct 2024 10:00:43 -0700 (PDT) Received: from localhost.localdomain ([59.188.211.160]) by smtp.googlemail.com with ESMTPSA id d2e1a72fcca58-71b2651623asm8234054b3a.120.2024.10.01.10.00.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Oct 2024 10:00:42 -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 v2 2/2] watchdog: apple: Increase reset delay to 150ms Date: Wed, 2 Oct 2024 00:59:52 +0800 Message-ID: <20241001170018.20139-3-towinchenmi@gmail.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20241001170018.20139-1-towinchenmi@gmail.com> References: <20241001170018.20139-1-towinchenmi@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241001_100044_515396_47BF145D X-CRM114-Status: GOOD ( 14.54 ) 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(-) diff --git a/drivers/watchdog/apple_wdt.c b/drivers/watchdog/apple_wdt.c index 62dabf223d90..95d9e37df41c 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(wdt->regs + APPLE_WDT_WD1_CUR_TIME); - mdelay(50); + mdelay(150); return 0; }