Thread (20 messages) 20 messages, 3 authors, 2012-11-01

Re: [uclinux-dist-devel] [PATCH RFC net-next 2/4] bfin_mac: replace sys time stamps with raw ones instead.

From: Richard Cochran <richardcochran@gmail.com>
Date: 2012-10-30 13:41:27

On Tue, Oct 30, 2012 at 05:17:51PM +0800, Bob Liu wrote:
quoted
@@ -892,51 +879,25 @@ static void bfin_rx_hwtstamp(struct net_device *netdev, struct sk_buff *skb)

        regval = bfin_read_EMAC_PTP_RXSNAPLO();
        regval |= (u64)bfin_read_EMAC_PTP_RXSNAPHI() << 32;
-       ns = timecounter_cyc2time(&lp->clock, regval);
-       timecompare_update(&lp->compare, ns);
+       ns = regval >> lp->shift;
        memset(shhwtstamps, 0, sizeof(*shhwtstamps));
        shhwtstamps->hwtstamp = ns_to_ktime(ns);
-       shhwtstamps->syststamp = timecompare_transform(&lp->compare, ns);
-
-       bfin_dump_hwtamp("RX", &shhwtstamps->hwtstamp, &shhwtstamps->syststamp, &lp->compare);
-}
In my test,  system time in slave side can't be updated although here
have set shhwtstamps->hwtstamp = ns_to_ktime(ns).
Any idea?
So the "system time" in shhwtstamps->syststamp has been removed. Only
the raw value remains.

Or what do you mean by "can't be updated"?

How did you test this?

I would suggest the following:

1. test using Documentation/ptp/testptp to make sure the clock is
   working reasconably.

2. try ptp4l from http://linuxptp.sourceforge.net/ to make sure the
   time stamping is working

Thanks,
Richard
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help