All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net v2 0/5] fsl/fman: fixes for ARM
@ 2016-12-19  9:22 ` Madalin Bucur
  0 siblings, 0 replies; 13+ messages in thread
From: Madalin Bucur @ 2016-12-19  9:22 UTC (permalink / raw)
  To: netdev; +Cc: linuxppc-dev, linux-kernel, davem, scott.wood, mpe

The patch set fixes advertised speeds for QSGMII interfaces, disables
A007273 erratum workaround on non-PowerPC platforms where it does not
apply, enables compilation on ARM64 and addresses a probing issue on
non PPC platforms.

Changes from v1: unifying probing on all supported platforms

Igal Liberman (1):
  fsl/fman: call of_platform_populate()

Madalin Bucur (4):
  fsl/fman: fix 1G support for QSGMII interfaces
  powerpc: remove fsl,fman from of_device_ids[]
  fsl/fman: A007273 only applies to PPC SoCs
  fsl/fman: enable compilation on ARM64

 arch/powerpc/platforms/85xx/corenet_generic.c |  3 ---
 drivers/net/ethernet/freescale/fman/Kconfig   |  2 +-
 drivers/net/ethernet/freescale/fman/fman.c    | 16 ++++++++++++++++
 drivers/net/ethernet/freescale/fman/mac.c     |  1 +
 4 files changed, 18 insertions(+), 4 deletions(-)

-- 
2.1.0

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH net v2 0/5] fsl/fman: fixes for ARM
@ 2016-12-19  9:22 ` Madalin Bucur
  0 siblings, 0 replies; 13+ messages in thread
From: Madalin Bucur @ 2016-12-19  9:22 UTC (permalink / raw)
  To: netdev; +Cc: scott.wood, linuxppc-dev, linux-kernel, davem

The patch set fixes advertised speeds for QSGMII interfaces, disables
A007273 erratum workaround on non-PowerPC platforms where it does not
apply, enables compilation on ARM64 and addresses a probing issue on
non PPC platforms.

Changes from v1: unifying probing on all supported platforms

Igal Liberman (1):
  fsl/fman: call of_platform_populate()

Madalin Bucur (4):
  fsl/fman: fix 1G support for QSGMII interfaces
  powerpc: remove fsl,fman from of_device_ids[]
  fsl/fman: A007273 only applies to PPC SoCs
  fsl/fman: enable compilation on ARM64

 arch/powerpc/platforms/85xx/corenet_generic.c |  3 ---
 drivers/net/ethernet/freescale/fman/Kconfig   |  2 +-
 drivers/net/ethernet/freescale/fman/fman.c    | 16 ++++++++++++++++
 drivers/net/ethernet/freescale/fman/mac.c     |  1 +
 4 files changed, 18 insertions(+), 4 deletions(-)

-- 
2.1.0

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH net v2 1/5] fsl/fman: fix 1G support for QSGMII interfaces
  2016-12-19  9:22 ` Madalin Bucur
@ 2016-12-19  9:22   ` Madalin Bucur
  -1 siblings, 0 replies; 13+ messages in thread
From: Madalin Bucur @ 2016-12-19  9:22 UTC (permalink / raw)
  To: netdev; +Cc: linuxppc-dev, linux-kernel, davem, scott.wood, mpe

QSGMII ports were not advertising 1G speed.

Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>
Reviewed-by: Camelia Groza <camelia.groza@nxp.com>
---
 drivers/net/ethernet/freescale/fman/mac.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/freescale/fman/mac.c b/drivers/net/ethernet/freescale/fman/mac.c
index 69ca42c..0b31f85 100644
--- a/drivers/net/ethernet/freescale/fman/mac.c
+++ b/drivers/net/ethernet/freescale/fman/mac.c
@@ -594,6 +594,7 @@ static const u16 phy2speed[] = {
 	[PHY_INTERFACE_MODE_RGMII_RXID]	= SPEED_1000,
 	[PHY_INTERFACE_MODE_RGMII_TXID]	= SPEED_1000,
 	[PHY_INTERFACE_MODE_RTBI]		= SPEED_1000,
+	[PHY_INTERFACE_MODE_QSGMII]		= SPEED_1000,
 	[PHY_INTERFACE_MODE_XGMII]		= SPEED_10000
 };
 
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH net v2 1/5] fsl/fman: fix 1G support for QSGMII interfaces
@ 2016-12-19  9:22   ` Madalin Bucur
  0 siblings, 0 replies; 13+ messages in thread
From: Madalin Bucur @ 2016-12-19  9:22 UTC (permalink / raw)
  To: netdev; +Cc: scott.wood, linuxppc-dev, linux-kernel, davem

QSGMII ports were not advertising 1G speed.

Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>
Reviewed-by: Camelia Groza <camelia.groza@nxp.com>
---
 drivers/net/ethernet/freescale/fman/mac.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/freescale/fman/mac.c b/drivers/net/ethernet/freescale/fman/mac.c
index 69ca42c..0b31f85 100644
--- a/drivers/net/ethernet/freescale/fman/mac.c
+++ b/drivers/net/ethernet/freescale/fman/mac.c
@@ -594,6 +594,7 @@ static const u16 phy2speed[] = {
 	[PHY_INTERFACE_MODE_RGMII_RXID]	= SPEED_1000,
 	[PHY_INTERFACE_MODE_RGMII_TXID]	= SPEED_1000,
 	[PHY_INTERFACE_MODE_RTBI]		= SPEED_1000,
+	[PHY_INTERFACE_MODE_QSGMII]		= SPEED_1000,
 	[PHY_INTERFACE_MODE_XGMII]		= SPEED_10000
 };
 
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH net v2 2/5] powerpc: remove fsl,fman from of_device_ids[]
  2016-12-19  9:22 ` Madalin Bucur
@ 2016-12-19  9:22   ` Madalin Bucur
  -1 siblings, 0 replies; 13+ messages in thread
From: Madalin Bucur @ 2016-12-19  9:22 UTC (permalink / raw)
  To: netdev; +Cc: linuxppc-dev, linux-kernel, davem, scott.wood, mpe

The fsl/fman drivers will use of_platform_populate() on all
supported platforms.

Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>
---
 arch/powerpc/platforms/85xx/corenet_generic.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/arch/powerpc/platforms/85xx/corenet_generic.c b/arch/powerpc/platforms/85xx/corenet_generic.c
index 1179115..824b7f1 100644
--- a/arch/powerpc/platforms/85xx/corenet_generic.c
+++ b/arch/powerpc/platforms/85xx/corenet_generic.c
@@ -117,9 +117,6 @@ static const struct of_device_id of_device_ids[] = {
 	{
 		.compatible	= "fsl,qe",
 	},
-	{
-		.compatible    = "fsl,fman",
-	},
 	/* The following two are for the Freescale hypervisor */
 	{
 		.name		= "hypervisor",
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH net v2 2/5] powerpc: remove fsl,fman from of_device_ids[]
@ 2016-12-19  9:22   ` Madalin Bucur
  0 siblings, 0 replies; 13+ messages in thread
From: Madalin Bucur @ 2016-12-19  9:22 UTC (permalink / raw)
  To: netdev; +Cc: scott.wood, linuxppc-dev, linux-kernel, davem

The fsl/fman drivers will use of_platform_populate() on all
supported platforms.

Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>
---
 arch/powerpc/platforms/85xx/corenet_generic.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/arch/powerpc/platforms/85xx/corenet_generic.c b/arch/powerpc/platforms/85xx/corenet_generic.c
index 1179115..824b7f1 100644
--- a/arch/powerpc/platforms/85xx/corenet_generic.c
+++ b/arch/powerpc/platforms/85xx/corenet_generic.c
@@ -117,9 +117,6 @@ static const struct of_device_id of_device_ids[] = {
 	{
 		.compatible	= "fsl,qe",
 	},
-	{
-		.compatible    = "fsl,fman",
-	},
 	/* The following two are for the Freescale hypervisor */
 	{
 		.name		= "hypervisor",
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH net v2 3/5] fsl/fman: call of_platform_populate()
  2016-12-19  9:22 ` Madalin Bucur
                   ` (2 preceding siblings ...)
  (?)
@ 2016-12-19  9:22 ` Madalin Bucur
  -1 siblings, 0 replies; 13+ messages in thread
From: Madalin Bucur @ 2016-12-19  9:22 UTC (permalink / raw)
  To: netdev; +Cc: linuxppc-dev, linux-kernel, davem, scott.wood, mpe

From: Igal Liberman <igal.liberman@freescale.com>

Call of_platform_populate() to probe the FMan sub-nodes.

Signed-off-by: Igal Liberman <igal.liberman@freescale.com>
Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>
---
 drivers/net/ethernet/freescale/fman/fman.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/net/ethernet/freescale/fman/fman.c b/drivers/net/ethernet/freescale/fman/fman.c
index dafd9e1..0b7f711 100644
--- a/drivers/net/ethernet/freescale/fman/fman.c
+++ b/drivers/net/ethernet/freescale/fman/fman.c
@@ -2868,6 +2868,14 @@ static struct fman *read_dts_node(struct platform_device *of_dev)
 
 	fman->dev = &of_dev->dev;
 
+	/* call of_platform_populate in order to probe sub-nodes on arm64 */
+	err = 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;
+	}
+
 	return fman;
 
 fman_node_put:
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH net v2 4/5] fsl/fman: A007273 only applies to PPC SoCs
  2016-12-19  9:22 ` Madalin Bucur
                   ` (3 preceding siblings ...)
  (?)
@ 2016-12-19  9:22 ` Madalin Bucur
  -1 siblings, 0 replies; 13+ messages in thread
From: Madalin Bucur @ 2016-12-19  9:22 UTC (permalink / raw)
  To: netdev; +Cc: linuxppc-dev, linux-kernel, davem, scott.wood, mpe

Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>
Reviewed-by: Camelia Groza <camelia.groza@nxp.com>
---
 drivers/net/ethernet/freescale/fman/fman.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/net/ethernet/freescale/fman/fman.c b/drivers/net/ethernet/freescale/fman/fman.c
index 0b7f711..003b86d 100644
--- a/drivers/net/ethernet/freescale/fman/fman.c
+++ b/drivers/net/ethernet/freescale/fman/fman.c
@@ -1890,6 +1890,7 @@ static int fman_reset(struct fman *fman)
 
 		goto _return;
 	} else {
+#ifdef CONFIG_PPC
 		struct device_node *guts_node;
 		struct ccsr_guts __iomem *guts_regs;
 		u32 devdisr2, reg;
@@ -1921,6 +1922,7 @@ static int fman_reset(struct fman *fman)
 
 		/* Enable all MACs */
 		iowrite32be(reg, &guts_regs->devdisr2);
+#endif
 
 		/* Perform FMan reset */
 		iowrite32be(FPM_RSTC_FM_RESET, &fman->fpm_regs->fm_rstc);
@@ -1932,25 +1934,31 @@ static int fman_reset(struct fman *fman)
 		} while (((ioread32be(&fman->fpm_regs->fm_rstc)) &
 			 FPM_RSTC_FM_RESET) && --count);
 		if (count == 0) {
+#ifdef CONFIG_PPC
 			iounmap(guts_regs);
 			of_node_put(guts_node);
+#endif
 			err = -EBUSY;
 			goto _return;
 		}
+#ifdef CONFIG_PPC
 
 		/* Restore devdisr2 value */
 		iowrite32be(devdisr2, &guts_regs->devdisr2);
 
 		iounmap(guts_regs);
 		of_node_put(guts_node);
+#endif
 
 		goto _return;
 
+#ifdef CONFIG_PPC
 guts_regs:
 		of_node_put(guts_node);
 guts_node:
 		dev_dbg(fman->dev, "%s: Didn't perform FManV3 reset due to Errata A007273!\n",
 			__func__);
+#endif
 	}
 _return:
 	return err;
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH net v2 5/5] fsl/fman: enable compilation on ARM64
  2016-12-19  9:22 ` Madalin Bucur
                   ` (4 preceding siblings ...)
  (?)
@ 2016-12-19  9:22 ` Madalin Bucur
  -1 siblings, 0 replies; 13+ messages in thread
From: Madalin Bucur @ 2016-12-19  9:22 UTC (permalink / raw)
  To: netdev; +Cc: linuxppc-dev, linux-kernel, davem, scott.wood, mpe

Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>
---
 drivers/net/ethernet/freescale/fman/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/freescale/fman/Kconfig b/drivers/net/ethernet/freescale/fman/Kconfig
index 79b7c84..dc0850b 100644
--- a/drivers/net/ethernet/freescale/fman/Kconfig
+++ b/drivers/net/ethernet/freescale/fman/Kconfig
@@ -1,6 +1,6 @@
 config FSL_FMAN
 	tristate "FMan support"
-	depends on FSL_SOC || COMPILE_TEST
+	depends on FSL_SOC || ARCH_LAYERSCAPE || COMPILE_TEST
 	select GENERIC_ALLOCATOR
 	select PHYLIB
 	default n
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH net v2 2/5] powerpc: remove fsl,fman from of_device_ids[]
  2016-12-19  9:22   ` Madalin Bucur
  (?)
@ 2016-12-19 15:37   ` David Miller
  2016-12-19 16:07       ` Madalin-Cristian Bucur
  -1 siblings, 1 reply; 13+ messages in thread
From: David Miller @ 2016-12-19 15:37 UTC (permalink / raw)
  To: madalin.bucur; +Cc: netdev, linuxppc-dev, linux-kernel, scott.wood, mpe

From: Madalin Bucur <madalin.bucur@nxp.com>
Date: Mon, 19 Dec 2016 11:22:20 +0200

> The fsl/fman drivers will use of_platform_populate() on all
> supported platforms.
> 
> Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>

It seems that this creates a failure point between patches #2 and
#3.  If the cases handled by this "fsl,fman" entry are only afterwards
covered by the of_platform_populate() code added in patch #3 then you
cannot split these two changes up like this.

The two changes must be done at the same time, otherwise probing will
fail for some people between patches #2 and #3.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: [PATCH net v2 2/5] powerpc: remove fsl,fman from of_device_ids[]
  2016-12-19 15:37   ` David Miller
  2016-12-19 16:07       ` Madalin-Cristian Bucur
@ 2016-12-19 16:07       ` Madalin-Cristian Bucur
  0 siblings, 0 replies; 13+ messages in thread
From: Madalin-Cristian Bucur @ 2016-12-19 16:07 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, linuxppc-dev, linux-kernel, Scott Wood, mpe

> From: David Miller [mailto:davem@davemloft.net]
> Sent: Monday, December 19, 2016 5:37 PM
> 
> From: Madalin Bucur <madalin.bucur@nxp.com>
> Date: Mon, 19 Dec 2016 11:22:20 +0200
> 
> > The fsl/fman drivers will use of_platform_populate() on all
> > supported platforms.
> >
> > Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>
> 
> It seems that this creates a failure point between patches #2 and
> #3.  If the cases handled by this "fsl,fman" entry are only afterwards
> covered by the of_platform_populate() code added in patch #3 then you
> cannot split these two changes up like this.
> 
> The two changes must be done at the same time, otherwise probing will
> fail for some people between patches #2 and #3.

You are right, that will happen. I was not convinced these need to be
merged due to the different places they touch. I'll send a v3.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: [PATCH net v2 2/5] powerpc: remove fsl,fman from of_device_ids[]
@ 2016-12-19 16:07       ` Madalin-Cristian Bucur
  0 siblings, 0 replies; 13+ messages in thread
From: Madalin-Cristian Bucur @ 2016-12-19 16:07 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, linuxppc-dev, linux-kernel, Scott Wood

> From: David Miller [mailto:davem@davemloft.net]
> Sent: Monday, December 19, 2016 5:37 PM
> 
> From: Madalin Bucur <madalin.bucur@nxp.com>
> Date: Mon, 19 Dec 2016 11:22:20 +0200
> 
> > The fsl/fman drivers will use of_platform_populate() on all
> > supported platforms.
> >
> > Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>
> 
> It seems that this creates a failure point between patches #2 and
> #3.  If the cases handled by this "fsl,fman" entry are only afterwards
> covered by the of_platform_populate() code added in patch #3 then you
> cannot split these two changes up like this.
> 
> The two changes must be done at the same time, otherwise probing will
> fail for some people between patches #2 and #3.

You are right, that will happen. I was not convinced these need to be
merged due to the different places they touch. I'll send a v3.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: [PATCH net v2 2/5] powerpc: remove fsl,fman from of_device_ids[]
@ 2016-12-19 16:07       ` Madalin-Cristian Bucur
  0 siblings, 0 replies; 13+ messages in thread
From: Madalin-Cristian Bucur @ 2016-12-19 16:07 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, linuxppc-dev, linux-kernel, Scott Wood, mpe

> From: David Miller [mailto:davem@davemloft.net]
> Sent: Monday, December 19, 2016 5:37 PM
>=20
> From: Madalin Bucur <madalin.bucur@nxp.com>
> Date: Mon, 19 Dec 2016 11:22:20 +0200
>=20
> > The fsl/fman drivers will use of_platform_populate() on all
> > supported platforms.
> >
> > Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>
>=20
> It seems that this creates a failure point between patches #2 and
> #3.  If the cases handled by this "fsl,fman" entry are only afterwards
> covered by the of_platform_populate() code added in patch #3 then you
> cannot split these two changes up like this.
>=20
> The two changes must be done at the same time, otherwise probing will
> fail for some people between patches #2 and #3.

You are right, that will happen. I was not convinced these need to be
merged due to the different places they touch. I'll send a v3.

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2016-12-19 16:40 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-19  9:22 [PATCH net v2 0/5] fsl/fman: fixes for ARM Madalin Bucur
2016-12-19  9:22 ` Madalin Bucur
2016-12-19  9:22 ` [PATCH net v2 1/5] fsl/fman: fix 1G support for QSGMII interfaces Madalin Bucur
2016-12-19  9:22   ` Madalin Bucur
2016-12-19  9:22 ` [PATCH net v2 2/5] powerpc: remove fsl,fman from of_device_ids[] Madalin Bucur
2016-12-19  9:22   ` Madalin Bucur
2016-12-19 15:37   ` David Miller
2016-12-19 16:07     ` Madalin-Cristian Bucur
2016-12-19 16:07       ` Madalin-Cristian Bucur
2016-12-19 16:07       ` Madalin-Cristian Bucur
2016-12-19  9:22 ` [PATCH net v2 3/5] fsl/fman: call of_platform_populate() Madalin Bucur
2016-12-19  9:22 ` [PATCH net v2 4/5] fsl/fman: A007273 only applies to PPC SoCs Madalin Bucur
2016-12-19  9:22 ` [PATCH net v2 5/5] fsl/fman: enable compilation on ARM64 Madalin Bucur

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.