Subject: Re: [PATCH 0/3] [RFC] ptp: IEEE 1588 clock support

From: Wolfgang Grandegger <[email-masked]>
Date: Sun, 02 May 2010 13:51:23 +0200

Richard Cochran wrote:
> On Thu, Apr 29, 2010 at 02:02:59PM +0200, Wolfgang Grandegger wrote:
>> I realized two other netdev drivers already supporting PTP timestamping:
>> igb and bfin_mac. From the PTP developer point of view, the interface
>> looks rather complete to me and it works fine on my MPC8313 setup.
> 
> Do you know whether these two also have PTP clocks? If so, is the API
> that I suggested going to work for controlling those clocks, too?
> 
>> The only thing I stumbled over was that PTP clock registration
>> failed when PTP support is statically linked into the kernel.
> 
> Okay, will look into that...

With subsys_initcall(), ptp_gianfar_init() is called very early and
*before* ptp_init(). It works fine with module_init(). The
ptp_gianfar_init() is then called after gianfar_init().

There is another minor issue with module init/probe ordering.
gianfar_ptp_probe() does overtake the time from the system clock, which
may happen before the RTC is probed and initialized. But syncing with
the system time is a separate issue anyway.

Wolfgang.