RE: [PATCH v3] ptp: add ToD device driver for Intel FPGA cards

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Original Message-----
> From: Ilpo Järvinen <ilpo.jarvinen@xxxxxxxxxxxxxxx>
> Sent: Wednesday, March 29, 2023 6:57 PM
> To: Zhang, Tianfei <tianfei.zhang@xxxxxxxxx>
> Cc: richardcochran@xxxxxxxxx; Netdev <netdev@xxxxxxxxxxxxxxx>; linux-
> fpga@xxxxxxxxxxxxxxx; Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>;
> Gomes, Vinicius <vinicius.gomes@xxxxxxxxx>; pierre-louis.bossart@xxxxxxxxxxxxxxx;
> Pagani, Marco <marpagan@xxxxxxxxxx>; Weight, Russell H
> <russell.h.weight@xxxxxxxxx>; matthew.gerlach@xxxxxxxxxxxxxxx; nico@xxxxxxxxxxx;
> Khadatare, RaghavendraX Anand <raghavendrax.anand.khadatare@xxxxxxxxx>
> Subject: Re: [PATCH v3] ptp: add ToD device driver for Intel FPGA cards
> 
> 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@xxxxxxxxx>
> > Signed-off-by: Tianfei Zhang <tianfei.zhang@xxxxxxxxx>
> >
> > ---
> > 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>

I will add it on v4 patch, thanks.

> 
> Other than that,
> 
> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@xxxxxxxxxxxxxxx>
> 
> --
>  i.




[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux