[RFC PATCH v3 2/2] drivers/watchdog: Add RISC-V SBI watchdog driver

Guenter Roeck linux at roeck-us.net
Thu Nov 19 07:27:30 PST 2026


On 11/19/26 07:04, Anup Patel wrote:
> On Wed, Nov 18, 2026 at 2:52 PM Prajwal N <prajwal.n at oss.qualcomm.com> wrote:
>>
>> Add the RISCV_SBI_WATCHDOG Kconfig option, which depends on
>> RISCV and RISCV_SBI support.
> 
> Kconfig option is always needed when adding new driver so
> there is not much value in having this statement in commit
> description.
> 
>>
>> Add a watchdog driver for the RISC-V SBI watchdog extension.
>> The driver integrates with the Linux watchdog framework to
>> configure and control the watchdog. The driver invokes the
>> SBI watchdog using the standard SBI calls.
>>
>> Support pretimeout event notifications using Message Signaled
>> Interrupts (MSIs).
>>
>> Signed-off-by: Prajwal N <prajwal.n at oss.qualcomm.com>
>> ---
>>   drivers/watchdog/Kconfig         |  10 +
>>   drivers/watchdog/Makefile        |   1 +
>>   drivers/watchdog/riscv_sbi_wdt.c | 436 +++++++++++++++++++++++++++++++
>>   3 files changed, 447 insertions(+)
>>   create mode 100644 drivers/watchdog/riscv_sbi_wdt.c
>>
>> diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
>> index f7d0a0c2c0ef..d6b4e8ccd057 100644
>> --- a/drivers/watchdog/Kconfig
>> +++ b/drivers/watchdog/Kconfig
>> @@ -2164,6 +2164,16 @@ config STARFIVE_WATCHDOG
>>            Say Y here to support the watchdog of StarFive JH7100 and JH7110
>>            SoC. This driver can also be built as a module if choose M.
>>
>> +config RISCV_SBI_WATCHDOG
>> +       tristate "RISC-V SBI based Watchdog support"
>> +       depends on RISCV_SBI
>> +       default RISCV
>> +       select WATCHDOG_CORE
> 
> Drop "select WATCHDOG_CORE" instead extend "depends on"
> to include WATCHDOG_CORE (just like other watchdog drivers).
> 

Please explain what you are talking about here.
Literally every watchdog driver uses "select WATCHDOG_CORE".

> You will also need a separate third patch to enable WATCHDOG_CORE
> in arch/riscv/configs/defconfig.
> 

Why exactly ?

Guenter




More information about the linux-riscv mailing list