diff options
author | Olof Johansson <olof@lixom.net> | 2016-07-06 06:58:46 +0300 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2016-07-06 06:58:46 +0300 |
commit | 213ae9025d2861c1b8293541959e7f5f83be91a3 (patch) | |
tree | 0135ba6a01378a8c869c39b2a7af4b310b2ab3b1 /drivers | |
parent | e2bd0d37bd8ec169f7e0ee9d8acd75ecdd16dfdc (diff) | |
parent | 18245c24259acaea4584464bf0215bf413dc7d23 (diff) | |
download | linux-213ae9025d2861c1b8293541959e7f5f83be91a3.tar.xz |
Merge tag 'imx-soc-4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/soc
The i.MX SoC changes for 4.8:
- A patch series including both cpuidle and FEC driver changes to
disable deeper idle states when FEC is active while board level
workaround for ERR006687 is not available
- A number patches to fix sparse warnings and spell errors
- A fix for TZIC FIQ translation from VIRQ to HWIRQ
- Support compatible of i.MX7 Solo SoC which has a subset of i.MX7 Dual
* tag 'imx-soc-4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
ARM: imx: add support for i.MX 7Solo
ARM: i.MX: Disable supervisor protect for i.MX51
ARM: imx6: fix missing <soc/imx/cpuidle.h> in cpuidle-imx6q.c
ARM: i.MX: Fix FIQ interrupt handling for TZIC
ARM: imx6: fix static declaration in include/soc/imx/cpuidle.h
ARM: imx6q: export cpuidle functions needed by fec driver
ARM: imx: fix missing include of common.h
ARM: imx: fix missing includes
ARM: imx6: disable deeper idle states when FEC is active w/o HW workaround
ARM: mach-imx6q: fix spelling mistake in error message
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/freescale/fec.h | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/freescale/fec_main.c | 12 |
2 files changed, 14 insertions, 0 deletions
diff --git a/drivers/net/ethernet/freescale/fec.h b/drivers/net/ethernet/freescale/fec.h index f58f9ea51639..dc71a88e9c55 100644 --- a/drivers/net/ethernet/freescale/fec.h +++ b/drivers/net/ethernet/freescale/fec.h @@ -442,6 +442,8 @@ struct bufdesc_ex { #define FEC_QUIRK_SINGLE_MDIO (1 << 11) /* Controller supports RACC register */ #define FEC_QUIRK_HAS_RACC (1 << 12) +/* Interrupt doesn't wake CPU from deep idle */ +#define FEC_QUIRK_ERR006687 (1 << 13) struct bufdesc_prop { int qid; diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c index fea0f330ddbd..d9ecc30ebc8b 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -60,6 +60,7 @@ #include <linux/if_vlan.h> #include <linux/pinctrl/consumer.h> #include <linux/prefetch.h> +#include <soc/imx/cpuidle.h> #include <asm/cacheflush.h> @@ -2818,6 +2819,9 @@ fec_enet_open(struct net_device *ndev) if (ret) goto err_enet_mii_probe; + if (fep->quirks & FEC_QUIRK_ERR006687) + imx6q_cpuidle_fec_irqs_used(); + napi_enable(&fep->napi); phy_start(ndev->phydev); netif_tx_start_all_queues(ndev); @@ -2853,6 +2857,9 @@ fec_enet_close(struct net_device *ndev) phy_disconnect(ndev->phydev); + if (fep->quirks & FEC_QUIRK_ERR006687) + imx6q_cpuidle_fec_irqs_unused(); + fec_enet_clk_enable(ndev, false); pinctrl_pm_select_sleep_state(&fep->pdev->dev); pm_runtime_mark_last_busy(&fep->pdev->dev); @@ -3292,6 +3299,11 @@ fec_probe(struct platform_device *pdev) platform_set_drvdata(pdev, ndev); + if ((of_machine_is_compatible("fsl,imx6q") || + of_machine_is_compatible("fsl,imx6dl")) && + !of_property_read_bool(np, "fsl,err006687-workaround-present")) + fep->quirks |= FEC_QUIRK_ERR006687; + if (of_get_property(np, "fsl,magic-packet", NULL)) fep->wol_flag |= FEC_WOL_HAS_MAGIC_PACKET; |