From: Li Yang <leoyang.li@nxp.com>
To: Shawn Guo <shawnguo@kernel.org>, Rob Herring <robh+dt@kernel.org>,
devicetree@vger.kernel.org, Krzysztof Kozlowski <krzk@kernel.org>,
linux-arm-kernel@lists.infradead.org,
Michael Ellerman <mpe@ellerman.id.au>,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Cc: Li Yang <leoyang.li@nxp.com>
Subject: [PATCH 2/5] memory: fsl_ifc: populate child devices without relying on simple-bus
Date: Thu, 30 Sep 2021 19:09:21 -0500 [thread overview]
Message-ID: <20211001000924.15421-3-leoyang.li@nxp.com> (raw)
In-Reply-To: <20211001000924.15421-1-leoyang.li@nxp.com>
After we update the binding to not use simple-bus compatible for the
controller, we need the driver to populate the child devices explicitly.
Signed-off-by: Li Yang <leoyang.li@nxp.com>
---
drivers/memory/fsl_ifc.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/memory/fsl_ifc.c b/drivers/memory/fsl_ifc.c
index d062c2f8250f..251d713cd50b 100644
--- a/drivers/memory/fsl_ifc.c
+++ b/drivers/memory/fsl_ifc.c
@@ -88,6 +88,7 @@ static int fsl_ifc_ctrl_remove(struct platform_device *dev)
{
struct fsl_ifc_ctrl *ctrl = dev_get_drvdata(&dev->dev);
+ of_platform_depopulate(&dev->dev);
free_irq(ctrl->nand_irq, ctrl);
free_irq(ctrl->irq, ctrl);
@@ -285,6 +286,14 @@ static int fsl_ifc_ctrl_probe(struct platform_device *dev)
}
}
+ /* legacy dts may still use "simple-bus" compatible */
+ if (!of_device_is_compatible(dev->dev.of_node, "simple-bus")) {
+ ret = of_platform_populate(dev->dev.of_node, NULL, NULL,
+ &dev->dev);
+ if (ret)
+ goto err_nandirq;
+ }
+
return 0;
err_nandirq:
--
2.25.1
next prev parent reply other threads:[~2021-10-01 0:16 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-01 0:09 [PATCH 0/5] convert ifc binding to yaml and drop "simple-bus" Li Yang
2021-10-01 0:09 ` [PATCH 1/5] dt-bindings: memory: fsl: convert ifc binding to yaml schema Li Yang
2021-10-01 9:59 ` Krzysztof Kozlowski
2021-10-01 16:17 ` Li Yang
2021-10-04 9:31 ` Krzysztof Kozlowski
2021-10-08 21:50 ` Li Yang
2021-10-14 12:46 ` Rob Herring
2021-10-01 13:16 ` Rob Herring
2021-10-01 16:29 ` Li Yang
2021-10-01 16:35 ` Rob Herring
2021-10-01 0:09 ` Li Yang [this message]
2021-10-04 16:27 ` [PATCH 2/5] memory: fsl_ifc: populate child devices without relying on simple-bus Rob Herring
2021-10-09 3:12 ` Li Yang
2021-10-01 0:09 ` [PATCH 3/5] ARM: dts: ls1021a: remove "simple-bus" compatible from ifc node Li Yang
2021-10-01 0:09 ` [PATCH 4/5] arm64: dts: " Li Yang
2021-10-01 0:09 ` [PATCH 5/5] powerpc/mpc85xx: " Li Yang
2021-10-01 9:45 ` [PATCH 0/5] convert ifc binding to yaml and drop "simple-bus" Krzysztof Kozlowski
2021-10-01 19:51 ` Li Yang
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=20211001000924.15421-3-leoyang.li@nxp.com \
--to=leoyang.li@nxp.com \
--cc=devicetree@vger.kernel.org \
--cc=krzk@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=robh+dt@kernel.org \
--cc=shawnguo@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).