diff options
author | Christian Lamparter <chunkeey@gmail.com> | 2018-01-07 21:27:48 +0100 |
---|---|---|
committer | Mathias Kresin <dev@kresin.me> | 2018-01-12 08:00:04 +0100 |
commit | 15faf389ad5159fa8223344029c98a0afca6e5ef (patch) | |
tree | 68e652f9cd4ff7753620d9a8882643e3a8a85077 /target/linux/apm821xx/patches-4.14/701-powerpc_ibm_apm82181_phyclk_fix.patch | |
parent | 9a9c7fb4cf8a0483b26b2d9ecc481275173d63f7 (diff) | |
download | upstream-15faf389ad5159fa8223344029c98a0afca6e5ef.tar.gz upstream-15faf389ad5159fa8223344029c98a0afca6e5ef.tar.bz2 upstream-15faf389ad5159fa8223344029c98a0afca6e5ef.zip |
apm821xx: add linux 4.14 apm821xx patches
This patch updates the apm821xx target to use the 4.14 kernel.
4.14 finally ships with a driver for the WNDR4700's tc654 fan
controller. The custom driver is deprecated in favor of the
upstream driver and the thermal cooling definitions in the DTS
are updated.
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Diffstat (limited to 'target/linux/apm821xx/patches-4.14/701-powerpc_ibm_apm82181_phyclk_fix.patch')
-rw-r--r-- | target/linux/apm821xx/patches-4.14/701-powerpc_ibm_apm82181_phyclk_fix.patch | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/target/linux/apm821xx/patches-4.14/701-powerpc_ibm_apm82181_phyclk_fix.patch b/target/linux/apm821xx/patches-4.14/701-powerpc_ibm_apm82181_phyclk_fix.patch new file mode 100644 index 0000000000..7f630a3c2a --- /dev/null +++ b/target/linux/apm821xx/patches-4.14/701-powerpc_ibm_apm82181_phyclk_fix.patch @@ -0,0 +1,51 @@ +--- a/drivers/net/ethernet/ibm/emac/core.c ++++ b/drivers/net/ethernet/ibm/emac/core.c +@@ -130,6 +130,7 @@ static inline void emac_report_timeout_e + { + if (emac_has_feature(dev, EMAC_FTR_440GX_PHY_CLK_FIX | + EMAC_FTR_460EX_PHY_CLK_FIX | ++ EMAC_FTR_APM821XX_PHY_CLK_FIX | + EMAC_FTR_440EP_PHY_CLK_FIX)) + DBG(dev, "%s" NL, error); + else if (net_ratelimit()) +@@ -146,6 +147,10 @@ static inline void emac_rx_clk_tx(struct + if (emac_has_feature(dev, EMAC_FTR_440EP_PHY_CLK_FIX)) + dcri_clrset(SDR0, SDR0_MFR, + 0, SDR0_MFR_ECS >> dev->cell_index); ++ ++ if (emac_has_feature(dev, EMAC_FTR_APM821XX_PHY_CLK_FIX)) ++ dcri_clrset(SDR0, SDR0_ETH_CFG, ++ 0, 0x00000100 >> dev->cell_index); + #endif + } + +@@ -155,6 +160,10 @@ static inline void emac_rx_clk_default(s + if (emac_has_feature(dev, EMAC_FTR_440EP_PHY_CLK_FIX)) + dcri_clrset(SDR0, SDR0_MFR, + SDR0_MFR_ECS >> dev->cell_index, 0); ++ ++ if (emac_has_feature(dev, EMAC_FTR_APM821XX_PHY_CLK_FIX)) ++ dcri_clrset(SDR0, SDR0_ETH_CFG, ++ 0x00000100 >> dev->cell_index, 0); + #endif + } + +@@ -2879,6 +2888,7 @@ static int emac_init_config(struct emac_ + if (of_device_is_compatible(np, "ibm,emac-apm821xx")) { + dev->features |= (EMAC_APM821XX_REQ_JUMBO_FRAME_SIZE | + EMAC_FTR_APM821XX_NO_HALF_DUPLEX | ++ EMAC_FTR_APM821XX_PHY_CLK_FIX | + EMAC_FTR_460EX_PHY_CLK_FIX); + } + } else if (of_device_is_compatible(np, "ibm,emac4")) { +--- a/drivers/net/ethernet/ibm/emac/core.h ++++ b/drivers/net/ethernet/ibm/emac/core.h +@@ -335,6 +335,8 @@ struct emac_instance { + */ + #define EMAC_FTR_APM821XX_NO_HALF_DUPLEX 0x00001000 + ++#define EMAC_FTR_APM821XX_PHY_CLK_FIX 0x000002000 ++ + /* Right now, we don't quite handle the always/possible masks on the + * most optimal way as we don't have a way to say something like + * always EMAC4. Patches welcome. |