summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorYe Li <ye.li@nxp.com>2017-08-01 05:06:25 -0500
committerYe Li <ye.li@nxp.com>2018-04-27 02:32:32 -0700
commit187ea376980be12e69c45bd6e62c7ca1559046f6 (patch)
tree32e5c330e8664c6d093644730618afa4cba54934 /drivers/net
parent2fde20b3ddf037bf64706426763d88cdba2a7087 (diff)
MLK-16118-6 net: fec_mxc: Add the init_clk_fec function
When the power domain driver is enabled, we need to enable clocks after power domain on. So the clock settings can't set in board_init, needs to set them when the device is probed. Add this weak function in driver, that SoC codes can implement the clock settings. Reviewed-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Ye Li <ye.li@nxp.com> (cherry picked from commit c0e4ac66196b20f363f711fb18e40b70e3be9240)
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/fec_mxc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
index c8cb6f58cd..cc23aeacf5 100644
--- a/drivers/net/fec_mxc.c
+++ b/drivers/net/fec_mxc.c
@@ -1038,6 +1038,10 @@ struct mii_dev *fec_get_miibus(ulong base_addr, int dev_id)
return bus;
}
+__weak void init_clk_fec(int index)
+{
+}
+
#ifndef CONFIG_DM_ETH
#ifdef CONFIG_PHYLIB
int fec_probe(bd_t *bd, int dev_id, uint32_t base_addr,
@@ -1162,6 +1166,7 @@ int fecmxc_initialize_multi(bd_t *bd, int dev_id, int phy_id, uint32_t addr)
#else
base_mii = addr;
#endif
+ init_clk_fec(dev_id);
debug("eth_init: fec_probe(bd, %i, %i) @ %08x\n", dev_id, phy_id, addr);
bus = fec_get_miibus((ulong)base_mii, dev_id);
if (!bus)
@@ -1267,6 +1272,8 @@ static int fecmxc_probe(struct udevice *dev)
return -ENODEV;
}
#endif
+ init_clk_fec(dev->seq);
+
ret = fec_alloc_descs(priv);
if (ret)
return ret;