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

2016-12-12 Thread Richard Cochran
On Mon, Dec 12, 2016 at 10:22:43AM +, andrei.pistir...@microchip.com wrote: > Richard, are you agree with this? Yes, but please trim your replies next time. Scrolling through pages of quoted headers and stale content in order to read one line is very annoying. Thanks, Richard

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

2016-12-12 Thread Harini Katakam
electrons.com; >> alexandre.bell...@free-electrons.com; tbul...@pixelsurmer.com >> Subject: RE: [RFC PATCH net-next v3 1/2] macb: Add 1588 support in Cadence >> GEM. >> >> -Original Message- >> > From: andrei.pistir...@microchip.com >> > [mail

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

2016-12-12 Thread Andrei.Pistirica
.brezil...@free-electrons.com; > > alexandre.bell...@free-electrons.com; tbul...@pixelsurmer.com; Rafal > > Ozieblo > > Subject: RE: [RFC PATCH net-next v3 1/2] macb: Add 1588 support in > Cadence GEM. > > > > > > > > > -Original Message- >

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

2016-12-09 Thread Rafal Ozieblo
.@xilinx.com; boris.brezil...@free-electrons.com; > > alexandre.bell...@free-electrons.com; tbul...@pixelsurmer.com; > > raf...@cadence.com > > Subject: Re: [RFC PATCH net-next v3 1/2] macb: Add 1588 support in > > Cadence GEM. > > > > On Wed, Dec 07

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

2016-12-09 Thread Richard Cochran
On Fri, Dec 09, 2016 at 11:07:23AM +0530, Harini Katakam wrote: > I'm afraid I don't get why we are choosing the most limited max adj.. > Sorry if I'm missing something - could you please help me understand? This max_adj is only important when the local clock offset is large and user space chooses

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

2016-12-08 Thread Harini Katakam
> alexandre.bell...@free-electrons.com; tbul...@pixelsurmer.com; >> raf...@cadence.com >> Subject: Re: [RFC PATCH net-next v3 1/2] macb: Add 1588 support in >> Cadence GEM. >> >> On Wed, Dec 07, 2016 at 08:39:09PM +0100, Richard Cochran wrote: >> > > +static

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

2016-12-08 Thread Andrei.Pistirica
ubject: Re: [RFC PATCH net-next v3 1/2] macb: Add 1588 support in > Cadence GEM. > > On Wed, Dec 07, 2016 at 08:39:09PM +0100, Richard Cochran wrote: > > > +static s32 gem_ptp_max_adj(unsigned int f_nom) { > > > + u64 adj; > > > + > > > + /* The 48 b

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

2016-12-08 Thread Nicolas Ferre
Le 07/12/2016 à 20:39, Richard Cochran a écrit : > On Wed, Dec 07, 2016 at 08:21:51PM +0200, Andrei Pistirica wrote: >> +#ifdef CONFIG_MACB_USE_HWSTAMP >> +void gem_ptp_init(struct net_device *ndev); >> +void gem_ptp_remove(struct net_device *ndev); >> + >> +void gem_ptp_do_txstamp(struct macb *bp,

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

2016-12-07 Thread Richard Cochran
On Wed, Dec 07, 2016 at 08:39:09PM +0100, Richard Cochran wrote: > > +static s32 gem_ptp_max_adj(unsigned int f_nom) > > +{ > > + u64 adj; > > + > > + /* The 48 bits of seconds for the GEM overflows every: > > +* 2^48/(365.25 * 24 * 60 *60) =~ 8 925 512 years (~= 9 mil years), > > +* th

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

2016-12-07 Thread Richard Cochran
On Wed, Dec 07, 2016 at 08:21:51PM +0200, Andrei Pistirica wrote: > +#ifdef CONFIG_MACB_USE_HWSTAMP > +void gem_ptp_init(struct net_device *ndev); > +void gem_ptp_remove(struct net_device *ndev); > + > +void gem_ptp_do_txstamp(struct macb *bp, struct sk_buff *skb); > +void gem_ptp_do_rxstamp(struct

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

2016-12-07 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