mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-25 08:21:14 +00:00
cddd459140
Add patches for linux-5.4. The patches are from NXP LSDK-20.04 release which was tagged LSDK-20.04-V5.4. https://source.codeaurora.org/external/qoriq/qoriq-components/linux/ For boards LS1021A-IOT, and Traverse-LS1043 which are not involved in LSDK, port the dts patches from 4.14. The patches are sorted into the following categories: 301-arch-xxxx 302-dts-xxxx 303-core-xxxx 701-net-xxxx 801-audio-xxxx 802-can-xxxx 803-clock-xxxx 804-crypto-xxxx 805-display-xxxx 806-dma-xxxx 807-gpio-xxxx 808-i2c-xxxx 809-jailhouse-xxxx 810-keys-xxxx 811-kvm-xxxx 812-pcie-xxxx 813-pm-xxxx 814-qe-xxxx 815-sata-xxxx 816-sdhc-xxxx 817-spi-xxxx 818-thermal-xxxx 819-uart-xxxx 820-usb-xxxx 821-vfio-xxxx Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
56 lines
1.8 KiB
Diff
56 lines
1.8 KiB
Diff
From d93ca8d9c8365cf533f88582c57c83cb50fe598a Mon Sep 17 00:00:00 2001
|
|
From: Vladimir Oltean <vladimir.oltean@nxp.com>
|
|
Date: Mon, 6 Jan 2020 14:31:13 +0200
|
|
Subject: [PATCH] Revert "enetc: Set MDIO_CFG_HOLD to the recommended value of
|
|
2"
|
|
|
|
This reverts commit 3f643e4af035886cd2ca4bf79967098cfe55b40b.
|
|
|
|
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
|
|
---
|
|
drivers/net/ethernet/freescale/enetc/enetc_mdio.c | 12 ++++--------
|
|
1 file changed, 4 insertions(+), 8 deletions(-)
|
|
|
|
--- a/drivers/net/ethernet/freescale/enetc/enetc_mdio.c
|
|
+++ b/drivers/net/ethernet/freescale/enetc/enetc_mdio.c
|
|
@@ -31,19 +31,15 @@ static inline void _enetc_mdio_wr(struct
|
|
_enetc_mdio_wr(mdio_priv, ENETC_##off, val)
|
|
#define enetc_mdio_rd_reg(off) enetc_mdio_rd(mdio_priv, off)
|
|
|
|
+#define ENETC_MDC_DIV 258
|
|
+
|
|
#define MDIO_CFG_CLKDIV(x) ((((x) >> 1) & 0xff) << 8)
|
|
#define MDIO_CFG_BSY BIT(0)
|
|
#define MDIO_CFG_RD_ER BIT(1)
|
|
-#define MDIO_CFG_HOLD(x) (((x) << 2) & GENMASK(4, 2))
|
|
#define MDIO_CFG_ENC45 BIT(6)
|
|
/* external MDIO only - driven on neg MDC edge */
|
|
#define MDIO_CFG_NEG BIT(23)
|
|
|
|
-#define ENETC_EMDIO_CFG \
|
|
- (MDIO_CFG_HOLD(2) | \
|
|
- MDIO_CFG_CLKDIV(258) | \
|
|
- MDIO_CFG_NEG)
|
|
-
|
|
#define MDIO_CTL_DEV_ADDR(x) ((x) & 0x1f)
|
|
#define MDIO_CTL_PORT_ADDR(x) (((x) & 0x1f) << 5)
|
|
#define MDIO_CTL_READ BIT(15)
|
|
@@ -65,7 +61,7 @@ int enetc_mdio_write(struct mii_bus *bus
|
|
u16 dev_addr;
|
|
int ret;
|
|
|
|
- mdio_cfg = ENETC_EMDIO_CFG;
|
|
+ mdio_cfg = MDIO_CFG_CLKDIV(ENETC_MDC_DIV) | MDIO_CFG_NEG;
|
|
if (regnum & MII_ADDR_C45) {
|
|
dev_addr = (regnum >> 16) & 0x1f;
|
|
mdio_cfg |= MDIO_CFG_ENC45;
|
|
@@ -112,7 +108,7 @@ int enetc_mdio_read(struct mii_bus *bus,
|
|
u16 dev_addr, value;
|
|
int ret;
|
|
|
|
- mdio_cfg = ENETC_EMDIO_CFG;
|
|
+ mdio_cfg = MDIO_CFG_CLKDIV(ENETC_MDC_DIV) | MDIO_CFG_NEG;
|
|
if (regnum & MII_ADDR_C45) {
|
|
dev_addr = (regnum >> 16) & 0x1f;
|
|
mdio_cfg |= MDIO_CFG_ENC45;
|