<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/watchdog/sbsa_gwdt.c, branch v7.0-rc2</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v7.0-rc2</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v7.0-rc2'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2026-01-18T09:55:09+00:00</updated>
<entry>
<title>watchdog: sbsa: Update the W_IIDR Implementer bit mask to 0xFFF</title>
<updated>2026-01-18T09:55:09+00:00</updated>
<author>
<name>Naina Mehta</name>
<email>naina.mehta@oss.qualcomm.com</email>
</author>
<published>2025-11-21T06:14:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a1a548c5eca62716c118134a8a1988277e8c5e96'/>
<id>urn:sha1:a1a548c5eca62716c118134a8a1988277e8c5e96</id>
<content type='text'>
The implementer mask defined in the driver [1] captures bits 0-10,
whereas section C.4.2 of BSA specification [2] indicates that bits
0-11 of the W_IIDR register represent the implementer JEP106 code.
Update the SBSA_GWDT_IMPL_MASK corresponding to bits 0-11, while
at it update SBSA_GWDT_VERSION_MASK mask to use GENMASK.

[1] #define SBSA_GWDT_IMPL_MASK    0x7FF

[2] Implementer, bits [11:0]
Contains the JEP106 code of the company that implemented the
Generic Watchdog:
Bits[11:8] The JEP106 continuation code of the implementer.
Bit[7] Always 0
Bits [6:0] The JEP106 identity code of the implementer.

Signed-off-by: Naina Mehta &lt;naina.mehta@oss.qualcomm.com&gt;
Acked-by: Aaron Plattner &lt;aplattner@nvidia.com&gt;
Reviewed-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Wim Van Sebroeck &lt;wim@linux-watchdog.org&gt;
</content>
</entry>
<entry>
<title>watchdog: sbsa: Adjust keepalive timeout to avoid MediaTek WS0 race condition</title>
<updated>2025-07-28T10:07:08+00:00</updated>
<author>
<name>Aaron Plattner</name>
<email>aplattner@nvidia.com</email>
</author>
<published>2025-07-21T23:06:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=48defdf6b083f74a44e1f742db284960d3444aec'/>
<id>urn:sha1:48defdf6b083f74a44e1f742db284960d3444aec</id>
<content type='text'>
The MediaTek implementation of the sbsa_gwdt watchdog has a race
condition where a write to SBSA_GWDT_WRR is ignored if it occurs while
the hardware is processing a timeout refresh that asserts WS0.

Detect this based on the hardware implementer and adjust
wdd-&gt;min_hw_heartbeat_ms to avoid the race by forcing the keepalive ping
to be one second later.

Signed-off-by: Aaron Plattner &lt;aplattner@nvidia.com&gt;
Acked-by: Timur Tabi &lt;ttabi@nvidia.com&gt;
Reviewed-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Link: https://lore.kernel.org/r/20250721230640.2244915-1-aplattner@nvidia.com
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Wim Van Sebroeck &lt;wim@linux-watchdog.org&gt;
</content>
</entry>
<entry>
<title>sbsa_gwdt: Calculate timeout with 64-bit math</title>
<updated>2023-10-29T18:45:05+00:00</updated>
<author>
<name>Darren Hart</name>
<email>darren@os.amperecomputing.com</email>
</author>
<published>2023-09-21T09:02:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5d6aa89bba5bd6af2580f872b57f438dab883738'/>
<id>urn:sha1:5d6aa89bba5bd6af2580f872b57f438dab883738</id>
<content type='text'>
Commit abd3ac7902fb ("watchdog: sbsa: Support architecture version 1")
introduced new timer math for watchdog revision 1 with the 48 bit offset
register.

The gwdt-&gt;clk and timeout are u32, but the argument being calculated is
u64. Without a cast, the compiler performs u32 operations, truncating
intermediate steps, resulting in incorrect values.

A watchdog revision 1 implementation with a gwdt-&gt;clk of 1GHz and a
timeout of 600s writes 3647256576 to the one shot watchdog instead of
300000000000, resulting in the watchdog firing in 3.6s instead of 600s.

Force u64 math by casting the first argument (gwdt-&gt;clk) as a u64. Make
the order of operations explicit with parenthesis.

Fixes: abd3ac7902fb ("watchdog: sbsa: Support architecture version 1")
Reported-by: Vanshidhar Konda &lt;vanshikonda@os.amperecomputing.com&gt;
Signed-off-by: Darren Hart &lt;darren@os.amperecomputing.com&gt;
Cc: Wim Van Sebroeck &lt;wim@linux-watchdog.org&gt;
Cc: Guenter Roeck &lt;linux@roeck-us.net&gt;
Cc: linux-watchdog@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: &lt;stable@vger.kernel.org&gt; # 5.14.x
Reviewed-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Link: https://lore.kernel.org/r/7d1713c5ffab19b0f3de796d82df19e8b1f340de.1695286124.git.darren@os.amperecomputing.com
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Wim Van Sebroeck &lt;wim@linux-watchdog.org&gt;
</content>
</entry>
<entry>
<title>watchdog: Explicitly include correct DT includes</title>
<updated>2023-08-13T12:29:49+00:00</updated>
<author>
<name>Rob Herring</name>
<email>robh@kernel.org</email>
</author>
<published>2023-07-26T23:33:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cc85f87a77b8d6124c85c9d71d6956c0248fdf19'/>
<id>urn:sha1:cc85f87a77b8d6124c85c9d71d6956c0248fdf19</id>
<content type='text'>
The DT of_device.h and of_platform.h date back to the separate
of_platform_bus_type before it was merged into the regular platform bus.
As part of that merge prepping Arm DT support 13 years ago, they
"temporarily" include each other. They also include platform_device.h
and of.h. As a result, there's a pretty much random mix of those include
files used throughout the tree. In order to detangle these headers and
replace the implicit includes with struct declarations, users need to
explicitly include the correct includes.

Reviewed-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Acked-by: Alim Akhtar &lt;alim.akhtar@samsung.com&gt;
Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
Link: https://lore.kernel.org/r/20230726233302.3812749-1-robh@kernel.org
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Wim Van Sebroeck &lt;wim@linux-watchdog.org&gt;
</content>
</entry>
<entry>
<title>watchdog: sbsa: Test WDOG_HW_RUNNING bit in suspend and resume</title>
<updated>2023-04-22T10:53:53+00:00</updated>
<author>
<name>Wang Wensheng</name>
<email>wangwensheng4@huawei.com</email>
</author>
<published>2023-03-01T11:37:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=74d6c68c74fac3e6bdc28fba69889ed7ef05a7f8'/>
<id>urn:sha1:74d6c68c74fac3e6bdc28fba69889ed7ef05a7f8</id>
<content type='text'>
If the sbsa_gwdt is enabled by BIOS, the kernel set WDOG_HW_RUNNING bit
and keep it alive before anyone else would open it. When system suspend,
the sbsa_gwdt would not be disabled because WDOG_ACTIVE is not set. Then
the sbsa_gwdt would reach timeout since no one touch it during system
suspend.

To solve this, just test WDOG_HW_RUNNING bit in suspend and disable the
sbsa_gwdt if the bit is set, then reopen it accordingly in resume
process.

Signed-off-by: Wang Wensheng &lt;wangwensheng4@huawei.com&gt;
Reviewed-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Link: https://lore.kernel.org/r/20230301113702.76437-1-wangwensheng4@huawei.com
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Wim Van Sebroeck &lt;wim@linux-watchdog.org&gt;
</content>
</entry>
<entry>
<title>watchdog: sbsa_wdog: Make sure the timeout programming is within the limits</title>
<updated>2023-02-18T14:11:41+00:00</updated>
<author>
<name>George Cherian</name>
<email>george.cherian@marvell.com</email>
</author>
<published>2023-02-09T02:11:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=000987a38b53c172f435142a4026dd71378ca464'/>
<id>urn:sha1:000987a38b53c172f435142a4026dd71378ca464</id>
<content type='text'>
Make sure to honour the max_hw_heartbeat_ms while programming the timeout
value to WOR. Clamp the timeout passed to sbsa_gwdt_set_timeout() to
make sure the programmed value is within the permissible range.

Fixes: abd3ac7902fb ("watchdog: sbsa: Support architecture version 1")

Signed-off-by: George Cherian &lt;george.cherian@marvell.com&gt;
Reviewed-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Link: https://lore.kernel.org/r/20230209021117.1512097-1-george.cherian@marvell.com
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Wim Van Sebroeck &lt;wim@linux-watchdog.org&gt;
</content>
</entry>
<entry>
<title>watchdog: sbsa: drop unneeded MODULE_ALIAS</title>
<updated>2021-10-26T18:22:51+00:00</updated>
<author>
<name>Krzysztof Kozlowski</name>
<email>krzysztof.kozlowski@canonical.com</email>
</author>
<published>2021-09-17T09:20:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bcc3e704f1b73f7f8674364f0bda6593bbc9fd2b'/>
<id>urn:sha1:bcc3e704f1b73f7f8674364f0bda6593bbc9fd2b</id>
<content type='text'>
The MODULE_DEVICE_TABLE already creates proper alias for platform
driver.  Having another MODULE_ALIAS causes the alias to be duplicated.

Signed-off-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@canonical.com&gt;
Reviewed-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Link: https://lore.kernel.org/r/20210917092024.19323-1-krzysztof.kozlowski@canonical.com
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Wim Van Sebroeck &lt;wim@linux-watchdog.org&gt;
</content>
</entry>
<entry>
<title>watchdog: sbsa: only use 32-bit accessors</title>
<updated>2021-10-26T18:22:50+00:00</updated>
<author>
<name>Jamie Iles</name>
<email>quic_jiles@quicinc.com</email>
</author>
<published>2021-09-03T11:21:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f31afb502c3151855df3ed40f5974c7884c10d14'/>
<id>urn:sha1:f31afb502c3151855df3ed40f5974c7884c10d14</id>
<content type='text'>
SBSA says of the generic watchdog:

  All registers are 32 bits in size and should be accessed using 32-bit
  reads and writes. If an access size other than 32 bits is used then
  the results are IMPLEMENTATION DEFINED.

and for qemu, the implementation will only allow 32-bit accesses
resulting in a synchronous external abort when configuring the watchdog.
Use lo_hi_* accessors rather than a readq/writeq.

Fixes: abd3ac7902fb ("watchdog: sbsa: Support architecture version 1")
Signed-off-by: Jamie Iles &lt;quic_jiles@quicinc.com&gt;
Reviewed-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Reviewed-by: Shaokun Zhang &lt;zhangshaokun@hisilicon.com&gt;
Link: https://lore.kernel.org/r/20210903112101.493552-1-quic_jiles@quicinc.com
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Wim Van Sebroeck &lt;wim@linux-watchdog.org&gt;
</content>
</entry>
<entry>
<title>watchdog: sbsa: Support architecture version 1</title>
<updated>2021-06-21T06:48:58+00:00</updated>
<author>
<name>Shaokun Zhang</name>
<email>zhangshaokun@hisilicon.com</email>
</author>
<published>2021-05-17T12:10:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=abd3ac7902fb77f8386f485f7284253fc0c4d803'/>
<id>urn:sha1:abd3ac7902fb77f8386f485f7284253fc0c4d803</id>
<content type='text'>
For Armv8.6, The frequency of CNTFRQ_EL0 is standardized to a
frequency of 1GHz, so Arm Base System Architecture 1.0[1] has
introduced watchdog revision 1 that increases the length the
watchdog offset register to 48 bit, while other operation of
the watchdog remains the same.

The driver can determine which version of the watchdog is
implemented through the watchdog interface identification
register (W_IID). If the version is 0x1, the watchdog
offset register will be 48 bit, otherwise it will be 32 bit.

[1] https://developer.arm.com/documentation/den0094/latest

Cc: Wim Van Sebroeck &lt;wim@linux-watchdog.org&gt;
Cc: Guenter Roeck &lt;linux@roeck-us.net&gt;
Cc: Suravee Suthikulpanit &lt;Suravee.Suthikulpanit@amd.com&gt;
Cc: Al Stone &lt;al.stone@linaro.org&gt;
Cc: Jianchao Hu &lt;hujianchao@hisilicon.com&gt;
Cc: Huiqiang Wang &lt;wanghuiqiang@huawei.com&gt;
Signed-off-by: Shaokun Zhang &lt;zhangshaokun@hisilicon.com&gt;
Reviewed-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Link: https://lore.kernel.org/r/1621253408-23401-1-git-send-email-zhangshaokun@hisilicon.com
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Wim Van Sebroeck &lt;wim@linux-watchdog.org&gt;
</content>
</entry>
<entry>
<title>treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 294</title>
<updated>2019-06-05T15:36:38+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2019-05-29T14:18:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9f8068503d6373c20b83c346d9ab69955420113c'/>
<id>urn:sha1:9f8068503d6373c20b83c346d9ab69955420113c</id>
<content type='text'>
Based on 2 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license 2 as published
  by the free software foundation this program is distributed in the
  hope that it will be useful but without any warranty without even
  the implied warranty of merchantability or fitness for a particular
  purpose see the gnu general public license for more details

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license as published by
  the free software foundation this program is distributed in the hope
  that it [would] be useful but without any warranty without even the
  implied warranty of merchantability or fitness for a particular
  purpose see the gnu general public license for more details

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-only

has been chosen to replace the boilerplate/reference in 9 file(s).

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Allison Randal &lt;allison@lohutok.net&gt;
Reviewed-by: Alexios Zavras &lt;alexios.zavras@intel.com&gt;
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190529141901.804956444@linutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
