Received: by 2002:a05:6520:4d:b0:139:a872:a4c9 with SMTP id i13csp2568066lkm; Mon, 20 Sep 2021 18:56:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwNS0OaKUR1kpRjJvWZsCDA+dL/4TtMg53XrI8OAWDZIGlkOTFI7pGsck4xJ8CJJx2Yop4y X-Received: by 2002:aa7:db56:: with SMTP id n22mr33699680edt.148.1632188926017; Mon, 20 Sep 2021 18:48:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632188926; cv=none; d=google.com; s=arc-20160816; b=1DHuW5sRWx+SiioJcIqGHqkrqluVUyN1y6qwTubD1fpnYOLeNs0EJZX7h808uaogG1 3UZBwKRvZMnUBaRhCh+jxQxyyT+n7OcaHJHH25bOAPPm3CGHYBoJNL7DrqqyDiS5WIHE ZCSjLG02cL30t1+dr/dMsy2SBXPYHzbjSslJbP9ZSx4g2RBYqhRV24GbVj9YOnOHzpE1 8LNsu+L6+pNvlmX9FLdIAe96sEA5oHwHJe61IPMBvFDjz31G6IgkPdfbSZmPz3iDF4Uv xpY6Iv9llG605yImXqx7hQB/YmUfJgYgi0aHPUIkFzA+i+qlYfy+jCMqQvlWIj3bafS3 GDcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=IBpQcR+FPRWQ00tq4I9TRVATJjBmQVU+59WBMpzSUwE=; b=cA63zKHvXS1qaEVMIcQVMmK8R+PWxeiCeKPYWmTC0vG2gCYcBa3VHRqrsj/V3xpnax 6ADDe0dFeKNFcRCcNFBHri3LyVRKaCc91eWixXVNvZouu3tpeJvsm/n5N1zdu5U9/uGY K9SW9irDpRimDkwJCqNzsvl5D8yqb7NwmhNz0bG8C1sogazPwYvwPPhox/StVta7vcoV yD2SHE3J/oqS5DtzPAhFK//dcs+xWvuohkKML6G/m0bxLb5CyvtTwmc3b7enKXiwbWf5 IGKAkdgvvNYgG82qOZxq5i/bWk17ObH5WQjLkZVKt2FvTP2EXK5uOB2jlgW3Zew5o5GX KB3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=A8FktrAq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t14si9000434edd.537.2021.09.20.18.48.22; Mon, 20 Sep 2021 18:48:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=A8FktrAq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352318AbhITRjK (ORCPT + 99 others); Mon, 20 Sep 2021 13:39:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:43462 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348468AbhITRga (ORCPT ); Mon, 20 Sep 2021 13:36:30 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 829C96136F; Mon, 20 Sep 2021 17:06:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632157592; bh=1vBuY/Mix2N6KkBaigQwQ3X+ulXE4j4QBpvGSMe505M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=A8FktrAqBbfzXz3y2hfd1Arr21SIagfPiWvgyDOBgDJiMZJmE9rOolVmiJLg4aB/8 Mjz/OejTAlYbJClROxrn6aBxDhxPUBd/Wp8fQQe1WIJeQdRyxss3M1fVDzfiONqvWK QMDfEiJhFfeuFKIzfHgK+ncPbCLVz/PlhEWRRpwA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Chunyan Zhang , Mark Brown , Sasha Levin Subject: [PATCH 4.19 061/293] spi: sprd: Fix the wrong WDG_LOAD_VAL Date: Mon, 20 Sep 2021 18:40:23 +0200 Message-Id: <20210920163935.350748875@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210920163933.258815435@linuxfoundation.org> References: <20210920163933.258815435@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Chunyan Zhang [ Upstream commit 245ca2cc212bb2a078332ec99afbfbb202f44c2d ] Use 50ms as default timeout value and the time clock is 32768HZ. The original value of WDG_LOAD_VAL is not correct, so this patch fixes it. Fixes: ac1775012058 ("spi: sprd: Add the support of restarting the system") Signed-off-by: Chunyan Zhang Link: https://lore.kernel.org/r/20210826091549.2138125-2-zhang.lyra@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- drivers/spi/spi-sprd-adi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi-sprd-adi.c b/drivers/spi/spi-sprd-adi.c index e41976010dc4..97f44458ee7b 100644 --- a/drivers/spi/spi-sprd-adi.c +++ b/drivers/spi/spi-sprd-adi.c @@ -99,7 +99,7 @@ #define HWRST_STATUS_SPRDISK 0xc0 /* Use default timeout 50 ms that converts to watchdog values */ -#define WDG_LOAD_VAL ((50 * 1000) / 32768) +#define WDG_LOAD_VAL ((50 * 32768) / 1000) #define WDG_LOAD_MASK GENMASK(15, 0) #define WDG_UNLOCK_KEY 0xe551 -- 2.30.2