diff options
author | Biwen Li <biwen.li@nxp.com> | 2018-11-02 11:21:57 +0800 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2018-12-18 20:17:23 +0100 |
commit | 0a827ebd2fa3c7dc210aff0a30d0dc1d536ed89c (patch) | |
tree | b80223fffb0814b6db33f48dd3aaa047cd3e0299 /target/linux/layerscape/patches-4.14/712-sdk-dpaa-rgmii-fixed-link.patch | |
parent | 7bd6969acce763a7117b33a6647b8c5dbbf2b0aa (diff) | |
download | upstream-0a827ebd2fa3c7dc210aff0a30d0dc1d536ed89c.tar.gz upstream-0a827ebd2fa3c7dc210aff0a30d0dc1d536ed89c.tar.bz2 upstream-0a827ebd2fa3c7dc210aff0a30d0dc1d536ed89c.zip |
layerscape: upgrade kernel to 4.14
This patch is to upgrade kernel to 4.14 for layerscape.
patches-4.14 for layerscape included two categories.
- NXP Layerscape SDK kernel-4.14 patches
All patches on tag LSDK-18.09-V4.14 were ported to OpenWrt
kernel. Since there were hundreds patches, we had to make
an all-in-one patch for each IP/feature.
See below links for LSDK kernel.
https://lsdk.github.io/components.html
https://source.codeaurora.org/external/qoriq/qoriq-components/linux
- Non-LSDK kernel patches
Other patches which were not in LSDK were just put in patches-4.14.
Kept below patches from patches-4.9.
303-dts-layerscape-add-traverse-ls1043.patch
821-add-esdhc-vsel-to-ls1043.patch
822-rgmii-fixed-link.patch
Renamed and rebase them as below in patches-4.14,
303-add-DTS-for-Traverse-LS1043-Boards.patch
712-sdk-dpaa-rgmii-fixed-link.patch
824-mmc-sdhci-of-esdhc-add-voltage-switch-support-for-ls.patch
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Signed-off-by: Biwen Li <biwen.li@nxp.com>
Diffstat (limited to 'target/linux/layerscape/patches-4.14/712-sdk-dpaa-rgmii-fixed-link.patch')
-rw-r--r-- | target/linux/layerscape/patches-4.14/712-sdk-dpaa-rgmii-fixed-link.patch | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/target/linux/layerscape/patches-4.14/712-sdk-dpaa-rgmii-fixed-link.patch b/target/linux/layerscape/patches-4.14/712-sdk-dpaa-rgmii-fixed-link.patch new file mode 100644 index 0000000000..d6cf803e4f --- /dev/null +++ b/target/linux/layerscape/patches-4.14/712-sdk-dpaa-rgmii-fixed-link.patch @@ -0,0 +1,62 @@ +From b3544990f8496edda965e1ff9a14727360660676 Mon Sep 17 00:00:00 2001 +From: Mathew McBride <matt@traverse.com.au> +Date: Mon, 7 Aug 2017 10:19:48 +1000 +Subject: [PATCH] Recognize when an RGMII Link is set as fixed (in the device + tree) and set up the MAC accordingly + +--- + drivers/net/ethernet/freescale/sdk_dpaa/mac.c | 1 + + .../freescale/sdk_fman/Peripherals/FM/MAC/memac.c | 13 +++++++++++++ + 2 files changed, 14 insertions(+) + +--- a/drivers/net/ethernet/freescale/sdk_dpaa/mac.c ++++ b/drivers/net/ethernet/freescale/sdk_dpaa/mac.c +@@ -386,6 +386,7 @@ static int __cold mac_probe(struct platf + mac_dev->fixed_link->duplex = phy->duplex; + mac_dev->fixed_link->pause = phy->pause; + mac_dev->fixed_link->asym_pause = phy->asym_pause; ++ printk(KERN_INFO "Setting up fixed link, speed %d duplex %d\n", mac_dev->fixed_link->speed, mac_dev->fixed_link->duplex); + } + + _errno = mac_dev->init(mac_dev); +--- a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/memac.c ++++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/memac.c +@@ -36,6 +36,8 @@ + + @Description FM mEMAC driver + *//***************************************************************************/ ++#include <../../../../sdk_dpaa/mac.h> ++#include <linux/phy_fixed.h> + + #include "std_ext.h" + #include "string_ext.h" +@@ -48,6 +50,8 @@ + #include "memac.h" + + ++static t_Error MemacAdjustLink(t_Handle h_Memac, e_EnetSpeed speed, bool fullDuplex); ++ + /*****************************************************************************/ + /* Internal routines */ + /*****************************************************************************/ +@@ -276,11 +280,20 @@ static t_Error MemacEnable(t_Handle h_Me + { + t_Memac *p_Memac = (t_Memac *)h_Memac; + ++ struct mac_device *mac_dev = (struct mac_device *)p_Memac->h_App; ++ + SANITY_CHECK_RETURN_ERROR(p_Memac, E_INVALID_HANDLE); + SANITY_CHECK_RETURN_ERROR(!p_Memac->p_MemacDriverParam, E_INVALID_STATE); + + fman_memac_enable(p_Memac->p_MemMap, (mode & e_COMM_MODE_RX), (mode & e_COMM_MODE_TX)); + ++ if (ENET_INTERFACE_FROM_MODE(p_Memac->enetMode) == e_ENET_IF_RGMII) { ++ if (mac_dev->fixed_link) { ++ printk(KERN_INFO "This is a fixed-link, forcing speed %d duplex %d\n",mac_dev->fixed_link->speed,mac_dev->fixed_link->duplex); ++ MemacAdjustLink(h_Memac,mac_dev->fixed_link->speed,mac_dev->fixed_link->duplex); ++ } ++ } ++ + return E_OK; + } + |