diff mbox series

[4/5] firmware: scmi: smccc transport: use plat data, not priv data

Message ID 20211108075611.30759-4-etienne.carriere@linaro.org
State Accepted
Commit 3de5aef451b83412b7104fd611bb94059a741f34
Headers show
Series [1/5] firmware: scmi: fix description of an API function | expand

Commit Message

Etienne Carriere Nov. 8, 2021, 7:56 a.m. UTC
Change SCMI smccc transport drivers to use platform data rather
than private data for channel reference since it only stores platform
data retrieved from the DT. Consequently the probe handler is replaced
with a of_to_plat handler.

Cc: Simon Glass <sjg@chromium.org>
Cc: Patrice Chotard <patrice.chotard@foss.st.com>
Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
---
Changes since v1:
 - No change. Patch re-send.
---
 drivers/firmware/scmi/smccc_agent.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Comments

Patrick Delaunay Nov. 8, 2021, 9:59 a.m. UTC | #1
Hi,

On 11/8/21 8:56 AM, Etienne Carriere wrote:
> Change SCMI smccc transport drivers to use platform data rather
> than private data for channel reference since it only stores platform
> data retrieved from the DT. Consequently the probe handler is replaced
> with a of_to_plat handler.
>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Patrice Chotard <patrice.chotard@foss.st.com>
> Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
> ---
> Changes since v1:
>   - No change. Patch re-send.
> ---
>   drivers/firmware/scmi/smccc_agent.c | 10 +++++-----
>   1 file changed, 5 insertions(+), 5 deletions(-)
>



Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>

Thanks
Patrick
diff mbox series

Patch

diff --git a/drivers/firmware/scmi/smccc_agent.c b/drivers/firmware/scmi/smccc_agent.c
index f185891e8f..f0477b91dc 100644
--- a/drivers/firmware/scmi/smccc_agent.c
+++ b/drivers/firmware/scmi/smccc_agent.c
@@ -32,7 +32,7 @@  struct scmi_smccc_channel {
 
 static int scmi_smccc_process_msg(struct udevice *dev, struct scmi_msg *msg)
 {
-	struct scmi_smccc_channel *chan = dev_get_priv(dev);
+	struct scmi_smccc_channel *chan = dev_get_plat(dev);
 	struct arm_smccc_res res;
 	int ret;
 
@@ -51,9 +51,9 @@  static int scmi_smccc_process_msg(struct udevice *dev, struct scmi_msg *msg)
 	return ret;
 }
 
-static int scmi_smccc_probe(struct udevice *dev)
+static int scmi_smccc_of_to_plat(struct udevice *dev)
 {
-	struct scmi_smccc_channel *chan = dev_get_priv(dev);
+	struct scmi_smccc_channel *chan = dev_get_plat(dev);
 	u32 func_id;
 	int ret;
 
@@ -86,7 +86,7 @@  U_BOOT_DRIVER(scmi_smccc) = {
 	.name		= "scmi-over-smccc",
 	.id		= UCLASS_SCMI_AGENT,
 	.of_match	= scmi_smccc_ids,
-	.priv_auto	= sizeof(struct scmi_smccc_channel),
-	.probe		= scmi_smccc_probe,
+	.plat_auto	= sizeof(struct scmi_smccc_channel),
+	.of_to_plat	= scmi_smccc_of_to_plat,
 	.ops		= &scmi_smccc_ops,
 };