Re: [RFC PATCH net-next 03/11] spi: Add a PTP system timestamp to the transfer structure

2019-08-20 Thread Mark Brown
On Tue, Aug 20, 2019 at 04:48:39PM +0300, Vladimir Oltean wrote: > On Tue, 20 Aug 2019 at 15:55, Mark Brown wrote: > > On Fri, Aug 16, 2019 at 05:05:53PM +0300, Vladimir Oltean wrote: > > > Maybe the SPI master driver should just report what sort of > > > snapshotting capability it can offer, ran

Re: [RFC PATCH net-next 03/11] spi: Add a PTP system timestamp to the transfer structure

2019-08-20 Thread Vladimir Oltean
Hi Mark, On Tue, 20 Aug 2019 at 15:55, Mark Brown wrote: > > On Fri, Aug 16, 2019 at 05:05:53PM +0300, Vladimir Oltean wrote: > > > I'm not sure how to respond to this, because I don't know anything > > about the timing of DMA transfers. > > Maybe snapshotting DMA transfers the same way is not po

Re: [RFC PATCH net-next 03/11] spi: Add a PTP system timestamp to the transfer structure

2019-08-20 Thread Mark Brown
On Fri, Aug 16, 2019 at 05:05:53PM +0300, Vladimir Oltean wrote: > I'm not sure how to respond to this, because I don't know anything > about the timing of DMA transfers. > Maybe snapshotting DMA transfers the same way is not possible (if at > all). Maybe they are not exactly adequate for this sor

Re: [RFC PATCH net-next 03/11] spi: Add a PTP system timestamp to the transfer structure

2019-08-18 Thread Andrew Lunn
> MDIO bus controllers are in a similar situation (with Hubert's patch) > but at least there the frame size is fixed and I haven't heard of an > MDIO controller to use DMA. Linux does not have any DMA driver MDIO busses, as far as i know. It does not make sense, since you are only transferring 16b

Re: [RFC PATCH net-next 03/11] spi: Add a PTP system timestamp to the transfer structure

2019-08-16 Thread Vladimir Oltean
On Fri, 16 Aug 2019 at 15:58, Mark Brown wrote: > > On Fri, Aug 16, 2019 at 03:35:30PM +0300, Vladimir Oltean wrote: > > On Fri, 16 Aug 2019 at 15:18, Mark Brown wrote: > > > On Fri, Aug 16, 2019 at 03:44:41AM +0300, Vladimir Oltean wrote: > > > > > @@ -842,6 +843,9 @@ struct spi_transfer { > > >

Re: [RFC PATCH net-next 03/11] spi: Add a PTP system timestamp to the transfer structure

2019-08-16 Thread Mark Brown
On Fri, Aug 16, 2019 at 03:35:30PM +0300, Vladimir Oltean wrote: > On Fri, 16 Aug 2019 at 15:18, Mark Brown wrote: > > On Fri, Aug 16, 2019 at 03:44:41AM +0300, Vladimir Oltean wrote: > > > @@ -842,6 +843,9 @@ struct spi_transfer { > > > > > > u32 effective_speed_hz; > > > > > >

Re: [RFC PATCH net-next 03/11] spi: Add a PTP system timestamp to the transfer structure

2019-08-16 Thread Vladimir Oltean
Hi Mark, On Fri, 16 Aug 2019 at 15:18, Mark Brown wrote: > > On Fri, Aug 16, 2019 at 03:44:41AM +0300, Vladimir Oltean wrote: > > > @@ -842,6 +843,9 @@ struct spi_transfer { > > > > u32 effective_speed_hz; > > > > + struct ptp_system_timestamp *ptp_sts; > > + unsigned in

Re: [RFC PATCH net-next 03/11] spi: Add a PTP system timestamp to the transfer structure

2019-08-16 Thread Mark Brown
On Fri, Aug 16, 2019 at 03:44:41AM +0300, Vladimir Oltean wrote: > @@ -842,6 +843,9 @@ struct spi_transfer { > > u32 effective_speed_hz; > > + struct ptp_system_timestamp *ptp_sts; > + unsigned intptp_sts_word_offset; > + You've not documented these fields at all

[RFC PATCH net-next 03/11] spi: Add a PTP system timestamp to the transfer structure

2019-08-15 Thread Vladimir Oltean
SPI is one of the interfaces used to access devices which have a POSIX clock driver (real time clocks, 1588 timers etc). Since there are lots of sources of timing jitter when retrieving the time from such a device (controller delays, locking contention etc), introduce a PTP system timestamp struct