[PATCH v6 3/6] cdx: Export Symbols for MCDI RPC and Initialization

From: Shubhrajyoti Datta
Date: Thu Apr 24 2025 - 09:22:26 EST


The cdx_mcdi_init, cdx_mcdi_process_cmd, and cdx_mcdi_rpc functions are
needed by VersalNET EDAC modules that interact with the MCDI (Management
Controller Direct Interface) framework. These functions facilitate
communication between different hardware components by enabling command
execution and status management.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xxxxxxx>
---

Changes in v6:
- Update commit description

Changes in v2:
- Export the symbols for module compilation

drivers/cdx/controller/mcdi.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/drivers/cdx/controller/mcdi.c b/drivers/cdx/controller/mcdi.c
index 600084e81a86..632d3e7666ba 100644
--- a/drivers/cdx/controller/mcdi.c
+++ b/drivers/cdx/controller/mcdi.c
@@ -126,6 +126,7 @@ int cdx_mcdi_init(struct cdx_mcdi *cdx)
fail:
return rc;
}
+EXPORT_SYMBOL_GPL(cdx_mcdi_init);

void cdx_mcdi_finish(struct cdx_mcdi *cdx)
{
@@ -588,6 +589,7 @@ void cdx_mcdi_process_cmd(struct cdx_mcdi *cdx, struct cdx_dword *outbuf, int le

cdx_mcdi_process_cleanup_list(mcdi->cdx, &cleanup_list);
}
+EXPORT_SYMBOL_GPL(cdx_mcdi_process_cmd);

static void cdx_mcdi_cmd_work(struct work_struct *context)
{
@@ -755,6 +757,7 @@ int cdx_mcdi_rpc(struct cdx_mcdi *cdx, unsigned int cmd,
return cdx_mcdi_rpc_sync(cdx, cmd, inbuf, inlen, outbuf, outlen,
outlen_actual, false);
}
+EXPORT_SYMBOL_GPL(cdx_mcdi_rpc);

/**
* cdx_mcdi_rpc_async - Schedule an MCDI command to run asynchronously
--
2.17.1