All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Cochran <richardcochran@gmail.com>
To: Toshiharu Okada <toshiharu-linux@dsn.okisemi.com>
Cc: tomoya-linux@dsn.okisemi.com, kok.howg.ewe@intel.com,
	joel.clark@intel.com, yong.y.wang@intel.com, qi.wang@intel.com,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	richard.cochran@omicron.at
Subject: Re: [PATCH] Add pch ieee1588 driver for Intel EG20T PCH
Date: Wed, 10 Aug 2011 09:28:52 +0200	[thread overview]
Message-ID: <20110810072852.GA3619@riccoc20.at.omicron.at> (raw)
In-Reply-To: <817E42EB77CC464D9F0BA9D4CB92C152@hacdom.okisemi.com>

On Wed, Aug 10, 2011 at 02:03:32PM +0900, Toshiharu Okada wrote:
> Hi Richard
> 
> I added comment below.
> Please confirm them

Thanks, I have a few questions, below.

I will also comment on the patch itself.

> >Section 14.6.1.10 in the data sheet seems to imply that the input
> >clock is 50 MHz. In that case you could use a nominal frequency of
> >31.25 MHz (period 32 ns, SHIFT 5). However, you need to find out
> >the actual input clock frequency. If this can vary, then the driver
> >should allow changing these values.
> 
> modify as follows.
> 
> #define DEFAULT_ADDEND 0xA0000000
> #define TICKS_NS_SHIFT  5

Have you determined the input clock frequency?
If so, what is it?

> >> + u32 ch_control;
> >
> >You never program this register. But I think the "Mode" field should
> >be set to 2. The other settings really make no sense at all.  Or do
> >you set this in the MAC driver?
> >
> >(I wonder why Intel retained the very limited PTP V1 modes from the
> >IXP time stamping unit.)
> 
> ch_control register was set as 0x80020000    (Version:1, mode:2 )

It might make more sense to set this register in the MAC driver in
connection with enabling and disabling packet time stamps (see below).

> >This ISR code (and much of the rest of the driver) is copied from the
> >IXP driver. It would be nice to know if it actually works on the atom
> >hardware. Do have any hardware to try it on?
> 
> We have a board of atom(E600) and EG20T.
> However there is no environment for confirming auxiliary snapshot.

Well, if you plan to test the auxiliary snapshot on real hardware,
then we can leave the code as it is.

Otherwise, I would prefer to move the auxiliary snapshot code into a
separate patch. Then, we can wait to merge that code until someone
tests it.

I did test the auxiliary snapshot code on the IXP465, and probably it
will work just fine, but I want to be sure that it works on the atom
before merging.

> >I would also like to see how the time stamps are done in the MAC
> >driver. Have you already posted that?
> 
> Mac driver already upstreamed. ( drivers/net/pch_gbe)
> However the code relevant to IEEE1588 is not contained into Ethernet driver.
> I have question about rx/tx snapshot.
> Is it necessary to use a snapshot within an Ethernet driver driver?
> I was indicated that there must not be any dependence of a device when the 
> Ethernet driver was upstreamed.

(I assume that you mean "time stamp" when you say, "snapshot")

You will need to also add time stamping support into that driver. That
means supporting the SIOCSHWTSTAMP ioctl. As an example, you can take
a look at drivers/net/arm/ixp4xx_eth.c.

It would be nice to have a series of two patches, one adding the PHC
driver, and one adding SIOCSHWTSTAMP to the MAC driver.

Thanks,

Richard



      reply	other threads:[~2011-08-10  7:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-03  6:27 [PATCH] Add pch ieee1588 driver for Intel EG20T PCH Toshiharu Okada
2011-08-03 19:23 ` Richard Cochran
2011-08-05  4:51   ` Toshiharu Okada
2011-08-10  5:03   ` Toshiharu Okada
2011-08-10  7:28     ` Richard Cochran [this message]

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=20110810072852.GA3619@riccoc20.at.omicron.at \
    --to=richardcochran@gmail.com \
    --cc=joel.clark@intel.com \
    --cc=kok.howg.ewe@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=qi.wang@intel.com \
    --cc=richard.cochran@omicron.at \
    --cc=tomoya-linux@dsn.okisemi.com \
    --cc=toshiharu-linux@dsn.okisemi.com \
    --cc=yong.y.wang@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.