diff options
author | Marek Vasut <marek.vasut+renesas@mailbox.org> | 2023-03-19 18:03:17 +0100 |
---|---|---|
committer | Marek Vasut <marek.vasut+renesas@mailbox.org> | 2023-04-07 14:18:51 +0200 |
commit | 9461d73de988964b51a796f69ce0d9424599ebd9 (patch) | |
tree | 5358b977bfb265a01f17b306cd7a302f72d6d17e /drivers/net/phy/phy.c | |
parent | c878e70bebef706f09e647b16954c14cee81939c (diff) | |
download | u-boot-9461d73de988964b51a796f69ce0d9424599ebd9.zip u-boot-9461d73de988964b51a796f69ce0d9424599ebd9.tar.gz u-boot-9461d73de988964b51a796f69ce0d9424599ebd9.tar.bz2 |
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)
Diffstat (limited to 'drivers/net/phy/phy.c')
-rw-r--r-- | drivers/net/phy/phy.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 61603f2..9b0e497 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -463,9 +463,9 @@ U_BOOT_PHY_DRIVER(genphy) = { .shutdown = genphy_shutdown, }; +#ifdef CONFIG_NEEDS_MANUAL_RELOC int phy_init(void) { -#ifdef CONFIG_NEEDS_MANUAL_RELOC const int ll_n_ents = ll_entry_count(struct phy_driver, phy_driver); struct phy_driver *drv, *ll_entry; @@ -489,10 +489,10 @@ int phy_init(void) if (drv->write_mmd) drv->write_mmd += gd->reloc_off; } -#endif return 0; } +#endif int phy_set_supported(struct phy_device *phydev, u32 max_speed) { |