Skip to content

Commit f99f22e

Browse files
arndbkuba-moo
authored andcommitted
net: dsa: ocelot: add PTP dependency for NET_DSA_MSCC_OCELOT_EXT
A new user of MSCC_OCELOT_SWITCH_LIB was added, bringing back an old link failure that was fixed with e5f3155 ("ethernet: fix PTP_1588_CLOCK dependencies"): x86_64-linux-ld: drivers/net/ethernet/mscc/ocelot_ptp.o: in function `ocelot_ptp_enable': ocelot_ptp.c:(.text+0x8ee): undefined reference to `ptp_find_pin' x86_64-linux-ld: drivers/net/ethernet/mscc/ocelot_ptp.o: in function `ocelot_get_ts_info': ocelot_ptp.c:(.text+0xd5d): undefined reference to `ptp_clock_index' x86_64-linux-ld: drivers/net/ethernet/mscc/ocelot_ptp.o: in function `ocelot_init_timestamp': ocelot_ptp.c:(.text+0x15ca): undefined reference to `ptp_clock_register' x86_64-linux-ld: drivers/net/ethernet/mscc/ocelot_ptp.o: in function `ocelot_deinit_timestamp': ocelot_ptp.c:(.text+0x16b7): undefined reference to `ptp_clock_unregister' Add the same PTP dependency here, as well as in the MSCC_OCELOT_SWITCH_LIB symbol itself to make it more obvious what is going on when the next driver selects it. Fixes: 3d7316a ("net: dsa: ocelot: add external ocelot switch control") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Colin Foster <colin.foster@in-advantage.com> Link: https://lore.kernel.org/r/20230209124435.1317781-1-arnd@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 1bc6cc4 commit f99f22e

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

drivers/net/dsa/ocelot/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ config NET_DSA_MSCC_OCELOT_EXT
1212
tristate "Ocelot External Ethernet switch support"
1313
depends on NET_DSA && SPI
1414
depends on NET_VENDOR_MICROSEMI
15+
depends on PTP_1588_CLOCK_OPTIONAL
1516
select MDIO_MSCC_MIIM
1617
select MFD_OCELOT_CORE
1718
select MSCC_OCELOT_SWITCH_LIB

drivers/net/ethernet/mscc/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ if NET_VENDOR_MICROSEMI
1313

1414
# Users should depend on NET_SWITCHDEV, HAS_IOMEM, BRIDGE
1515
config MSCC_OCELOT_SWITCH_LIB
16+
depends on PTP_1588_CLOCK_OPTIONAL
1617
select NET_DEVLINK
1718
select REGMAP_MMIO
1819
select PACKING

0 commit comments

Comments
 (0)