mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mahesh Rao <mahesh.rao@intel.com>
To: Moritz Fischer <mdf@kernel.org>, Wu Hao <hao.wu@intel.com>,
	 Xu Yilun <yilun.xu@intel.com>, Tom Rix <trix@redhat.com>,
	 Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	 Conor Dooley <conor+dt@kernel.org>,
	Dinh Nguyen <dinguyen@kernel.org>,
	 Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: linux-fpga@vger.kernel.org, devicetree@vger.kernel.org,
	 linux-kernel@vger.kernel.org, Mahesh Rao <mahesh.rao@altera.com>,
	 Mahesh Rao <mahesh.rao@intel.com>
Subject: [PATCH 3/3] firmware: stratix10-svc: Add of_platform_default_populate()
Date: Wed, 22 Jan 2025 13:58:45 +0800	[thread overview]
Message-ID: <20250122-socfpga_sip_svc_misc-v1-3-cbdcd034ae34@intel.com> (raw)
In-Reply-To: <20250122-socfpga_sip_svc_misc-v1-0-cbdcd034ae34@intel.com>

Add of_platform_default_populate() to stratix10-svc
driver as the firmware/svc node was moved out of soc.
This fixes the failed probing of child drivers of
svc node.

Fixes: 23c3ebed382a ("arm64: dts: socfpga: agilex: move firmware out of soc node")

Signed-off-by: Mahesh Rao <mahesh.rao@intel.com>
---
 drivers/firmware/stratix10-svc.c | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/drivers/firmware/stratix10-svc.c b/drivers/firmware/stratix10-svc.c
index c5c78b869561b0c1e9602823ad1f501e98e3ce51..15a7207f7753dcd4e94da4aa9a6162fedb577fe9 100644
--- a/drivers/firmware/stratix10-svc.c
+++ b/drivers/firmware/stratix10-svc.c
@@ -1227,13 +1227,19 @@ static int stratix10_svc_drv_probe(struct platform_device *pdev)
 	if (!svc->intel_svc_fcs) {
 		dev_err(dev, "failed to allocate %s device\n", INTEL_FCS);
 		ret = -ENOMEM;
-		goto err_unregister_dev;
+		goto err_unregister_rsu_dev;
 	}
 
 	ret = platform_device_add(svc->intel_svc_fcs);
 	if (ret) {
 		platform_device_put(svc->intel_svc_fcs);
-		goto err_unregister_dev;
+		goto err_unregister_rsu_dev;
+	}
+
+	ret = of_platform_default_populate(dev_of_node(dev), NULL, dev);
+	if (ret < 0) {
+		of_platform_depopulate(dev);
+		goto err_unregister_fcs_dev;
 	}
 
 	dev_set_drvdata(dev, svc);
@@ -1242,7 +1248,9 @@ static int stratix10_svc_drv_probe(struct platform_device *pdev)
 
 	return 0;
 
-err_unregister_dev:
+err_unregister_fcs_dev:
+	platform_device_unregister(svc->intel_svc_fcs);
+err_unregister_rsu_dev:
 	platform_device_unregister(svc->stratix10_svc_rsu);
 err_free_kfifo:
 	kfifo_free(&controller->svc_fifo);

-- 
2.35.3


  parent reply	other threads:[~2025-01-22  5:59 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-22  5:58 [PATCH 0/3] stratix10: miscellaneous changes and fix for child driver probing Mahesh Rao
2025-01-22  5:58 ` [PATCH 1/3] dt-bindings: fpga: stratix10: Convert to json-schema Mahesh Rao
2025-01-22 18:35   ` Conor Dooley
2025-01-27 16:31     ` Mahesh Rao
2025-01-22  5:58 ` [PATCH 2/3] dt-bindings: firmware: " Mahesh Rao
2025-01-22  7:42   ` kernel test robot
2025-01-22 18:40   ` Conor Dooley
2025-01-27 17:07     ` Mahesh Rao
2025-01-27 17:50       ` Conor Dooley
2025-01-22  5:58 ` Mahesh Rao [this message]
2025-01-23  7:26   ` [PATCH 3/3] firmware: stratix10-svc: Add of_platform_default_populate() Krzysztof Kozlowski
2025-01-29  8:27     ` Mahesh Rao
2025-01-26  8:28   ` Xu Yilun
2025-01-29 18:01     ` Mahesh Rao
2025-02-06  6:23       ` Xu Yilun

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=20250122-socfpga_sip_svc_misc-v1-3-cbdcd034ae34@intel.com \
    --to=mahesh.rao@intel.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dinguyen@kernel.org \
    --cc=hao.wu@intel.com \
    --cc=krzk+dt@kernel.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-fpga@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mahesh.rao@altera.com \
    --cc=mdf@kernel.org \
    --cc=robh@kernel.org \
    --cc=trix@redhat.com \
    --cc=yilun.xu@intel.com \
    /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®