From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Tianfei Zhang <tianfei.zhang@intel.com>
Cc: richardcochran@gmail.com, Netdev <netdev@vger.kernel.org>,
linux-fpga@vger.kernel.org,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
vinicius.gomes@intel.com, pierre-louis.bossart@linux.intel.com,
marpagan@redhat.com, Russ Weight <russell.h.weight@intel.com>,
matthew.gerlach@linux.intel.com, nico@fluxnic.net,
Raghavendra Khadatare <raghavendrax.anand.khadatare@intel.com>
Subject: Re: [PATCH v3] ptp: add ToD device driver for Intel FPGA cards
Date: Wed, 29 Mar 2023 13:57:19 +0300 (EEST) [thread overview]
Message-ID: <4c4a416d-605f-939-62e7-5f779dffbc73@linux.intel.com> (raw)
In-Reply-To: <20230328142455.481146-1-tianfei.zhang@intel.com>
[-- Attachment #1: Type: text/plain, Size: 1874 bytes --]
On Tue, 28 Mar 2023, Tianfei Zhang wrote:
> Adding a DFL (Device Feature List) device driver of ToD device for
> Intel FPGA cards.
>
> The Intel FPGA Time of Day(ToD) IP within the FPGA DFL bus is exposed
> as PTP Hardware clock(PHC) device to the Linux PTP stack to synchronize
> the system clock to its ToD information using phc2sys utility of the
> Linux PTP stack. The DFL is a hardware List within FPGA, which defines
> a linked list of feature headers within the device MMIO space to provide
> an extensible way of adding subdevice features.
>
> Signed-off-by: Raghavendra Khadatare <raghavendrax.anand.khadatare@intel.com>
> Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com>
>
> ---
> v3:
> - add PTP_1588_CLOCK dependency for PTP_DFL_TOD in Kconfig file.
> - don't need handle NULL case for ptp_clock_register() after adding
> PTP_1588_CLOCK dependency.
> - wrap the code at 80 characters.
>
> v2:
> - handle NULL for ptp_clock_register().
> - use readl_poll_timeout_atomic() instead of readl_poll_timeout(), and
> change the interval timeout to 10us.
> - fix the uninitialized variable.
> ---
> diff --git a/drivers/ptp/ptp_dfl_tod.c b/drivers/ptp/ptp_dfl_tod.c
> new file mode 100644
> index 000000000000..f699d541b360
> --- /dev/null
> +++ b/drivers/ptp/ptp_dfl_tod.c
> @@ -0,0 +1,332 @@
> +#include <linux/bitfield.h>
> +#include <linux/delay.h>
> +#include <linux/dfl.h>
> +#include <linux/gcd.h>
> +#include <linux/iopoll.h>
> +#include <linux/module.h>
> +#include <linux/ptp_clock_kernel.h>
> +#include <linux/spinlock.h>
> +#include <linux/units.h>
> +static int dfl_tod_probe(struct dfl_device *ddev)
> +{
> + struct device *dev = &ddev->dev;
> + struct dfl_tod *dt;
> +
> + dt = devm_kzalloc(dev, sizeof(*dt), GFP_KERNEL);
+ #include <linux/device.h>
Other than that,
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
--
i.
next prev parent reply other threads:[~2023-03-29 10:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-28 14:24 [PATCH v3] ptp: add ToD device driver for Intel FPGA cards Tianfei Zhang
2023-03-28 14:42 ` Richard Cochran
2023-03-28 14:48 ` Arnd Bergmann
2023-03-28 23:45 ` Richard Cochran
2023-03-29 2:34 ` Richard Cochran
2023-03-29 10:57 ` Ilpo Järvinen [this message]
2023-03-29 13:54 ` Zhang, Tianfei
2023-03-30 4:40 ` patchwork-bot+netdevbpf
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=4c4a416d-605f-939-62e7-5f779dffbc73@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=linux-fpga@vger.kernel.org \
--cc=marpagan@redhat.com \
--cc=matthew.gerlach@linux.intel.com \
--cc=netdev@vger.kernel.org \
--cc=nico@fluxnic.net \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=raghavendrax.anand.khadatare@intel.com \
--cc=richardcochran@gmail.com \
--cc=russell.h.weight@intel.com \
--cc=tianfei.zhang@intel.com \
--cc=vinicius.gomes@intel.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;
as well as URLs for NNTP newsgroup(s).