From: Prajwal N <prajwal.n@oss.qualcomm.com>
To: pjw@kernel.org, palmer@dabbelt.com, aou@eecs.berkeley.edu,
alex@ghiti.fr, wim@linux-watchdog.org, linux@roeck-us.net,
radim.krcmar@oss.qualcomm.com, anup@brainfault.org,
anup.patel@oss.qualcomm.com
Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
linux-watchdog@vger.kernel.org, prajwal.n.oss@gmail.com,
Prajwal N <prajwal.n@oss.qualcomm.com>
Subject: [RFC PATCH v4 1/2] RISC-V: Add defines for the RISC-V SBI watchdog extension
Date: Tue, 24 Nov 2026 18:45:41 +0530 [thread overview]
Message-ID: <20261124131542.613271-2-prajwal.n@oss.qualcomm.com> (raw)
In-Reply-To: <20261124131542.613271-1-prajwal.n@oss.qualcomm.com>
Add the SBI watchdog extension ID and function IDs for supported
operations, including start, stop, pat, and attribute read and write.
Define the attribute IDs exposed by the SBI watchdog extension, including
watchdog capabilities such as MSI support and configurable watchdog
parameters.
Signed-off-by: Prajwal N <prajwal.n@oss.qualcomm.com>
---
arch/riscv/include/asm/sbi.h | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/arch/riscv/include/asm/sbi.h b/arch/riscv/include/asm/sbi.h
index fd6266a7b339..f2b0b0c9f6b1 100644
--- a/arch/riscv/include/asm/sbi.h
+++ b/arch/riscv/include/asm/sbi.h
@@ -40,6 +40,7 @@ enum sbi_ext_id {
SBI_EXT_FWFT = 0x46574654,
SBI_EXT_MPXY = 0x4D505859,
SBI_EXT_DBTR = 0x44425452,
+ SBI_EXT_WDT = 0x574454,
/* Experimentals extensions must lie within this range */
SBI_EXT_EXPERIMENTAL_START = 0x08000000,
@@ -536,6 +537,31 @@ union sbi_dbtr_shmem_entry {
struct sbi_dbtr_id_msg id;
};
+/* SBI watchdog function IDs */
+enum sbi_ext_wdt_fid {
+ SBI_EXT_WATCHDOG_READ_ATTRIBUTE = 0,
+ SBI_EXT_WATCHDOG_WRITE_ATTRIBUTE,
+ SBI_EXT_WATCHDOG_WRITE_NOTIF_MSI_MESSAGE,
+ SBI_EXT_WATCHDOG_START,
+ SBI_EXT_WATCHDOG_STOP,
+ SBI_EXT_WATCHDOG_PAT,
+};
+
+/* SBI watchdog attributes */
+enum sbi_ext_wdt_attribute_id {
+ SBI_WATCHDOG_CAPABILITY = 0x00000000,
+ SBI_WATCHDOG_STATE = 0x00000001,
+ SBI_WATCHDOG_MIN_PERIOD = 0x00000002,
+ SBI_WATCHDOG_PERIOD = 0x00000003,
+ SBI_WATCHDOG_TIME_LEFT = 0x00000004,
+ SBI_WATCHDOG_NOTIF_TIME = 0x00000005,
+ SBI_WATCHDOG_NOTIF_MSI_ADDR_LOW = 0x00000006,
+ SBI_WATCHDOG_NOTIF_MSI_ADDR_HIGH = 0x00000007,
+ SBI_WATCHDOG_NOTIF_MSI_DATA = 0x00000008,
+ SBI_WATCHDOG_ATTR_MAX = 0x00000009,
+ SBI_WATCHDOG_ATTR_RESERVED_MAX = 0xFFFFFFFF
+};
+
/* SBI spec version fields */
#define SBI_SPEC_VERSION_DEFAULT 0x1
#define SBI_SPEC_VERSION_MAJOR_SHIFT 24
--
2.43.0
next prev parent reply other threads:[~2026-11-24 13:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-24 13:15 [RFC PATCH v4 0/2] Add RISC-V SBI watchdog driver Prajwal N
2026-11-24 13:15 ` Prajwal N [this message]
2026-11-24 13:15 ` [RFC PATCH v4 2/2] drivers/watchdog: " Prajwal N
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261124131542.613271-2-prajwal.n@oss.qualcomm.com \
--to=prajwal.n@oss.qualcomm.com \
--cc=alex@ghiti.fr \
--cc=anup.patel@oss.qualcomm.com \
--cc=anup@brainfault.org \
--cc=aou@eecs.berkeley.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=palmer@dabbelt.com \
--cc=pjw@kernel.org \
--cc=prajwal.n.oss@gmail.com \
--cc=radim.krcmar@oss.qualcomm.com \
--cc=wim@linux-watchdog.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®