From: Yangbo Lu <yangbo.lu@nxp.com>
To: <devel@driverdev.osuosl.org>, <linux-kernel@vger.kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Richard Cochran <richardcochran@gmail.com>,
<dan.carpenter@oracle.com>,
Ioana Radulescu <ruxandra.radulescu@nxp.com>
Cc: Yangbo Lu <yangbo.lu@nxp.com>
Subject: [v2, 3/3] staging: fsl-dpaa2/rtc: support phc_index of ethtool_ts_info
Date: Thu, 26 Apr 2018 18:23:49 +0800 [thread overview]
Message-ID: <20180426102349.45222-3-yangbo.lu@nxp.com> (raw)
In-Reply-To: <20180426102349.45222-1-yangbo.lu@nxp.com>
This patch is to support phc_index of ethtool_ts_info.
Also make the rtc drvier depend on FSL_DPAA2_ETH because
this driver is only useful when PTP programs are getting
hardware time stamps on the PTP Ethernet packets using the
SO_TIMESTAMPING API.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
---
Changes for v2:
- Added this patch.
---
drivers/staging/fsl-dpaa2/Kconfig | 2 +-
drivers/staging/fsl-dpaa2/rtc/rtc.c | 6 ++----
drivers/staging/fsl-dpaa2/rtc/rtc.h | 14 ++++++++++++++
3 files changed, 17 insertions(+), 5 deletions(-)
create mode 100644 drivers/staging/fsl-dpaa2/rtc/rtc.h
diff --git a/drivers/staging/fsl-dpaa2/Kconfig b/drivers/staging/fsl-dpaa2/Kconfig
index ea2d4aa..cad016a 100644
--- a/drivers/staging/fsl-dpaa2/Kconfig
+++ b/drivers/staging/fsl-dpaa2/Kconfig
@@ -27,7 +27,7 @@ config FSL_DPAA2_ETHSW
config FSL_DPAA2_PTP_CLOCK
tristate "Freescale DPAA2 PTP Clock"
- depends on FSL_DPAA2
+ depends on FSL_DPAA2_ETH
select PTP_1588_CLOCK
help
This driver adds support for using the DPAA2 1588 timer module
diff --git a/drivers/staging/fsl-dpaa2/rtc/rtc.c b/drivers/staging/fsl-dpaa2/rtc/rtc.c
index 1d6405b..0d52cb8 100644
--- a/drivers/staging/fsl-dpaa2/rtc/rtc.c
+++ b/drivers/staging/fsl-dpaa2/rtc/rtc.c
@@ -9,14 +9,12 @@
#include <linux/ptp_clock_kernel.h>
#include <linux/fsl/mc.h>
-#include "dprtc.h"
-#include "dprtc-cmd.h"
+#include "rtc.h"
struct ptp_dpaa2_priv {
struct fsl_mc_device *rtc_mc_dev;
struct ptp_clock *clock;
struct ptp_clock_info caps;
- int phc_index;
u32 freq_comp;
};
@@ -173,7 +171,7 @@ static int rtc_probe(struct fsl_mc_device *mc_dev)
goto err_close;
}
- ptp_dpaa2->phc_index = ptp_clock_index(ptp_dpaa2->clock);
+ dpaa2_phc_index = ptp_clock_index(ptp_dpaa2->clock);
dev_set_drvdata(dev, ptp_dpaa2);
diff --git a/drivers/staging/fsl-dpaa2/rtc/rtc.h b/drivers/staging/fsl-dpaa2/rtc/rtc.h
new file mode 100644
index 0000000..ff2e177
--- /dev/null
+++ b/drivers/staging/fsl-dpaa2/rtc/rtc.h
@@ -0,0 +1,14 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright 2018 NXP
+ */
+
+#ifndef __RTC_H
+#define __RTC_H
+
+#include "dprtc.h"
+#include "dprtc-cmd.h"
+
+extern int dpaa2_phc_index;
+
+#endif
--
1.7.1
next prev parent reply other threads:[~2018-04-26 10:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-26 10:23 [v2, 1/3] staging: fsl-dpaa2/eth: Add support for hardware timestamping Yangbo Lu
2018-04-26 10:23 ` [v2, 2/3] staging: fsl-dpaa2/eth: add the get_ts_info interface for ethtool Yangbo Lu
2018-04-26 10:23 ` Yangbo Lu [this message]
2018-04-27 14:58 ` [v2, 1/3] staging: fsl-dpaa2/eth: Add support for hardware timestamping Greg Kroah-Hartman
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=20180426102349.45222-3-yangbo.lu@nxp.com \
--to=yangbo.lu@nxp.com \
--cc=dan.carpenter@oracle.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=richardcochran@gmail.com \
--cc=ruxandra.radulescu@nxp.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome