[PATCH 2/2] firmware: scmi: Support probe vendor ID 0x81

Michal Simek <[email protected]>
Newsgroups gmane.comp.boot-loaders.u-boot
Message-ID <978aa3b1dfbf12798918c1eae45d06da35275b21.1785326564.git.michal.simek@amd.com>
Preparing to add the AMD/Xilinx SCMI vendor protocol driver, support probe
of SCMI vendor ID 0x81. Add the protocol ID, the per-agent protocol device
slot, the probe/lookup switch cases and the scmi command name, gated by a
Kconfig option for conditional compilation.

The same wiring has been done by commit 7830ccc77a13 ("firmware: scmi:
Support probe vendor ID 0x80 and 0x82").

Signed-off-by: Michal Simek <[email protected]>
---

 cmd/scmi.c                                |  1 +
 drivers/firmware/scmi/Kconfig             |  3 +++
 drivers/firmware/scmi/scmi_agent-uclass.c | 10 ++++++++++
 include/scmi_agent-uclass.h               |  3 +++
 include/scmi_protocols.h                  |  1 +
 5 files changed, 18 insertions(+)

diff --git a/cmd/scmi.c b/cmd/scmi.c
index af9743145835..1aa20c7bd961 100644
--- a/cmd/scmi.c
+++ b/cmd/scmi.c
@@ -31,6 +31,7 @@ struct {
 	{SCMI_PROTOCOL_ID_VOLTAGE_DOMAIN, "Voltage domain management"},
 	{SCMI_PROTOCOL_ID_PINCTRL, "Pin control management"},
 	{SCMI_PROTOCOL_ID_VENDOR_80, "Vendor specific (0x80)"},
+	{SCMI_PROTOCOL_ID_VENDOR_81, "Vendor specific (0x81)"},
 	{SCMI_PROTOCOL_ID_VENDOR_82, "Vendor specific (0x82)"},
 };
 
diff --git a/drivers/firmware/scmi/Kconfig b/drivers/firmware/scmi/Kconfig
index cd912ebe4096..64bc9aef5af7 100644
--- a/drivers/firmware/scmi/Kconfig
+++ b/drivers/firmware/scmi/Kconfig
@@ -46,6 +46,9 @@ config SCMI_AGENT_OPTEE
 config SCMI_ID_VENDOR_80
 	bool
 
+config SCMI_ID_VENDOR_81
+	bool
+
 config SCMI_ID_VENDOR_82
 	bool
 
diff --git a/drivers/firmware/scmi/scmi_agent-uclass.c b/drivers/firmware/scmi/scmi_agent-uclass.c
index cd458a7f4588..9159e59385b0 100644
--- a/drivers/firmware/scmi/scmi_agent-uclass.c
+++ b/drivers/firmware/scmi/scmi_agent-uclass.c
@@ -116,6 +116,11 @@ struct udevice *scmi_get_protocol(struct udevice *dev,
 		proto = priv->vendor_dev_80;
 		break;
 #endif
+#if IS_ENABLED(CONFIG_SCMI_ID_VENDOR_81)
+	case SCMI_PROTOCOL_ID_VENDOR_81:
+		proto = priv->vendor_dev_81;
+		break;
+#endif
 #if IS_ENABLED(CONFIG_SCMI_ID_VENDOR_82)
 	case SCMI_PROTOCOL_ID_VENDOR_82:
 		proto = priv->vendor_dev_82;
@@ -189,6 +194,11 @@ static int scmi_add_protocol(struct udevice *dev,
 		priv->vendor_dev_80 = proto;
 		break;
 #endif
+#if IS_ENABLED(CONFIG_SCMI_ID_VENDOR_81)
+	case SCMI_PROTOCOL_ID_VENDOR_81:
+		priv->vendor_dev_81 = proto;
+		break;
+#endif
 #if IS_ENABLED(CONFIG_SCMI_ID_VENDOR_82)
 	case SCMI_PROTOCOL_ID_VENDOR_82:
 		priv->vendor_dev_82 = proto;
diff --git a/include/scmi_agent-uclass.h b/include/scmi_agent-uclass.h
index c40b448bcba1..c9d77ad8ec7c 100644
--- a/include/scmi_agent-uclass.h
+++ b/include/scmi_agent-uclass.h
@@ -58,6 +58,9 @@ struct scmi_agent_priv {
 #if IS_ENABLED(CONFIG_SCMI_ID_VENDOR_80)
 	struct udevice *vendor_dev_80;
 #endif
+#if IS_ENABLED(CONFIG_SCMI_ID_VENDOR_81)
+	struct udevice *vendor_dev_81;
+#endif
 #if IS_ENABLED(CONFIG_SCMI_ID_VENDOR_82)
 	struct udevice *vendor_dev_82;
 #endif
diff --git a/include/scmi_protocols.h b/include/scmi_protocols.h
index a8fd0a5a729e..801912d16a92 100644
--- a/include/scmi_protocols.h
+++ b/include/scmi_protocols.h
@@ -26,6 +26,7 @@ enum scmi_std_protocol {
 	SCMI_PROTOCOL_ID_VOLTAGE_DOMAIN = 0x17,
 	SCMI_PROTOCOL_ID_PINCTRL = 0x19,
 	SCMI_PROTOCOL_ID_VENDOR_80 = 0x80,
+	SCMI_PROTOCOL_ID_VENDOR_81 = 0x81,
 	SCMI_PROTOCOL_ID_VENDOR_82 = 0x82,
 };
 
---
base-commit: 264994658ecab72cc292f8ce433469b01f170e5c
branch: debian-sent3

-- 
2.43.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.