diff options
author | Alexander Gordeev <lasaine@lvk.cs.msu.su> | 2011-01-12 20:00:59 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-13 11:03:21 -0500 |
commit | 46b402a0e5e4b4d81b11c32dfb2312bf5828ecb5 (patch) | |
tree | f04bdc9a375a0f6c7447de58800dd2cd95be9ca5 /Documentation/pps | |
parent | a10203c691eac287664f531b149ddc23056c2f61 (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.txt | 46 |
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 | ||
171 | Please, note that to compile userland programs you need the file timepps.h | 171 | Please, note that to compile userland programs you need the file timepps.h |
172 | (see Documentation/pps/). | 172 | (see Documentation/pps/). |
173 | |||
174 | |||
175 | Generators | ||
176 | ---------- | ||
177 | |||
178 | Sometimes one needs to be able not only to catch PPS signals but to produce | ||
179 | them also. For example, running a distributed simulation, which requires | ||
180 | computers' clock to be synchronized very tightly. One way to do this is to | ||
181 | invent some complicated hardware solutions but it may be neither necessary | ||
182 | nor affordable. The cheap way is to load a PPS generator on one of the | ||
183 | computers (master) and PPS clients on others (slaves), and use very simple | ||
184 | cables to deliver signals using parallel ports, for example. | ||
185 | |||
186 | Parallel port cable pinout: | ||
187 | pin name master slave | ||
188 | 1 STROBE *------ * | ||
189 | 2 D0 * | * | ||
190 | 3 D1 * | * | ||
191 | 4 D2 * | * | ||
192 | 5 D3 * | * | ||
193 | 6 D4 * | * | ||
194 | 7 D5 * | * | ||
195 | 8 D6 * | * | ||
196 | 9 D7 * | * | ||
197 | 10 ACK * ------* | ||
198 | 11 BUSY * * | ||
199 | 12 PE * * | ||
200 | 13 SEL * * | ||
201 | 14 AUTOFD * * | ||
202 | 15 ERROR * * | ||
203 | 16 INIT * * | ||
204 | 17 SELIN * * | ||
205 | 18-25 GND *-----------* | ||
206 | |||
207 | Please note that parallel port interrupt occurs only on high->low transition, | ||
208 | so it is used for PPS assert edge. PPS clear edge can be determined only | ||
209 | using polling in the interrupt handler which actually can be done way more | ||
210 | precisely because interrupt handling delays can be quite big and random. So | ||
211 | current parport PPS generator implementation (pps_gen_parport module) is | ||
212 | geared towards using the clear edge for time synchronization. | ||
213 | |||
214 | Clear edge polling is done with disabled interrupts so it's better to select | ||
215 | delay between assert and clear edge as small as possible to reduce system | ||
216 | latencies. But if it is too small slave won't be able to capture clear edge | ||
217 | transition. The default of 30us should be good enough in most situations. | ||
218 | The delay can be selected using 'delay' pps_gen_parport module parameter. | ||