mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-28 15:41:40 +00:00
net: phy: Only call phy_init() on systems needing manual relocation
The phy_init() is now used only to perform manual relocation of PHY driver callbacks. Wrap it in ifdeffery and only call it on systems which still require manual relocation, i.e. m68k . Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Ramon Fried <rfried.dev@gmail.com> Acked-by: Michal Simek <michal.simek@amd.com> Tested-by: Michal Simek <michal.simek@amd.com> #microblaze (MANUAL_RELOC)
This commit is contained in:
parent
c878e70beb
commit
9461d73de9
2 changed files with 3 additions and 3 deletions
|
@ -463,9 +463,9 @@ U_BOOT_PHY_DRIVER(genphy) = {
|
||||||
.shutdown = genphy_shutdown,
|
.shutdown = genphy_shutdown,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef CONFIG_NEEDS_MANUAL_RELOC
|
||||||
int phy_init(void)
|
int phy_init(void)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_NEEDS_MANUAL_RELOC
|
|
||||||
const int ll_n_ents = ll_entry_count(struct phy_driver, phy_driver);
|
const int ll_n_ents = ll_entry_count(struct phy_driver, phy_driver);
|
||||||
struct phy_driver *drv, *ll_entry;
|
struct phy_driver *drv, *ll_entry;
|
||||||
|
|
||||||
|
@ -489,10 +489,10 @@ int phy_init(void)
|
||||||
if (drv->write_mmd)
|
if (drv->write_mmd)
|
||||||
drv->write_mmd += gd->reloc_off;
|
drv->write_mmd += gd->reloc_off;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int phy_set_supported(struct phy_device *phydev, u32 max_speed)
|
int phy_set_supported(struct phy_device *phydev, u32 max_speed)
|
||||||
{
|
{
|
||||||
|
|
|
@ -37,7 +37,7 @@ void eth_common_init(void)
|
||||||
miiphy_init();
|
miiphy_init();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_PHYLIB
|
#if defined(CONFIG_NEEDS_MANUAL_RELOC) && defined(CONFIG_PHYLIB)
|
||||||
phy_init();
|
phy_init();
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue