RE: [upstream-release] [PATCH net 2/4] fsl/fman: arm: call of_platform_populate() for arm64 platfrom
From: Madalin-Cristian Bucur <madalin.bucur@nxp.com>
Date: 2016-12-16 19:37:14
Also in:
lkml, netdev
From: Scott Wood Sent: Thursday, December 15, 2016 8:42 PM =20 On 12/15/2016 07:11 AM, Madalin Bucur wrote:quoted
From: Igal Liberman <redacted> Signed-off-by: Igal Liberman <redacted> --- drivers/net/ethernet/freescale/fman/fman.c | 10 ++++++++++ 1 file changed, 10 insertions(+)diff --git a/drivers/net/ethernet/freescale/fman/fman.cb/drivers/net/ethernet/freescale/fman/fman.cquoted
index dafd9e1..f36b4eb 100644--- a/drivers/net/ethernet/freescale/fman/fman.c +++ b/drivers/net/ethernet/freescale/fman/fman.c@@ -2868,6 +2868,16 @@ static struct fman *read_dts_node(structplatform_device *of_dev)quoted
fman->dev =3D &of_dev->dev; +#ifdef CONFIG_ARM64 + /* call of_platform_populate in order to probe sub-nodes on arm64 */ + err =3D of_platform_populate(fm_node, NULL, NULL, &of_dev->dev); + if (err) { + dev_err(&of_dev->dev, "%s: of_platform_populate() failed\n", + __func__); + goto fman_free; + } +#endif=20 Should we remove fsl,fman from the PPC of_device_ids[], so this doesn't need an ifdef? =20 Why is it #ifdef CONFIG_ARM64 rather than #ifndef CONFIG_PPC? =20 -Scott
Igal was working on adding ARM64 support when this patch was created, thus = the choice of #ifdef CONFIG_ARM64. Unifying this for PPC and ARM64 by always ca= lling of_platform_populate() sounds like the best approach. I would need to synch= ronize the introduction of this code with the removal of the fsl,fman entry from t= he of_device_ids[] array. Dave, Michael, Scott, is it ok to add to v2 of this patch set the patch tha= t removes the compatible "fsl,fman" from arch/powerpc/platforms/85xx/corenet_generic.= c? Thanks, Madalin