Page MenuHomeFreeBSD

D47428.diff
No OneTemporary

D47428.diff

diff --git a/sys/dev/firmware/arm/scmi.h b/sys/dev/firmware/arm/scmi.h
--- a/sys/dev/firmware/arm/scmi.h
+++ b/sys/dev/firmware/arm/scmi.h
@@ -32,6 +32,8 @@
#ifndef _ARM64_SCMI_SCMI_H_
#define _ARM64_SCMI_SCMI_H_
+#include <sys/sysctl.h>
+
#include "scmi_if.h"
#define SCMI_DEF_MAX_MSG 32
@@ -64,6 +66,7 @@
struct mtx mtx;
struct scmi_transport_desc trs_desc;
struct scmi_transport *trs;
+ struct sysctl_oid *sysctl_root;
};
struct scmi_msg {
diff --git a/sys/dev/firmware/arm/scmi.c b/sys/dev/firmware/arm/scmi.c
--- a/sys/dev/firmware/arm/scmi.c
+++ b/sys/dev/firmware/arm/scmi.c
@@ -44,6 +44,7 @@
#include <sys/queue.h>
#include <sys/refcount.h>
#include <sys/sdt.h>
+#include <sys/sysctl.h>
#include <sys/taskqueue.h>
#include <dev/clk/clk.h>
@@ -189,6 +190,7 @@
int
scmi_attach(device_t dev)
{
+ struct sysctl_oid *sysctl_trans;
struct scmi_softc *sc;
phandle_t node;
int error;
@@ -209,6 +211,17 @@
device_printf(dev, "Transport - max_msg:%d max_payld_sz:%lu reply_timo_ms:%d\n",
SCMI_MAX_MSG(sc), SCMI_MAX_MSG_PAYLD_SIZE(sc), SCMI_MAX_MSG_TIMEOUT_MS(sc));
+ sc->sysctl_root = SYSCTL_ADD_NODE(NULL, SYSCTL_STATIC_CHILDREN(_hw),
+ OID_AUTO, "scmi", CTLFLAG_RD, 0, "SCMI root");
+ sysctl_trans = SYSCTL_ADD_NODE(NULL, SYSCTL_CHILDREN(sc->sysctl_root),
+ OID_AUTO, "transport", CTLFLAG_RD, 0, "SCMI Transport properties");
+ SYSCTL_ADD_INT(NULL, SYSCTL_CHILDREN(sysctl_trans), OID_AUTO, "max_msg",
+ CTLFLAG_RD, &sc->trs_desc.max_msg, 0, "SCMI Max number of inflight messages");
+ SYSCTL_ADD_INT(NULL, SYSCTL_CHILDREN(sysctl_trans), OID_AUTO, "max_msg_size",
+ CTLFLAG_RD, &sc->trs_desc.max_payld_sz, 0, "SCMI Max message payload size");
+ SYSCTL_ADD_INT(NULL, SYSCTL_CHILDREN(sysctl_trans), OID_AUTO, "max_rx_timeout_ms",
+ CTLFLAG_RD, &sc->trs_desc.reply_timo_ms, 0, "SCMI Max message RX timeout ms");
+
/*
* Allow devices to identify.
*/

File Metadata

Mime Type
text/plain
Expires
Thu, Nov 7, 8:42 PM (22 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14462619
Default Alt Text
D47428.diff (1 KB)

Event Timeline