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>2020-04-23 02:03:53 -0700
commit5f7f8c61f137f45d947a488266109d3c1d68bb3e (patch)
tree9c4a6d80d25b68fc8b2dd06a42bbc5eeaee35951 /drivers/net
parent7314c900145a416d340c6add566502fd6a73525c (diff)
MLK-16118-6 net: fec_mxc: Add the init_clk_fec function for non-DM driver
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) (cherry picked from commit 187ea376980be12e69c45bd6e62c7ca1559046f6) (cherry picked from commit 9c0be2929558498429b31868d67e1d6695546ac9)
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/fec_mxc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
index bc5b63d788..9103ec7d2c 100644
--- a/drivers/net/fec_mxc.c
+++ b/drivers/net/fec_mxc.c
@@ -1086,6 +1086,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,
@@ -1203,6 +1207,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(base_mii, dev_id);
if (!bus)