linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net v4 0/4] fsl/fman: fixes for ARM
@ 2016-12-19 20:42 Madalin Bucur
  2016-12-19 20:42 ` [PATCH net v4 1/4] fsl/fman: fix 1G support for QSGMII interfaces Madalin Bucur
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Madalin Bucur @ 2016-12-19 20:42 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 v3: removed redundant comment, added ack by Scott
Changes from v2: merged fsl/fman changes to avoid a point of failure
Changes from v1: unifying probing on all supported platforms

Madalin Bucur (4):
  fsl/fman: fix 1G support for QSGMII interfaces
  powerpc: fsl/fman: 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    | 15 +++++++++++++++
 drivers/net/ethernet/freescale/fman/mac.c     |  1 +
 4 files changed, 17 insertions(+), 4 deletions(-)

-- 
2.1.0

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

* [PATCH net v4 1/4] fsl/fman: fix 1G support for QSGMII interfaces
  2016-12-19 20:42 [PATCH net v4 0/4] fsl/fman: fixes for ARM Madalin Bucur
@ 2016-12-19 20:42 ` Madalin Bucur
  2016-12-19 20:42 ` [PATCH net v4 2/4] powerpc: fsl/fman: remove fsl,fman from of_device_ids[] Madalin Bucur
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Madalin Bucur @ 2016-12-19 20:42 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] 6+ messages in thread

* [PATCH net v4 2/4] powerpc: fsl/fman: remove fsl,fman from of_device_ids[]
  2016-12-19 20:42 [PATCH net v4 0/4] fsl/fman: fixes for ARM Madalin Bucur
  2016-12-19 20:42 ` [PATCH net v4 1/4] fsl/fman: fix 1G support for QSGMII interfaces Madalin Bucur
@ 2016-12-19 20:42 ` Madalin Bucur
  2016-12-19 20:42 ` [PATCH net v4 3/4] fsl/fman: A007273 only applies to PPC SoCs Madalin Bucur
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Madalin Bucur @ 2016-12-19 20:42 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. 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>
Acked-by: Scott Wood <oss@buserror.net>
---
 arch/powerpc/platforms/85xx/corenet_generic.c | 3 ---
 drivers/net/ethernet/freescale/fman/fman.c    | 7 +++++++
 2 files changed, 7 insertions(+), 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",
diff --git a/drivers/net/ethernet/freescale/fman/fman.c b/drivers/net/ethernet/freescale/fman/fman.c
index dafd9e1..4b83263 100644
--- a/drivers/net/ethernet/freescale/fman/fman.c
+++ b/drivers/net/ethernet/freescale/fman/fman.c
@@ -2868,6 +2868,13 @@ static struct fman *read_dts_node(struct platform_device *of_dev)
 
 	fman->dev = &of_dev->dev;
 
+	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] 6+ messages in thread

* [PATCH net v4 3/4] fsl/fman: A007273 only applies to PPC SoCs
  2016-12-19 20:42 [PATCH net v4 0/4] fsl/fman: fixes for ARM Madalin Bucur
  2016-12-19 20:42 ` [PATCH net v4 1/4] fsl/fman: fix 1G support for QSGMII interfaces Madalin Bucur
  2016-12-19 20:42 ` [PATCH net v4 2/4] powerpc: fsl/fman: remove fsl,fman from of_device_ids[] Madalin Bucur
@ 2016-12-19 20:42 ` Madalin Bucur
  2016-12-19 20:42 ` [PATCH net v4 4/4] fsl/fman: enable compilation on ARM64 Madalin Bucur
  2016-12-20 19:00 ` [PATCH net v4 0/4] fsl/fman: fixes for ARM David Miller
  4 siblings, 0 replies; 6+ messages in thread
From: Madalin Bucur @ 2016-12-19 20:42 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 4b83263..f60845f 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] 6+ messages in thread

* [PATCH net v4 4/4] fsl/fman: enable compilation on ARM64
  2016-12-19 20:42 [PATCH net v4 0/4] fsl/fman: fixes for ARM Madalin Bucur
                   ` (2 preceding siblings ...)
  2016-12-19 20:42 ` [PATCH net v4 3/4] fsl/fman: A007273 only applies to PPC SoCs Madalin Bucur
@ 2016-12-19 20:42 ` Madalin Bucur
  2016-12-20 19:00 ` [PATCH net v4 0/4] fsl/fman: fixes for ARM David Miller
  4 siblings, 0 replies; 6+ messages in thread
From: Madalin Bucur @ 2016-12-19 20:42 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] 6+ messages in thread

* Re: [PATCH net v4 0/4] fsl/fman: fixes for ARM
  2016-12-19 20:42 [PATCH net v4 0/4] fsl/fman: fixes for ARM Madalin Bucur
                   ` (3 preceding siblings ...)
  2016-12-19 20:42 ` [PATCH net v4 4/4] fsl/fman: enable compilation on ARM64 Madalin Bucur
@ 2016-12-20 19:00 ` David Miller
  4 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2016-12-20 19:00 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 22:42:42 +0200

> 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 v3: removed redundant comment, added ack by Scott
> Changes from v2: merged fsl/fman changes to avoid a point of failure
> Changes from v1: unifying probing on all supported platforms

Series applied, thanks.

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

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

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-19 20:42 [PATCH net v4 0/4] fsl/fman: fixes for ARM Madalin Bucur
2016-12-19 20:42 ` [PATCH net v4 1/4] fsl/fman: fix 1G support for QSGMII interfaces Madalin Bucur
2016-12-19 20:42 ` [PATCH net v4 2/4] powerpc: fsl/fman: remove fsl,fman from of_device_ids[] Madalin Bucur
2016-12-19 20:42 ` [PATCH net v4 3/4] fsl/fman: A007273 only applies to PPC SoCs Madalin Bucur
2016-12-19 20:42 ` [PATCH net v4 4/4] fsl/fman: enable compilation on ARM64 Madalin Bucur
2016-12-20 19:00 ` [PATCH net v4 0/4] fsl/fman: fixes for ARM David Miller

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).