|
60 | 60 | #include <linux/if_vlan.h> |
61 | 61 | #include <linux/pinctrl/consumer.h> |
62 | 62 | #include <linux/prefetch.h> |
| 63 | +#include <soc/imx/cpuidle.h> |
63 | 64 |
|
64 | 65 | #include <asm/cacheflush.h> |
65 | 66 |
|
@@ -2820,6 +2821,9 @@ fec_enet_open(struct net_device *ndev) |
2820 | 2821 | if (ret) |
2821 | 2822 | goto err_enet_mii_probe; |
2822 | 2823 |
|
| 2824 | + if (fep->quirks & FEC_QUIRK_ERR006687) |
| 2825 | + imx6q_cpuidle_fec_irqs_used(); |
| 2826 | + |
2823 | 2827 | napi_enable(&fep->napi); |
2824 | 2828 | phy_start(ndev->phydev); |
2825 | 2829 | netif_tx_start_all_queues(ndev); |
@@ -2855,6 +2859,9 @@ fec_enet_close(struct net_device *ndev) |
2855 | 2859 |
|
2856 | 2860 | phy_disconnect(ndev->phydev); |
2857 | 2861 |
|
| 2862 | + if (fep->quirks & FEC_QUIRK_ERR006687) |
| 2863 | + imx6q_cpuidle_fec_irqs_unused(); |
| 2864 | + |
2858 | 2865 | fec_enet_clk_enable(ndev, false); |
2859 | 2866 | pinctrl_pm_select_sleep_state(&fep->pdev->dev); |
2860 | 2867 | pm_runtime_mark_last_busy(&fep->pdev->dev); |
@@ -3294,6 +3301,11 @@ fec_probe(struct platform_device *pdev) |
3294 | 3301 |
|
3295 | 3302 | platform_set_drvdata(pdev, ndev); |
3296 | 3303 |
|
| 3304 | + if ((of_machine_is_compatible("fsl,imx6q") || |
| 3305 | + of_machine_is_compatible("fsl,imx6dl")) && |
| 3306 | + !of_property_read_bool(np, "fsl,err006687-workaround-present")) |
| 3307 | + fep->quirks |= FEC_QUIRK_ERR006687; |
| 3308 | + |
3297 | 3309 | if (of_get_property(np, "fsl,magic-packet", NULL)) |
3298 | 3310 | fep->wol_flag |= FEC_WOL_HAS_MAGIC_PACKET; |
3299 | 3311 |
|
|
0 commit comments