From 9c0be2929558498429b31868d67e1d6695546ac9 Mon Sep 17 00:00:00 2001 From: Ye Li Date: Tue, 1 Aug 2017 05:06:25 -0500 Subject: [PATCH] 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 Signed-off-by: Ye Li (cherry picked from commit c0e4ac66196b20f363f711fb18e40b70e3be9240) (cherry picked from commit 187ea376980be12e69c45bd6e62c7ca1559046f6) --- drivers/net/fec_mxc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c index 1d064f79f7..50a01d1bcc 100644 --- a/drivers/net/fec_mxc.c +++ b/drivers/net/fec_mxc.c @@ -1077,6 +1077,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, @@ -1194,6 +1198,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) -- 2.17.1