RE: [RFC PATCH net-next v4 1/2] macb: Add 1588 support in Cadence GEM.

2017-01-11 Thread Andrei.Pistirica
> On Tue, Jan 03, 2017 at 10:47:56AM +, Rafal Ozieblo wrote: > > We could use only descriptor approach but there are many Atmel's cores > on the market which support only event registers. > > As I said in my other reply in this thread, the Atmel cores cannot possibly be > made to work correc

Re: [RFC PATCH net-next v4 1/2] macb: Add 1588 support in Cadence GEM.

2017-01-03 Thread Nicolas Ferre
Le 03/01/2017 à 11:47, Rafal Ozieblo a écrit : >> From: Harini Katakam [mailto:harinikatakamli...@gmail.com] >> Sent: 3 stycznia 2017 06:06 >> Subject: Re: [RFC PATCH net-next v4 1/2] macb: Add 1588 support in Cadence >> GEM. >> >> Hi Richard, >>

Re: [RFC PATCH net-next v4 1/2] macb: Add 1588 support in Cadence GEM.

2017-01-03 Thread Richard Cochran
On Tue, Jan 03, 2017 at 10:47:56AM +, Rafal Ozieblo wrote: > We could use only descriptor approach but there are many Atmel's cores on the > market which support only event registers. As I said in my other reply in this thread, the Atmel cores cannot possibly be made to work correctly. Sad,

Re: [RFC PATCH net-next v4 1/2] macb: Add 1588 support in Cadence GEM.

2017-01-03 Thread Harini Katakam
Hi Richard, On Tue, Jan 3, 2017 at 3:59 PM, Richard Cochran wrote: > On Tue, Jan 03, 2017 at 10:36:11AM +0530, Harini Katakam wrote: >> I understand that it is not accurate - it is an initial version. > > Why do you say, "it is an initial version?" > > The Atmel device has this IP core burned in.

RE: [RFC PATCH net-next v4 1/2] macb: Add 1588 support in Cadence GEM.

2017-01-03 Thread Rafal Ozieblo
>From: Harini Katakam [mailto:harinikatakamli...@gmail.com] >Sent: 3 stycznia 2017 06:06 >Subject: Re: [RFC PATCH net-next v4 1/2] macb: Add 1588 support in Cadence GEM. > >Hi Richard, > >On Mon, Jan 2, 2017 at 9:43 PM, Richard Cochran >wrote: >> On Mon, Ja

Re: [RFC PATCH net-next v4 1/2] macb: Add 1588 support in Cadence GEM.

2017-01-03 Thread Richard Cochran
On Tue, Jan 03, 2017 at 10:36:11AM +0530, Harini Katakam wrote: > I understand that it is not accurate - it is an initial version. Why do you say, "it is an initial version?" The Atmel device has this IP core burned in. The core is hopelessly broken, and it cannot be fixed in SW either, so what

Re: [RFC PATCH net-next v4 1/2] macb: Add 1588 support in Cadence GEM.

2017-01-03 Thread Richard Cochran
On Tue, Jan 03, 2017 at 10:36:11AM +0530, Harini Katakam wrote: > I understand that it is not accurate - it is an initial version. No, it is not inaccurate at all, it is WRONG. This means that time stamps will be randomly associated with PTP network packets. To the application, the protocol will

Re: [RFC PATCH net-next v4 1/2] macb: Add 1588 support in Cadence GEM.

2017-01-02 Thread Harini Katakam
Hi Richard, On Mon, Jan 2, 2017 at 9:43 PM, Richard Cochran wrote: > On Mon, Jan 02, 2017 at 03:47:07PM +0100, Nicolas Ferre wrote: >> Le 02/01/2017 à 12:31, Richard Cochran a écrit : >> > This Cadence IP core is a complete disaster. >> >> Well, it evolved and propose several options to different

Re: [RFC PATCH net-next v4 1/2] macb: Add 1588 support in Cadence GEM.

2017-01-02 Thread Richard Cochran
On Mon, Jan 02, 2017 at 03:47:07PM +0100, Nicolas Ferre wrote: > Le 02/01/2017 à 12:31, Richard Cochran a écrit : > > This Cadence IP core is a complete disaster. > > Well, it evolved and propose several options to different SoC > integrators. This is not something unusual... > I suspect as well t

Re: [RFC PATCH net-next v4 1/2] macb: Add 1588 support in Cadence GEM.

2017-01-02 Thread Richard Cochran
On Mon, Jan 02, 2017 at 05:13:34PM +0530, Harini Katakam wrote: > From the revision history of Cadence spec, all versions starting > r1p02 have ability to include timestamp in descriptors. So why not add code to read the version, hm? > For previous versions the event register is the only option.

Re: [RFC PATCH net-next v4 1/2] macb: Add 1588 support in Cadence GEM.

2017-01-02 Thread Nicolas Ferre
Le 02/01/2017 à 12:31, Richard Cochran a écrit : > On Mon, Jan 02, 2017 at 09:36:10AM +, Rafal Ozieblo wrote: >> According Cadence Hardware team: >> "It is just that some customers prefer to have the time in the descriptors >> as that is provided per frame. >> The registers are simply overwrit

Re: [RFC PATCH net-next v4 1/2] macb: Add 1588 support in Cadence GEM.

2017-01-02 Thread Harini Katakam
Hi Richard, On Mon, Jan 2, 2017 at 5:01 PM, Richard Cochran wrote: > On Mon, Jan 02, 2017 at 09:36:10AM +, Rafal Ozieblo wrote: >> According Cadence Hardware team: >> "It is just that some customers prefer to have the time in the descriptors >> as that is provided per frame. >> The registers

Re: [RFC PATCH net-next v4 1/2] macb: Add 1588 support in Cadence GEM.

2017-01-02 Thread Richard Cochran
On Mon, Jan 02, 2017 at 09:36:10AM +, Rafal Ozieblo wrote: > According Cadence Hardware team: > "It is just that some customers prefer to have the time in the descriptors as > that is provided per frame. > The registers are simply overwritten when a new event frame is > transmitted/received a

RE: [RFC PATCH net-next v4 1/2] macb: Add 1588 support in Cadence GEM.

2017-01-02 Thread Rafal Ozieblo
> -Original Message- > From: Rafal Ozieblo > Sent: 28 grudnia 2016 14:23 > Subject: RE: [RFC PATCH net-next v4 1/2] macb: Add 1588 support in Cadence > GEM. > > > +static void gem_ptp_tx_hwtstamp(struct macb *bp, struct sk_buff *skb, > > +

RE: [RFC PATCH net-next v4 1/2] macb: Add 1588 support in Cadence GEM.

2016-12-28 Thread Rafal Ozieblo
> From: Andrei Pistirica [mailto:andrei.pistir...@microchip.com] > Sent: 14 grudnia 2016 13:56 > Subject: [RFC PATCH net-next v4 1/2] macb: Add 1588 support in Cadence GEM. > > Cadence GEM provides a 102 bit time counter with 48 bits for seconds, > 30 bits for nsecs and 24 bit

Re: [RFC PATCH net-next v4 1/2] macb: Add 1588 support in Cadence GEM.

2016-12-28 Thread Richard Cochran
On Wed, Dec 14, 2016 at 02:56:14PM +0200, Andrei Pistirica wrote: > Note 1: Kbuild uses "select" instead of "imply", and the macb maintainer > agreed > to make the change when it will be available in net-next. > +config MACB_USE_HWSTAMP > + bool "Use IEEE 1588 hwstamp" > + depends

[RFC PATCH net-next v4 1/2] macb: Add 1588 support in Cadence GEM.

2016-12-14 Thread Andrei Pistirica
Cadence GEM provides a 102 bit time counter with 48 bits for seconds, 30 bits for nsecs and 24 bits for sub-nsecs to control 1588 timestamping. This patch does the following: - Registers to ptp clock framework - Timer initialization is done by writing time of day to the timer counter. - ns increme