All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Jonathan Lemon <jonathan.lemon@gmail.com>
Cc: netdev@vger.kernel.org, kernel-team@fb.com,
	Andrew Lunn <andrew@lunn.ch>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Richard Cochran <richardcochran@gmail.com>,
	Lasse Johnsen <l@ssejohnsen.me>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>,
	Broadcom internal kernel review list 
	<bcm-kernel-feedback-list@broadcom.com>
Subject: Re: [PATCH net-next v6 2/3] net: phy: broadcom: Add PTP support for some Broadcom PHYs.
Date: Fri, 10 Jun 2022 18:02:55 -0700	[thread overview]
Message-ID: <20220610180255.68586bd1@kernel.org> (raw)
In-Reply-To: <20220608204451.3124320-3-jonathan.lemon@gmail.com>

On Wed,  8 Jun 2022 13:44:50 -0700 Jonathan Lemon wrote:
> +config BCM_NET_PHYPTP
> +	tristate "Broadcom PHY PTP support"
> +	depends on NETWORK_PHY_TIMESTAMPING
> +	depends on PHYLIB
> +	depends on PTP_1588_CLOCK
> +	depends on BROADCOM_PHY
> +	depends on NET_PTP_CLASSIFY
> +	help
> +	  Supports PTP timestamping for certain Broadcom PHYs.

This will not prevent:

CONFIG_BCM_NET_PHYLIB=y
CONFIG_BCM_NET_PHYPTP=m

which fails to link:

ld: vmlinux.o: in function `bcm54xx_phy_probe':
broadcom.c:(.text+0x155dd6a): undefined reference to `bcm_ptp_probe'
ld: vmlinux.o: in function `bcm54xx_suspend':
broadcom.c:(.text+0x155e203): undefined reference to `bcm_ptp_stop'
ld: vmlinux.o: in function `bcm54xx_config_init':
broadcom.c:(.text+0x155e8a6): undefined reference to `bcm_ptp_config_init'

Can we always build PTP support in when NETWORK_PHY_TIMESTAMPING is
selected? Without adding an extra Kconfig, do:
 
+ifeq ($(CONFIG_NETWORK_PHY_TIMESTAMPING),)
 obj-$(CONFIG_BCM_NET_PHYLIB)	+= bcm-phy-lib.o
+else
+obj-$(CONFIG_BCM_NET_PHYLIB)	+= bcm-phy-lib.o bcm-phy-ptp.o
+endif

or some form thereof ?

  parent reply	other threads:[~2022-06-11  1:03 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-08 20:44 [PATCH net-next v6 0/3] Broadcom PTP PHY support Jonathan Lemon
2022-06-08 20:44 ` [PATCH net-next v6 1/3] net: phy: broadcom: Add Broadcom PTP hooks to bcm-phy-lib Jonathan Lemon
2022-06-08 20:44 ` [PATCH net-next v6 2/3] net: phy: broadcom: Add PTP support for some Broadcom PHYs Jonathan Lemon
2022-06-08 20:55   ` Richard Cochran
2022-06-08 21:29     ` Jonathan Lemon
2022-06-09  4:01       ` Richard Cochran
2022-06-09 19:21         ` Jonathan Lemon
2022-06-09 20:37           ` Richard Cochran
2022-06-11  1:02   ` Jakub Kicinski [this message]
2022-06-11 21:33     ` Jonathan Lemon
2022-06-13 16:13       ` Jakub Kicinski
2022-06-08 20:44 ` [PATCH net-next v6 3/3] net: phy: Add support for 1PPS out and external timestamps Jonathan Lemon
2022-06-08 20:50   ` Richard Cochran
2022-06-08 20:58     ` Jonathan Lemon
2022-06-09 20:38 ` [PATCH net-next v6 0/3] Broadcom PTP PHY support Richard Cochran

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220610180255.68586bd1@kernel.org \
    --to=kuba@kernel.org \
    --cc=andrew@lunn.ch \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=jonathan.lemon@gmail.com \
    --cc=kernel-team@fb.com \
    --cc=l@ssejohnsen.me \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=richardcochran@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.