diff mbox series

net: ti: icss-iep: add dependency for PTP

Message ID 20230916050701.15480-1-rdunlap@infradead.org (mailing list archive)
State Accepted
Delegated to: Netdev Maintainers
Headers show
Series net: ti: icss-iep: add dependency for PTP | expand

Checks

Context Check Description
netdev/series_format warning Single patches do not need cover letters; Target tree name not specified in the subject
netdev/tree_selection success Guessed tree name to be net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 9 this patch: 9
netdev/cc_maintainers fail 3 blamed authors not CCed: vigneshr@ti.com lokeshvutla@ti.com m-karicheri2@ti.com; 5 maintainers not CCed: vigneshr@ti.com lokeshvutla@ti.com grygorii.strashko@ti.com richardcochran@gmail.com m-karicheri2@ti.com
netdev/build_clang success Errors and warnings before: 9 this patch: 9
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 9 this patch: 9
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 14 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Randy Dunlap Sept. 16, 2023, 5:07 a.m. UTC
When CONFIG_PTP_1588_CLOCK=m and CONFIG_TI_ICSS_IEP=y,
there are build errors when referencing PTP functions.
Fix this by making TI_ICSS_IEP depend on PTP_1588_CLOCK_OPTIONAL.
Also, since TI_ICSSG_PRUETH selects TI_ICSS_IEP and selects don't
follow dependencies, make the former also depend on
PTP_1588_CLOCK_OPTIONAL.

Fixes these build errors:

aarch64-linux-ld: drivers/net/ethernet/ti/icssg/icss_iep.o: in function `icss_iep_get_ptp_clock_idx':
icss_iep.c:(.text+0x234): undefined reference to `ptp_clock_index'
aarch64-linux-ld: drivers/net/ethernet/ti/icssg/icss_iep.o: in function `icss_iep_exit':
icss_iep.c:(.text+0x634): undefined reference to `ptp_clock_unregister'
aarch64-linux-ld: drivers/net/ethernet/ti/icssg/icss_iep.o: in function `icss_iep_init':
icss_iep.c:(.text+0x1848): undefined reference to `ptp_clock_register'

Fixes: c1e0230eeaab ("net: ti: icss-iep: Add IEP driver")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: kernel test robot <lkp@intel.com>
Closes: lore.kernel.org/r/202309151207.NPDMiINe-lkp@intel.com
Cc: Roger Quadros <rogerq@ti.com>
Cc: Md Danish Anwar <danishanwar@ti.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Paolo Abeni <pabeni@redhat.com>
Cc: netdev@vger.kernel.org
---
 drivers/net/ethernet/ti/Kconfig |    2 ++
 1 file changed, 2 insertions(+)

Comments

Roger Quadros Sept. 18, 2023, 10:01 a.m. UTC | #1
On 16.9.2023 8.07, Randy Dunlap wrote:
> When CONFIG_PTP_1588_CLOCK=m and CONFIG_TI_ICSS_IEP=y,
> there are build errors when referencing PTP functions.
> Fix this by making TI_ICSS_IEP depend on PTP_1588_CLOCK_OPTIONAL.
> Also, since TI_ICSSG_PRUETH selects TI_ICSS_IEP and selects don't
> follow dependencies, make the former also depend on
> PTP_1588_CLOCK_OPTIONAL.
> 
> Fixes these build errors:
> 
> aarch64-linux-ld: drivers/net/ethernet/ti/icssg/icss_iep.o: in function `icss_iep_get_ptp_clock_idx':
> icss_iep.c:(.text+0x234): undefined reference to `ptp_clock_index'
> aarch64-linux-ld: drivers/net/ethernet/ti/icssg/icss_iep.o: in function `icss_iep_exit':
> icss_iep.c:(.text+0x634): undefined reference to `ptp_clock_unregister'
> aarch64-linux-ld: drivers/net/ethernet/ti/icssg/icss_iep.o: in function `icss_iep_init':
> icss_iep.c:(.text+0x1848): undefined reference to `ptp_clock_register'
> 
> Fixes: c1e0230eeaab ("net: ti: icss-iep: Add IEP driver")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: lore.kernel.org/r/202309151207.NPDMiINe-lkp@intel.com
> Cc: Roger Quadros <rogerq@ti.com>
> Cc: Md Danish Anwar <danishanwar@ti.com>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Eric Dumazet <edumazet@google.com>
> Cc: Jakub Kicinski <kuba@kernel.org>
> Cc: Paolo Abeni <pabeni@redhat.com>
> Cc: netdev@vger.kernel.org

Reviewed-by: Roger Quadros <rogerq@kernel.org>
MD Danish Anwar Sept. 19, 2023, 8:32 a.m. UTC | #2
On 16/09/23 10:37, Randy Dunlap wrote:
> When CONFIG_PTP_1588_CLOCK=m and CONFIG_TI_ICSS_IEP=y,
> there are build errors when referencing PTP functions.
> Fix this by making TI_ICSS_IEP depend on PTP_1588_CLOCK_OPTIONAL.
> Also, since TI_ICSSG_PRUETH selects TI_ICSS_IEP and selects don't
> follow dependencies, make the former also depend on
> PTP_1588_CLOCK_OPTIONAL.
> 
> Fixes these build errors:
> 
> aarch64-linux-ld: drivers/net/ethernet/ti/icssg/icss_iep.o: in function `icss_iep_get_ptp_clock_idx':
> icss_iep.c:(.text+0x234): undefined reference to `ptp_clock_index'
> aarch64-linux-ld: drivers/net/ethernet/ti/icssg/icss_iep.o: in function `icss_iep_exit':
> icss_iep.c:(.text+0x634): undefined reference to `ptp_clock_unregister'
> aarch64-linux-ld: drivers/net/ethernet/ti/icssg/icss_iep.o: in function `icss_iep_init':
> icss_iep.c:(.text+0x1848): undefined reference to `ptp_clock_register'
> 
> Fixes: c1e0230eeaab ("net: ti: icss-iep: Add IEP driver")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: lore.kernel.org/r/202309151207.NPDMiINe-lkp@intel.com
> Cc: Roger Quadros <rogerq@ti.com>
> Cc: Md Danish Anwar <danishanwar@ti.com>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Eric Dumazet <edumazet@google.com>
> Cc: Jakub Kicinski <kuba@kernel.org>
> Cc: Paolo Abeni <pabeni@redhat.com>
> Cc: netdev@vger.kernel.org
> ---
>  drivers/net/ethernet/ti/Kconfig |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff -- a/drivers/net/ethernet/ti/Kconfig b/drivers/net/ethernet/ti/Kconfig
> --- a/drivers/net/ethernet/ti/Kconfig
> +++ b/drivers/net/ethernet/ti/Kconfig
> @@ -189,6 +189,7 @@ config TI_ICSSG_PRUETH
>  	select TI_ICSS_IEP
>  	depends on PRU_REMOTEPROC
>  	depends on ARCH_K3 && OF && TI_K3_UDMA_GLUE_LAYER
> +	depends on PTP_1588_CLOCK_OPTIONAL
>  	help
>  	  Support dual Gigabit Ethernet ports over the ICSSG PRU Subsystem.
>  	  This subsystem is available starting with the AM65 platform.
> @@ -200,6 +201,7 @@ config TI_ICSSG_PRUETH
>  config TI_ICSS_IEP
>  	tristate "TI PRU ICSS IEP driver"
>  	depends on TI_PRUSS
> +	depends on PTP_1588_CLOCK_OPTIONAL
>  	default TI_PRUSS
>  	help
>  	  This driver enables support for the PRU-ICSS Industrial Ethernet

This doesn't apply cleanly on netdev/net (using git am) as the
dependency on PTP_1588_CLOCK_OPTIONAL in TI_ICSS_IEP is already added by
[1]. However the dependency on PTP_1588_CLOCK_OPTIONAL in
TI_ICSSG_PRUETH is not added yet and can be added by this patch.

With this,
Reviewed-by: MD Danish Anwar <danishanwar@ti.com>

[1]
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/commit/?id=a8f367f7e131
diff mbox series

Patch

diff -- a/drivers/net/ethernet/ti/Kconfig b/drivers/net/ethernet/ti/Kconfig
--- a/drivers/net/ethernet/ti/Kconfig
+++ b/drivers/net/ethernet/ti/Kconfig
@@ -189,6 +189,7 @@  config TI_ICSSG_PRUETH
 	select TI_ICSS_IEP
 	depends on PRU_REMOTEPROC
 	depends on ARCH_K3 && OF && TI_K3_UDMA_GLUE_LAYER
+	depends on PTP_1588_CLOCK_OPTIONAL
 	help
 	  Support dual Gigabit Ethernet ports over the ICSSG PRU Subsystem.
 	  This subsystem is available starting with the AM65 platform.
@@ -200,6 +201,7 @@  config TI_ICSSG_PRUETH
 config TI_ICSS_IEP
 	tristate "TI PRU ICSS IEP driver"
 	depends on TI_PRUSS
+	depends on PTP_1588_CLOCK_OPTIONAL
 	default TI_PRUSS
 	help
 	  This driver enables support for the PRU-ICSS Industrial Ethernet