diff options
| author | Tom Rini <trini@konsulko.com> | 2020-06-23 08:20:55 -0400 |
|---|---|---|
| committer | Tom Rini <trini@konsulko.com> | 2020-06-23 08:20:55 -0400 |
| commit | 4ff63383e3497389e66cf70943a83bdb1810462a (patch) | |
| tree | 0233d39a429bd73a6c64e1c1929d10e2c22b8b11 /drivers/net | |
| parent | 7635defaf2c65755a19e6faa08d604421ad2a06f (diff) | |
| parent | 824e6fe0ae0280cabd9df763fbc3bbaca2682b32 (diff) | |
Merge tag 'u-boot-imx-20200623' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
Fixes for 2020.07
-----------------
Travis: https://travis-ci.org/github/sbabic/u-boot-imx/builds/701059103
- Fixes for atheros and cubox
- Toradex: mostly environment
- i.MX7: DDR fixes
- switch to DM
- sabrelite : fix MMC access
Diffstat (limited to 'drivers/net')
| -rw-r--r-- | drivers/net/fec_mxc.c | 7 | ||||
| -rw-r--r-- | drivers/net/fec_mxc.h | 1 | ||||
| -rw-r--r-- | drivers/net/phy/atheros.c | 7 |
3 files changed, 9 insertions, 6 deletions
diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c index 9ae2db033e6..992180df869 100644 --- a/drivers/net/fec_mxc.c +++ b/drivers/net/fec_mxc.c @@ -1294,7 +1294,7 @@ static const struct eth_ops fecmxc_ops = { .read_rom_hwaddr = fecmxc_read_rom_hwaddr, }; -static int device_get_phy_addr(struct udevice *dev) +static int device_get_phy_addr(struct fec_priv *priv, struct udevice *dev) { struct ofnode_phandle_args phandle_args; int reg; @@ -1305,6 +1305,8 @@ static int device_get_phy_addr(struct udevice *dev) return -ENODEV; } + priv->phy_of_node = phandle_args.node; + reg = ofnode_read_u32_default(phandle_args.node, "reg", 0); return reg; @@ -1315,7 +1317,7 @@ static int fec_phy_init(struct fec_priv *priv, struct udevice *dev) struct phy_device *phydev; int addr; - addr = device_get_phy_addr(dev); + addr = device_get_phy_addr(priv, dev); #ifdef CONFIG_FEC_MXC_PHYADDR addr = CONFIG_FEC_MXC_PHYADDR; #endif @@ -1325,6 +1327,7 @@ static int fec_phy_init(struct fec_priv *priv, struct udevice *dev) return -ENODEV; priv->phydev = phydev; + priv->phydev->node = priv->phy_of_node; phy_config(phydev); return 0; diff --git a/drivers/net/fec_mxc.h b/drivers/net/fec_mxc.h index 0e8f08a51a1..659d62646f8 100644 --- a/drivers/net/fec_mxc.h +++ b/drivers/net/fec_mxc.h @@ -250,6 +250,7 @@ struct fec_priv { struct mii_dev *bus; #ifdef CONFIG_PHYLIB struct phy_device *phydev; + ofnode phy_of_node; #else int phy_id; int (*mii_postcall)(int); diff --git a/drivers/net/phy/atheros.c b/drivers/net/phy/atheros.c index 13f7275d170..f922fecd6b5 100644 --- a/drivers/net/phy/atheros.c +++ b/drivers/net/phy/atheros.c @@ -275,11 +275,10 @@ static int ar803x_of_init(struct phy_device *phydev) * Fixup for the AR8035 which only has two bits. The two * remaining bits map to the same frequencies. */ - if (phydev->drv->uid == AR8035_PHY_ID) { - u16 clear = AR803x_CLK_25M_MASK & AR8035_CLK_25M_MASK; - priv->clk_25m_mask &= ~clear; - priv->clk_25m_reg &= ~clear; + if (phydev->drv->uid == AR8035_PHY_ID) { + priv->clk_25m_reg &= AR8035_CLK_25M_MASK; + priv->clk_25m_mask &= AR8035_CLK_25M_MASK; } } |
