aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/pps
diff options
context:
space:
mode:
authorAlexander Gordeev <lasaine@lvk.cs.msu.su>2011-01-12 20:00:59 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2011-01-13 11:03:21 -0500
commit46b402a0e5e4b4d81b11c32dfb2312bf5828ecb5 (patch)
treef04bdc9a375a0f6c7447de58800dd2cd95be9ca5 /Documentation/pps
parenta10203c691eac287664f531b149ddc23056c2f61 (diff)
pps: add parallel port PPS signal generator
Add PPS signal generator which utilizes STROBE pin of a parallel port to send PPS signals. It uses parport abstraction layer and hrtimers to precisely control the signal. [akpm@linux-foundation.org: fix build] Signed-off-by: Alexander Gordeev <lasaine@lvk.cs.msu.su> Acked-by: Rodolfo Giometti <giometti@linux.it> Cc: john stultz <johnstul@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation/pps')
-rw-r--r--Documentation/pps/pps.txt46
1 files changed, 46 insertions, 0 deletions
diff --git a/Documentation/pps/pps.txt b/Documentation/pps/pps.txt
index 125f4ab48998..d35dcdd82ff6 100644
--- a/Documentation/pps/pps.txt
+++ b/Documentation/pps/pps.txt
@@ -170,3 +170,49 @@ and the run ppstest as follow:
170 170
171Please, note that to compile userland programs you need the file timepps.h 171Please, note that to compile userland programs you need the file timepps.h
172(see Documentation/pps/). 172(see Documentation/pps/).
173
174
175Generators
176----------
177
178Sometimes one needs to be able not only to catch PPS signals but to produce
179them also. For example, running a distributed simulation, which requires
180computers' clock to be synchronized very tightly. One way to do this is to
181invent some complicated hardware solutions but it may be neither necessary
182nor affordable. The cheap way is to load a PPS generator on one of the
183computers (master) and PPS clients on others (slaves), and use very simple
184cables to deliver signals using parallel ports, for example.
185
186Parallel port cable pinout:
187pin name master slave
1881 STROBE *------ *
1892 D0 * | *
1903 D1 * | *
1914 D2 * | *
1925 D3 * | *
1936 D4 * | *
1947 D5 * | *
1958 D6 * | *
1969 D7 * | *
19710 ACK * ------*
19811 BUSY * *
19912 PE * *
20013 SEL * *
20114 AUTOFD * *
20215 ERROR * *
20316 INIT * *
20417 SELIN * *
20518-25 GND *-----------*
206
207Please note that parallel port interrupt occurs only on high->low transition,
208so it is used for PPS assert edge. PPS clear edge can be determined only
209using polling in the interrupt handler which actually can be done way more
210precisely because interrupt handling delays can be quite big and random. So
211current parport PPS generator implementation (pps_gen_parport module) is
212geared towards using the clear edge for time synchronization.
213
214Clear edge polling is done with disabled interrupts so it's better to select
215delay between assert and clear edge as small as possible to reduce system
216latencies. But if it is too small slave won't be able to capture clear edge
217transition. The default of 30us should be good enough in most situations.
218The delay can be selected using 'delay' pps_gen_parport module parameter.