mbox series

[v2,0/2] convert ifc binding to yaml and drop "simple-bus"

Message ID 20211015005707.1996-1-leoyang.li@nxp.com
Headers show
Series convert ifc binding to yaml and drop "simple-bus" | expand

Message

Leo Li Oct. 15, 2021, 12:57 a.m. UTC
Convert the ifc binding to yaml schema, in the mean while remove the
"simple-bus" compatible from the binding to make sure ifc device probes
before any of the child devices.  Update the driver accordingly.

DTS changes should be submitted after binding/driver changes are merged.

Changes in v2:
- Update endian property to type boolean
- Remove example subnodes that don't have yaml binding
- Spin DTS patches into a different series

Li Yang (2):
  dt-bindings: memory: fsl: convert ifc binding to yaml schema
  memory: fsl_ifc: populate child devices without relying on simple-bus

 .../memory-controllers/fsl/fsl,ifc.yaml       | 113 ++++++++++++++++++
 .../bindings/memory-controllers/fsl/ifc.txt   |  82 -------------
 drivers/memory/fsl_ifc.c                      |   7 ++
 3 files changed, 120 insertions(+), 82 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/memory-controllers/fsl/fsl,ifc.yaml
 delete mode 100644 Documentation/devicetree/bindings/memory-controllers/fsl/ifc.txt

Comments

Krzysztof Kozlowski Nov. 16, 2021, 10:35 a.m. UTC | #1
On 15/10/2021 02:57, Li Yang wrote:
> 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 | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/memory/fsl_ifc.c b/drivers/memory/fsl_ifc.c
> index d062c2f8250f..ef2092fa90d9 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,12 @@ static int fsl_ifc_ctrl_probe(struct platform_device *dev)
>  		}
>  	}
>  
> +	/* legacy dts may still use "simple-bus" compatible */
> +	ret = of_platform_populate(dev->dev.of_node, NULL, NULL,
> +					&dev->dev);
> +	if (ret)
> +		goto err_nandirq;
> +

This one does not apply. Please rebase.

Best regards,
Krzysztof