Skip to contentSkip to conversation

net: dpaa2: build ptp clock driver in default

PATCH In review Yangbo Lu 2 participants 4 messages Jan 14, 2019 – Jan 18, 2019

Subsystems (3)
lore
Share & tools
lore

Yangbo Lu

author
#0 lore raw

PATCH 1/1 net: dpaa2: build ptp clock driver in default

This patch is to set "default y" for dpaa2 ptp driver building. It will provide user an available ptp clock in default.

---
 drivers/net/ethernet/freescale/dpaa2/Kconfig |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/net/ethernet/freescale/dpaa2/Kconfig +1 -0
index 809a155..15351fc 100644
@@ -11,6 +11,7 @@ config FSL_DPAA2_PTP_CLOCK
 	tristate "Freescale DPAA2 PTP Clock"
 	depends on FSL_DPAA2_ETH && POSIX_TIMERS
 	select PTP_1588_CLOCK
+	default y
 	help
 	  This driver adds support for using the DPAA2 1588 timer module
 	  as a PTP clock.
Signature · 1 line
1.7.1
#1 lore raw
Quoted 13 lines · Yangbo Lu

This patch is to set "default y" for dpaa2 ptp driver building. It will provide user an available ptp clock in default.

---
 drivers/net/ethernet/freescale/dpaa2/Kconfig |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/net/ethernet/freescale/dpaa2/Kconfig +0 -0
index 809a155..15351fc 100644

drivers/net/ethernet/freescale/dpaa2/Kconfig config FSL_DPAA2_PTP_CLOCK · line 13

Quoted 3 lines
drivers/net/ethernet/freescale/dpaa2/Kconfig +0 -0
@@ -11,6 +11,7 @@ config FSL_DPAA2_PTP_CLOCK
 	tristate "Freescale DPAA2 PTP Clock"
 	depends on FSL_DPAA2_ETH && POSIX_TIMERS
 	select PTP_1588_CLOCK

We want to use "imply" instead of "select" here.

drivers/net/ethernet/freescale/dpaa2/Kconfig config FSL_DPAA2_PTP_CLOCK · line 14

Quoted 1 line
drivers/net/ethernet/freescale/dpaa2/Kconfig +1 -0
+	default y

I'm okay with the defaulting to yes.

Thanks,
Richard

author
#2 lore raw

Hi Richard,

Quoted 19 lines

-----Original Message-----
From: Richard Cochran <[email protected]>
Sent: Friday, January 18, 2019 9:26 AM
To: Y.b. Lu <[email protected]>
Cc: [email protected]; David S . Miller <[email protected]>; Ioana Ciocoi Radulescu <[email protected]>
Subject: Re: [PATCH] net: dpaa2: build ptp clock driver in default

Review

Quoted 9 lines · Yangbo Lu

This patch is to set "default y" for dpaa2 ptp driver building. It will provide user an available ptp clock in default.

---
 drivers/net/ethernet/freescale/dpaa2/Kconfig |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
(quoted diff) +0 -0

b/drivers/net/ethernet/freescale/dpaa2/Kconfig

Quoted 9 lines

drivers/net/ethernet/freescale/dpaa2/Kconfig config FSL_DPAA2_PTP_CLOCK · line 13

Quoted 7 lines

index 809a155..15351fc 100644

drivers/net/ethernet/freescale/dpaa2/Kconfig +0 -0
@@ -11,6 +11,7 @@ config FSL_DPAA2_PTP_CLOCK
 	tristate "Freescale DPAA2 PTP Clock"
 	depends on FSL_DPAA2_ETH && POSIX_TIMERS
 	select PTP_1588_CLOCK

We want to use "imply" instead of "select" here.

[Y.b. Lu] Just learned the "imply" from the doc. I have a query here.
Since this allows to configure PTP_1588_CLOCK out, the PHC APIs of FSL_DPAA2_PTP_CLOCK driver may not work. Doesn't it matter?

Thanks.

Quoted 7 lines

drivers/net/ethernet/freescale/dpaa2/Kconfig config FSL_DPAA2_PTP_CLOCK · line 14

Quoted 2 lines
drivers/net/ethernet/freescale/dpaa2/Kconfig +1 -0
+	default y

I'm okay with the defaulting to yes.

Thanks,
Richard

#3 lore raw
Quoted 5 lines · Y.b. Lu
Quoted 1 line

We want to use "imply" instead of "select" here.

[Y.b. Lu] Just learned the "imply" from the doc. I have a query here.
Since this allows to configure PTP_1588_CLOCK out, the PHC APIs of FSL_DPAA2_PTP_CLOCK driver may not work. Doesn't it matter?

If PTP_1588_CLOCK is not compiled, then your driver should handle this case:

* ptp_clock_register() - register a PTP hardware clock driver

* Returns a valid pointer on success or PTR_ERR on failure. If PHC
* support is missing at the configuration level, this function
* returns NULL, and drivers are expected to gracefully handle that
* case separately.

Thanks,
Richard