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)zero-sugar
parent
2fde20b3dd
commit
187ea37698
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue