From 99b164a66b7c80be69097d19e55dd1f6a5284fd6 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Wed, 7 Jan 2015 10:39:52 -0200 Subject: Revert "ARM: imx: add FEC sleep mode callback function" 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 Signed-off-by: Fabio Estevam Acked-by: Shawn Guo Signed-off-by: David S. Miller --- arch/arm/mach-imx/mach-imx6sx.c | 50 ----------------------------------------- 1 file changed, 50 deletions(-) (limited to 'arch/arm/mach-imx/mach-imx6sx.c') diff --git a/arch/arm/mach-imx/mach-imx6sx.c b/arch/arm/mach-imx/mach-imx6sx.c index 747b012665f5..7a96c6577234 100644 --- a/arch/arm/mach-imx/mach-imx6sx.c +++ b/arch/arm/mach-imx/mach-imx6sx.c @@ -12,62 +12,12 @@ #include #include #include -#include -#include #include #include #include "common.h" #include "cpuidle.h" -static struct fec_platform_data fec_pdata[2]; - -static void imx6sx_fec1_sleep_enable(int enabled) -{ - struct regmap *gpr; - - gpr = syscon_regmap_lookup_by_compatible("fsl,imx6sx-iomuxc-gpr"); - if (!IS_ERR(gpr)) { - if (enabled) - regmap_update_bits(gpr, IOMUXC_GPR4, - IMX6SX_GPR4_FEC_ENET1_STOP_REQ, - IMX6SX_GPR4_FEC_ENET1_STOP_REQ); - else - regmap_update_bits(gpr, IOMUXC_GPR4, - IMX6SX_GPR4_FEC_ENET1_STOP_REQ, 0); - } else - pr_err("failed to find fsl,imx6sx-iomux-gpr regmap\n"); -} - -static void imx6sx_fec2_sleep_enable(int enabled) -{ - struct regmap *gpr; - - gpr = syscon_regmap_lookup_by_compatible("fsl,imx6sx-iomuxc-gpr"); - if (!IS_ERR(gpr)) { - if (enabled) - regmap_update_bits(gpr, IOMUXC_GPR4, - IMX6SX_GPR4_FEC_ENET2_STOP_REQ, - IMX6SX_GPR4_FEC_ENET2_STOP_REQ); - else - regmap_update_bits(gpr, IOMUXC_GPR4, - IMX6SX_GPR4_FEC_ENET2_STOP_REQ, 0); - } else - pr_err("failed to find fsl,imx6sx-iomux-gpr regmap\n"); -} - -static void __init imx6sx_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[0].sleep_mode_enable = imx6sx_fec1_sleep_enable; - np = of_find_node_by_path("/soc/aips-bus@02100000/ethernet@021b4000"); - if (np && of_get_property(np, "fsl,magic-packet", NULL)) - fec_pdata[1].sleep_mode_enable = imx6sx_fec2_sleep_enable; -} - static int ar8031_phy_fixup(struct phy_device *dev) { u16 val; -- cgit v1.2.3