Commit 76ad97e1 authored by Yoshihiro Shimoda's avatar Yoshihiro Shimoda Committed by Jakub Kicinski

net: ethernet: renesas: rswitch: Fix build error about ptp

If CONFIG_PTP_1588_CLOCK_OPTIONAL=m and CONFIG_RENESAS_ETHER_SWITCH=y,
the following build error happened:

    aarch64-linux-ld: DWARF error: could not find abbrev number 60
    drivers/net/ethernet/renesas/rswitch.o: in function `rswitch_get_ts_info':
    rswitch.c:(.text+0x408): undefined reference to `ptp_clock_index'
    aarch64-linux-ld: DWARF error: could not find abbrev number 1190123
    drivers/net/ethernet/renesas/rcar_gen4_ptp.o: in function `rcar_gen4_ptp_register':
    rcar_gen4_ptp.c:(.text+0x4dc): undefined reference to `ptp_clock_register'
    aarch64-linux-ld: drivers/net/ethernet/renesas/rcar_gen4_ptp.o: in function `rcar_gen4_ptp_unregister':
    rcar_gen4_ptp.c:(.text+0x584): undefined reference to `ptp_clock_unregister'

To fix the issue, add "depends on PTP_1588_CLOCK_OPTIONAL" into the
Kconfig.
Reported-by: default avatarkernel test robot <lkp@intel.com>
Suggested-by: default avatarArnd Bergmann <arnd@arndb.de>
Fixes: 6c6fa1a0 ("net: ethernet: renesas: rswitch: Add R-Car Gen4 gPTP support")
Signed-off-by: default avatarYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Link: https://lore.kernel.org/r/20221110012720.3552060-1-yoshihiro.shimoda.uh@renesas.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent f12ed9c0
...@@ -45,6 +45,7 @@ config RAVB ...@@ -45,6 +45,7 @@ config RAVB
config RENESAS_ETHER_SWITCH config RENESAS_ETHER_SWITCH
tristate "Renesas Ethernet Switch support" tristate "Renesas Ethernet Switch support"
depends on ARCH_RENESAS || COMPILE_TEST depends on ARCH_RENESAS || COMPILE_TEST
depends on PTP_1588_CLOCK_OPTIONAL
select CRC32 select CRC32
select MII select MII
select PHYLINK select PHYLINK
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment