Add OpenCompute timecard driver
v3 cover Add OpenCompute timecard driver
From: Jonathan Lemon <[email protected]>
v2->v3:
remove dev_info() informational linesv1->v2:
make the driver dependent on CONFIG_PCI, for the test robot. move the config option under PTP_1588_CLOCK hierarcy
v1:
initial submission
Jonathan Lemon (1):
ptp: Add clock driver for the OpenCompute TimeCard.
drivers/ptp/Kconfig | 14 ++ drivers/ptp/Makefile | 1 + drivers/ptp/ptp_ocp.c | 400 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 415 insertions(+) create mode 100644 drivers/ptp/ptp_ocp.c
Signature · 1 line
2.24.1
PATCH v3 1/1 ptp: Add clock driver for the OpenCompute TimeCard.
The OpenCompute time card is an atomic clock along with a GPS receiver that provides a Grandmaster clock source for a PTP enabled network.
More information is available at http://www.timingcard.com/
--- drivers/ptp/Kconfig | 14 ++ drivers/ptp/Makefile | 1 + drivers/ptp/ptp_ocp.c | 398 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 413 insertions(+) create mode 100644 drivers/ptp/ptp_ocp.c
drivers/ptp/Kconfig +14 -0
@@ -151,4 +151,18 @@ config PTP_1588_CLOCK_VMW To compile this driver as a module, choose M here: the module will be called ptp_vmw. +config PTP_1588_CLOCK_OCP + tristate "OpenCompute TimeCard as PTP clock" + depends on PTP_1588_CLOCK + depends on HAS_IOMEM && PCI + default n + help + This driver adds support for an OpenCompute time card. + + The OpenCompute time card is an atomic clock along with + a GPS receiver that provides a Grandmaster clock source + for a PTP enabled network. + + More information is available at http://www.timingcard.com/ + endmenu
drivers/ptp/Makefile +1 -0
@@ -15,3 +15,4 @@ ptp-qoriq-$(CONFIG_DEBUG_FS) += ptp_qoriq_debugfs.o obj-$(CONFIG_PTP_1588_CLOCK_IDTCM) += ptp_clockmatrix.o obj-$(CONFIG_PTP_1588_CLOCK_IDT82P33) += ptp_idt82p33.o obj-$(CONFIG_PTP_1588_CLOCK_VMW) += ptp_vmw.o +obj-$(CONFIG_PTP_1588_CLOCK_OCP) += ptp_ocp.o
drivers/ptp/ptp_ocp.c new file +398 -0
398 lines not on this page · raw message
Signature · 1 line
2.24.1
Re: [PATCH 1/1 v3 net-next] ptp: Add clock driver for the OpenCompute TimeCard.
Quoted 7 lines · Jonathan Lemon
The OpenCompute time card is an atomic clock along with a GPS receiver that provides a Grandmaster clock source for a PTP enabled network.
More information is available at http://www.timingcard.com/
Signed-off-by Jonathan Lemon <[email protected]>
Re: [PATCH 1/1 v3 net-next] ptp: Add clock driver for the OpenCompute TimeCard.
Quoted 10 lines · On Fri, 4 Dec 2020 05:40:11 -0800 Richard Cochran wrote:
Quoted 7 lines · Jonathan Lemon
The OpenCompute time card is an atomic clock along with a GPS receiver that provides a Grandmaster clock source for a PTP enabled network.
More information is available at http://www.timingcard.com/
Signed-off-by Jonathan Lemon <[email protected]>Acked-by Richard Cochran <[email protected]>
Applied, thanks!
Jakub Kicinski
maintainerRe: [PATCH 1/1 v3 net-next] ptp: Add clock driver for the OpenCompute TimeCard.
In reply to Jonathan LemonQuoted 7 lines · On Thu, 3 Dec 2020 19:51:28 -0800 Jonathan Lemon wrote:
drivers/ptp/ptp_ocp.c new file +7
-0+static int __init +ptp_ocp_init (void ) +{ +int err; + + err =pci_register_driver (&ptp_ocp_driver); +return err;
drivers/ptp/ptp_ocp.c line 395
Quoted 10 lines
drivers/ptp/ptp_ocp.c new file +10
-0+} + +static void __exit +ptp_ocp_fini (void ) +{ +pci_unregister_driver (&ptp_ocp_driver); +} + +module_init (ptp_ocp_init); +module_exit (ptp_ocp_fini);
FWIW if you want to send a follow up you can replace all this with:
module_pci_driver(ptp_ocp_driver);
Jakub Kicinski
maintainerRe: [PATCH 1/1 v3 net-next] ptp: Add clock driver for the OpenCompute TimeCard.
Quoted 21 lines · On Sat, 5 Dec 2020 13:57:18 -0800 Jakub Kicinski wrote:
Quoted 7 lines · On Thu, 3 Dec 2020 19:51:28 -0800 Jonathan Lemon wrote:
drivers/ptp/ptp_ocp.c new file +7
-0+static int __init +ptp_ocp_init (void ) +{ +int err; + + err =pci_register_driver (&ptp_ocp_driver); +return err;drivers/ptp/ptp_ocp.c line 395
Quoted 10 lines
drivers/ptp/ptp_ocp.c new file +10
-0+} + +static void __exit +ptp_ocp_fini (void ) +{ +pci_unregister_driver (&ptp_ocp_driver); +} + +module_init (ptp_ocp_init); +module_exit (ptp_ocp_fini);FWIW if you want to send a follow up you can replace all this with:
Quoted 1 line
module_pci_driver(ptp_ocp_driver);
Also consider adding yourself a MAINTAINERS entry.