Skip to contentSkip to conversation

Revert "ARM: imx: add FEC sleep mode callback function"

PATCH Applied Fabio Estevam 3 participants 5 messages Jan 7, 2015 – Jan 9, 2015

Subsystems (6)
lore
Share & tools
lore

Fabio Estevam

author reviewer
#0 lore raw

PATCH 1/2 Revert "ARM: imx: add FEC sleep mode callback function"

From: Fabio Estevam <[email protected]>

i.MX platform maintainer Shawn Guo is not happy with the such commit as explained below [1]:

"The GPR difference between SoCs can be encoded in device tree as well. It's pointless to repeat the same code pattern for every single platform, that need to set up GPR bits for enabling magic packet wake up, while the only difference is the register and bit offset.

The platform code will become quite messy and unmaintainable if every device driver dump their GPR register setup code into platform.

Sorry, but it's NACK from me."

This reverts commit 456062b3ec6f5b9 ("ARM: imx: add FEC sleep mode callback function").

[1] http://www.spinics.net/lists/netdev/msg310922.html

---
 arch/arm/mach-imx/mach-imx6q.c  | 41 +--------------------------------
 arch/arm/mach-imx/mach-imx6sx.c | 50 -----------------------------------------
 2 files changed, 1 insertion(+), 90 deletions(-)
arch/arm/mach-imx/mach-imx6q.c +1 -40
index 2f76168..5057d61 100644
@@ -31,8 +31,6 @@
 #include <linux/micrel_phy.h>
 #include <linux/mfd/syscon.h>
 #include <linux/mfd/syscon/imx6q-iomuxc-gpr.h>
-#include <linux/fec.h>
-#include <linux/netdevice.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 #include <asm/system_misc.h>
@@ -41,35 +39,6 @@
 #include "cpuidle.h"
 #include "hardware.h"
 
-static struct fec_platform_data fec_pdata;
-
-static void imx6q_fec_sleep_enable(int enabled)
-{
-	struct regmap *gpr;
-
-	gpr = syscon_regmap_lookup_by_compatible("fsl,imx6q-iomuxc-gpr");
-	if (!IS_ERR(gpr)) {
-		if (enabled)
-			regmap_update_bits(gpr, IOMUXC_GPR13,
-					   IMX6Q_GPR13_ENET_STOP_REQ,
-					   IMX6Q_GPR13_ENET_STOP_REQ);
-
-		else
-			regmap_update_bits(gpr, IOMUXC_GPR13,
-					   IMX6Q_GPR13_ENET_STOP_REQ, 0);
-	} else
-		pr_err("failed to find fsl,imx6q-iomux-gpr regmap\n");
-}
-
-static void __init imx6q_enet_plt_init(void)
-{
-	struct device_node *np;
-
-	np = of_find_node_by_path("/soc/aips-bus@02100000/ethernet@02188000");
-	if (np && of_get_property(np, "fsl,magic-packet", NULL))
-		fec_pdata.sleep_mode_enable = imx6q_fec_sleep_enable;
-}
-
 /* For imx6q sabrelite board: set KSZ9021RN RGMII pad skew */
 static int ksz9021rn_phy_fixup(struct phy_device *phydev)
 {
@@ -292,12 +261,6 @@ static void __init imx6q_axi_init(void)
 	}
 }
 
-/* Add auxdata to pass platform data */
-static const struct of_dev_auxdata imx6q_auxdata_lookup[] __initconst = {
-	OF_DEV_AUXDATA("fsl,imx6q-fec", 0x02188000, NULL, &fec_pdata),
-	{ /* sentinel */ }
-};
-
 static void __init imx6q_init_machine(void)
 {
 	struct device *parent;
@@ -311,13 +274,11 @@ static void __init imx6q_init_machine(void)
 
 	imx6q_enet_phy_init();
 
-	of_platform_populate(NULL, of_default_bus_match_table,
-			     imx6q_auxdata_lookup, parent);
+	of_platform_populate(NULL, of_default_bus_match_table, NULL, parent);
 
 	imx_anatop_init();
 	cpu_is_imx6q() ?  imx6q_pm_init() : imx6dl_pm_init();
 	imx6q_1588_init();
-	imx6q_enet_plt_init();
 	imx6q_axi_init();
 }
 
arch/arm/mach-imx/mach-imx6sx.c +0 -50

62 lines not on this page · raw message

Signature · 1 line
1.9.1
author reviewer
#1 lore raw

PATCH 2/2 Revert "ARM: dts: imx6qdl: enable FEC magic-packet feature"

From: Fabio Estevam <[email protected]>

As 456062b3ec6f ("ARM: imx: add FEC sleep mode callback function") has been reverted, also revert the dts part.

This reverts commit 07b4d2dda0c00f56248 ("ARM: dts: imx6qdl: enable FEC magic-packet feature").

---
 arch/arm/boot/dts/imx6qdl-sabreauto.dtsi | 1 -
 arch/arm/boot/dts/imx6qdl-sabresd.dtsi   | 1 -
 2 files changed, 2 deletions(-)
arch/arm/boot/dts/imx6qdl-sabreauto.dtsi +0 -1
index 327d362f..009abd6 100644
@@ -67,7 +67,6 @@
 	phy-mode = "rgmii";
 	interrupts-extended = <&gpio1 6 IRQ_TYPE_LEVEL_HIGH>,
 			      <&intc 0 119 IRQ_TYPE_LEVEL_HIGH>;
-	fsl,magic-packet;
 	status = "okay";
 };
 
arch/arm/boot/dts/imx6qdl-sabresd.dtsi +0 -1
index 6bfd0bc..f1cd214 100644
@@ -160,7 +160,6 @@
 	pinctrl-0 = <&pinctrl_enet>;
 	phy-mode = "rgmii";
 	phy-reset-gpios = <&gpio1 25 0>;
-	fsl,magic-packet;
 	status = "okay";
 };
 
Signature · 1 line
1.9.1
maintainer Applied
#2 lore raw

Re: [PATCH net-next 2/2] Revert "ARM: dts: imx6qdl: enable FEC magic-packet feature"

From: Fabio Estevam <[email protected]>
Date: Wed, 7 Jan 2015 10:39:53 -0200

Quoted 9 lines

From: Fabio Estevam <[email protected]>

As 456062b3ec6f ("ARM: imx: add FEC sleep mode callback function") has been reverted, also revert the dts part.

This reverts commit 07b4d2dda0c00f56248 ("ARM: dts: imx6qdl: enable FEC magic-packet feature").

Applied.

Acked-by on v1 1/2
#3 lore raw
In reply to Fabio Estevam
Quoted 13 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

i.MX platform maintainer Shawn Guo is not happy with the such commit as explained below [1]:

"The GPR difference between SoCs can be encoded in device tree as well. It's pointless to repeat the same code pattern for every single platform, that need to set up GPR bits for enabling magic packet wake up, while the only difference is the register and bit offset.

The platform code will become quite messy and unmaintainable if every device driver dump their GPR register setup code into platform.

Quoted 8 lines

Sorry, but it's NACK from me."

This reverts commit 456062b3ec6f5b9 ("ARM: imx: add FEC sleep mode callback function").

[1] http://www.spinics.net/lists/netdev/msg310922.html

Thanks, Fabio. For both patches,

maintainer Applied
#4 lore raw
In reply to Fabio Estevam

From: Fabio Estevam <[email protected]>
Date: Wed, 7 Jan 2015 10:39:52 -0200

Quoted 13 lines

From: Fabio Estevam <[email protected]>

i.MX platform maintainer Shawn Guo is not happy with the such commit as explained below [1]:

"The GPR difference between SoCs can be encoded in device tree as well. It's pointless to repeat the same code pattern for every single platform, that need to set up GPR bits for enabling magic packet wake up, while the only difference is the register and bit offset.

The platform code will become quite messy and unmaintainable if every device driver dump their GPR register setup code into platform.

Quoted 8 lines

Sorry, but it's NACK from me."

This reverts commit 456062b3ec6f5b9 ("ARM: imx: add FEC sleep mode callback function").

[1] http://www.spinics.net/lists/netdev/msg310922.html

Applied.