From owner-freebsd-arm@FreeBSD.ORG Wed Feb 6 08:16:32 2013 Return-Path: Delivered-To: freebsd-arm@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 940BCEDE; Wed, 6 Feb 2013 08:16:32 +0000 (UTC) (envelope-from iain@g7iii.net) Received: from hal.g7iii.net (hal.g7iii.net [64.22.109.39]) by mx1.freebsd.org (Postfix) with ESMTP id 5E80B702; Wed, 6 Feb 2013 08:16:31 +0000 (UTC) Received: from [192.168.39.76] (157.17.187.81.in-addr.arpa [81.187.17.157]) by hal.g7iii.net (Postfix) with ESMTP id 315B1208F5; Wed, 6 Feb 2013 08:16:30 +0000 (UTC) Message-ID: <5112115D.5040709@g7iii.net> Date: Wed, 06 Feb 2013 08:16:29 +0000 From: Iain Young User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Ian Lepore Subject: Re: SD card -image- for the beaglebone References: <510A4F5B.7000407@g7iii.net> <1359646574.93359.327.camel@revolution.hippie.lan> <510AE1D6.8010203@g7iii.net> <1360124308.93359.557.camel@revolution.hippie.lan> In-Reply-To: <1360124308.93359.557.camel@revolution.hippie.lan> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-arm@FreeBSD.org X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2013 08:16:32 -0000 On 06/02/13 04:18, Ian Lepore wrote: > Check out what I taught my beaglebone to do today... > > root@bb:/ # ntpq -p > remote refid st t when poll reach delay offset jitter > ========================================================================== > oPPS(0) .PPS. 0 l 4 16 377 0.000 0.399 0.008 > +dvb.hippie.lan .GPS. 1 u 55 64 377 1.411 0.666 0.126 > +tflex.hippie.la .GPS. 1 u 15 64 377 0.901 1.867 0.904 > +paranoia.hippie .PPS. 1 u 61 64 377 0.396 0.426 0.025 > xutcnist2.colora .ACTS. 1 u 71 64 376 34.136 -11.277 4.656 > xnist1.symmetric .ACTS. 1 u 63 64 377 59.880 12.327 2.113 > -ntp.your.org .CDMA. 1 u 4 64 377 51.185 -4.212 4.215 > xntp1.conectiv.c .IRIG. 1 u 51 64 377 99.067 17.784 3.445 > > It turns out the chip has nice timer hardware that can latch the > freeruning timercounter in response to the PPS signal. That allows for > a PPS driver that doesn't use interrupts at all. The timecounter code > has a specific interface for such hardware, but there isn't much example > code in the base for how to use it. Soon there'll be more. :) > > I'll attach a patch in case anyone else wants to play with this. To use > it, apply the patch, add "options PPS_SYNC" to the kernel config, and > choose which timer pin you want to put the pps on. The attached patch > uses the timer4 pin, which is exposed on the P8 connector as pin #7. > You can use any of the timer4-timer7 pins, just set the one you want to > use to "input" in the dts and the driver will use it. Thanks for that, looks great, and very interesting. I'll do more than play with it (well when the 8 Gig card arrives anyway!) First thought, extending for multiple PPS :) [Because I can :P] Hopefully come the weekend I can rebuild the kernel using Tim's 8 Gig image, with this patch, and some more bits in the dts. Oh, and test with PHKs ntpns on DCF-77, assuming that module arrives as well. All the Best Iain