lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211203163539.91870-1-cniedermaier@dh-electronics.com>
Date:   Fri, 3 Dec 2021 17:35:39 +0100
From:   Christoph Niedermaier <cniedermaier@...electronics.com>
To:     <linux-arm-kernel@...ts.infradead.org>
CC:     Christoph Niedermaier <cniedermaier@...electronics.com>,
        "Support Opensource" <support.opensource@...semi.com>,
        Adam Thomson <Adam.Thomson.Opensource@...semi.com>,
        Wim Van Sebroeck <wim@...ux-watchdog.org>,
        Guenter Roeck <linux@...ck-us.net>,
        Andrej Picej <andrej.picej@...ik.com>,
        <linux-watchdog@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: [RFC PATCH] watchdog: da9062: Correct the timeout values

I measured the timeout values of my DA9061 chip. According to the
information in the data sheet the formula should be:

timeout = 2.048 * 2^(regval - 1)

But my measured values differ from that.
Accoring to my measured values the formula must be:

timeout = 3.2 * 2^(regval - 1)

Is there something wrong with my chip, or has anyone else noticed this as well?

Signed-off-by: Christoph Niedermaier <cniedermaier@...electronics.com>
Cc: Support Opensource <support.opensource@...semi.com>
Cc: Adam Thomson <Adam.Thomson.Opensource@...semi.com>
Cc: Wim Van Sebroeck <wim@...ux-watchdog.org>
Cc: Guenter Roeck <linux@...ck-us.net>
Cc: Andrej Picej <andrej.picej@...ik.com>
Cc: linux-watchdog@...r.kernel.org
Cc: linux-kernel@...r.kernel.org
To: linux-arm-kernel@...ts.infradead.org
---
 drivers/watchdog/da9062_wdt.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/watchdog/da9062_wdt.c b/drivers/watchdog/da9062_wdt.c
index f02cbd530538..d2576aba9ca5 100644
--- a/drivers/watchdog/da9062_wdt.c
+++ b/drivers/watchdog/da9062_wdt.c
@@ -20,7 +20,8 @@
 #include <linux/regmap.h>
 #include <linux/of.h>
 
-static const unsigned int wdt_timeout[] = { 0, 2, 4, 8, 16, 32, 65, 131 };
+static const unsigned int wdt_timeout[] = { 0, 3, 6, 12, 25, 51, 102, 204 };
+
 #define DA9062_TWDSCALE_DISABLE		0
 #define DA9062_TWDSCALE_MIN		1
 #define DA9062_TWDSCALE_MAX		(ARRAY_SIZE(wdt_timeout) - 1)
-- 
2.11.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ