mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-29 18:19:02 +00:00
c6c731fe31
Add support for NXP layerscape ls1043ardb 64b/32b Dev board. LS1043a is an SoC with 4x64-bit up to 1.6 GHz ARMv8 A53 cores. ls1043ardb support features as: 2GB DDR4, 128MB NOR/512MB NAND, USB3.0, eSDHC, I2C, GPIO, PCIe/Mini-PCIe, 6x1G/1x10G network port, etc. 64b/32b ls1043ardb target is using 4.4 kernel, and rcw/u-boot/fman images from NXP QorIQ SDK release. All of 4.4 kernel patches porting from SDK release or upstream. QorIQ SDK ISOs can be downloaded from this location: http://www.nxp.com/products/software-and-tools/run-time-software/linux-sdk/linux-sdk-for-qoriq-processors:SDKLINUX Signed-off-by: Yutang Jiang <yutang.jiang@nxp.com>
64 lines
2.2 KiB
Diff
64 lines
2.2 KiB
Diff
From f77f25498902f84d53a64a6397db2fa4b0d0dd4b Mon Sep 17 00:00:00 2001
|
|
From: Shaohui Xie <Shaohui.Xie@nxp.com>
|
|
Date: Thu, 31 Mar 2016 10:53:06 +0800
|
|
Subject: [PATCH 68/70] dpaa_ethernet: fix link state detect for 10G interface
|
|
|
|
There are drivers to support 10G PHYs with copper interface, so we
|
|
change binding between MAC and 10G PHY to use phy_state_machine to
|
|
detect link state.
|
|
|
|
Signed-off-by: Shaohui Xie <Shaohui.Xie@nxp.com>
|
|
---
|
|
drivers/net/ethernet/freescale/sdk_dpaa/mac-api.c | 20 ++++++++------------
|
|
1 file changed, 8 insertions(+), 12 deletions(-)
|
|
|
|
--- a/drivers/net/ethernet/freescale/sdk_dpaa/mac-api.c
|
|
+++ b/drivers/net/ethernet/freescale/sdk_dpaa/mac-api.c
|
|
@@ -279,20 +279,15 @@ static int __cold start(struct mac_devic
|
|
|
|
_errno = fm_mac_enable(mac_dev->get_mac_handle(mac_dev));
|
|
|
|
- if (!_errno && phy_dev) {
|
|
- if (macdev2enetinterface(mac_dev) != e_ENET_MODE_XGMII_10000)
|
|
- phy_start(phy_dev);
|
|
- else if (phy_dev->drv->read_status)
|
|
- phy_dev->drv->read_status(phy_dev);
|
|
- }
|
|
+ if (!_errno && phy_dev)
|
|
+ phy_start(phy_dev);
|
|
|
|
return _errno;
|
|
}
|
|
|
|
static int __cold stop(struct mac_device *mac_dev)
|
|
{
|
|
- if (mac_dev->phy_dev &&
|
|
- (macdev2enetinterface(mac_dev) != e_ENET_MODE_XGMII_10000))
|
|
+ if (mac_dev->phy_dev)
|
|
phy_stop(mac_dev->phy_dev);
|
|
|
|
return fm_mac_disable(mac_dev->get_mac_handle(mac_dev));
|
|
@@ -477,8 +472,8 @@ static int xgmac_init_phy(struct net_dev
|
|
phy_dev = phy_attach(net_dev, mac_dev->fixed_bus_id,
|
|
mac_dev->phy_if);
|
|
else
|
|
- phy_dev = of_phy_attach(net_dev, mac_dev->phy_node, 0,
|
|
- mac_dev->phy_if);
|
|
+ phy_dev = of_phy_connect(net_dev, mac_dev->phy_node,
|
|
+ &adjust_link, 0, mac_dev->phy_if);
|
|
if (unlikely(phy_dev == NULL) || IS_ERR(phy_dev)) {
|
|
netdev_err(net_dev, "Could not attach to PHY %s\n",
|
|
mac_dev->phy_node ?
|
|
@@ -510,8 +505,9 @@ static int memac_init_phy(struct net_dev
|
|
mac_dev->phy_dev = NULL;
|
|
return 0;
|
|
} else
|
|
- phy_dev = of_phy_attach(net_dev, mac_dev->phy_node, 0,
|
|
- mac_dev->phy_if);
|
|
+ phy_dev = of_phy_connect(net_dev, mac_dev->phy_node,
|
|
+ &adjust_link, 0,
|
|
+ mac_dev->phy_if);
|
|
} else {
|
|
if (!mac_dev->phy_node)
|
|
phy_dev = phy_connect(net_dev, mac_dev->fixed_bus_id,
|