]> Git Repo - J-u-boot.git/commit
net: phy: Iterate over both registered PHYs and struct phy_driver linker list
authorMarek Vasut <[email protected]>
Sun, 19 Mar 2023 17:02:42 +0000 (18:02 +0100)
committerMarek Vasut <[email protected]>
Fri, 7 Apr 2023 12:18:48 +0000 (14:18 +0200)
commit7940a93eb9778d275d5c2adcc8ee04e2f52d7b57
tree035c36d0c0990b29786613812b8e82002e69ffac
parent9d5a38c2143e32d36908cbd5ef53a688e89edcb5
net: phy: Iterate over both registered PHYs and struct phy_driver linker list

Introduce U_BOOT_PHY_DRIVER() macro which is used to add struct phy_driver
into a new linker list section containing all compiled in struct phy_driver
drivers. This is so far empty until PHY drivers are converted over to this
macro.

Iterate over both drivers registered using soon to be legacy phy_register()
as well as drivers in the new linker list when looking up a suitable PHY
driver. This way, PHY drivers can be converted over to the new macro one
driver at a time.

The relocation of callbacks for linker list based drivers now happens in
phy_init() call as the drivers are available at that point in time, and
phy_register() is not called for those drivers.

Signed-off-by: Marek Vasut <[email protected]>
Acked-by: Michal Simek <[email protected]>
Tested-by: Michal Simek <[email protected]> #microblaze (MANUAL_RELOC)
drivers/net/phy/phy.c
include/phy.h
This page took 0.031941 seconds and 4 git commands to generate.