diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-25 11:59:42 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-25 11:59:42 -0400 |
commit | 22e12bbc9bc38c6d0bd541d061a0f547596fc19d (patch) | |
tree | 39b93f43b482c5b4cb9d99933384a8a7fcb85d71 /arch | |
parent | 19426a8f810752b4218e59b1e2187f33e255f7bc (diff) | |
parent | 86ff9baadf16c8a1b452d72f5585be63457d9b15 (diff) |
Merge branch 'timers-ptp-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'timers-ptp-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
ptp: Fix dp83640 build warning when building statically
ptp: Added a clock driver for the National Semiconductor PHYTER.
ptp: Added a clock driver for the IXP46x.
ptp: Added a clock that uses the eTSEC found on the MPC85xx.
ptp: Added a brand new class driver for ptp clocks.
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-ixp4xx/include/mach/ixp46x_ts.h | 78 | ||||
-rw-r--r-- | arch/powerpc/boot/dts/mpc8313erdb.dts | 13 | ||||
-rw-r--r-- | arch/powerpc/boot/dts/mpc8572ds.dts | 13 | ||||
-rw-r--r-- | arch/powerpc/boot/dts/p2020ds.dts | 13 | ||||
-rw-r--r-- | arch/powerpc/boot/dts/p2020rdb.dts | 13 |
5 files changed, 130 insertions, 0 deletions
diff --git a/arch/arm/mach-ixp4xx/include/mach/ixp46x_ts.h b/arch/arm/mach-ixp4xx/include/mach/ixp46x_ts.h new file mode 100644 index 000000000000..292d55ed2113 --- /dev/null +++ b/arch/arm/mach-ixp4xx/include/mach/ixp46x_ts.h | |||
@@ -0,0 +1,78 @@ | |||
1 | /* | ||
2 | * PTP 1588 clock using the IXP46X | ||
3 | * | ||
4 | * Copyright (C) 2010 OMICRON electronics GmbH | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
19 | */ | ||
20 | |||
21 | #ifndef _IXP46X_TS_H_ | ||
22 | #define _IXP46X_TS_H_ | ||
23 | |||
24 | #define DEFAULT_ADDEND 0xF0000029 | ||
25 | #define TICKS_NS_SHIFT 4 | ||
26 | |||
27 | struct ixp46x_channel_ctl { | ||
28 | u32 ch_control; /* 0x40 Time Synchronization Channel Control */ | ||
29 | u32 ch_event; /* 0x44 Time Synchronization Channel Event */ | ||
30 | u32 tx_snap_lo; /* 0x48 Transmit Snapshot Low Register */ | ||
31 | u32 tx_snap_hi; /* 0x4C Transmit Snapshot High Register */ | ||
32 | u32 rx_snap_lo; /* 0x50 Receive Snapshot Low Register */ | ||
33 | u32 rx_snap_hi; /* 0x54 Receive Snapshot High Register */ | ||
34 | u32 src_uuid_lo; /* 0x58 Source UUID0 Low Register */ | ||
35 | u32 src_uuid_hi; /* 0x5C Sequence Identifier/Source UUID0 High */ | ||
36 | }; | ||
37 | |||
38 | struct ixp46x_ts_regs { | ||
39 | u32 control; /* 0x00 Time Sync Control Register */ | ||
40 | u32 event; /* 0x04 Time Sync Event Register */ | ||
41 | u32 addend; /* 0x08 Time Sync Addend Register */ | ||
42 | u32 accum; /* 0x0C Time Sync Accumulator Register */ | ||
43 | u32 test; /* 0x10 Time Sync Test Register */ | ||
44 | u32 unused; /* 0x14 */ | ||
45 | u32 rsystime_lo; /* 0x18 RawSystemTime_Low Register */ | ||
46 | u32 rsystime_hi; /* 0x1C RawSystemTime_High Register */ | ||
47 | u32 systime_lo; /* 0x20 SystemTime_Low Register */ | ||
48 | u32 systime_hi; /* 0x24 SystemTime_High Register */ | ||
49 | u32 trgt_lo; /* 0x28 TargetTime_Low Register */ | ||
50 | u32 trgt_hi; /* 0x2C TargetTime_High Register */ | ||
51 | u32 asms_lo; /* 0x30 Auxiliary Slave Mode Snapshot Low */ | ||
52 | u32 asms_hi; /* 0x34 Auxiliary Slave Mode Snapshot High */ | ||
53 | u32 amms_lo; /* 0x38 Auxiliary Master Mode Snapshot Low */ | ||
54 | u32 amms_hi; /* 0x3C Auxiliary Master Mode Snapshot High */ | ||
55 | |||
56 | struct ixp46x_channel_ctl channel[3]; | ||
57 | }; | ||
58 | |||
59 | /* 0x00 Time Sync Control Register Bits */ | ||
60 | #define TSCR_AMM (1<<3) | ||
61 | #define TSCR_ASM (1<<2) | ||
62 | #define TSCR_TTM (1<<1) | ||
63 | #define TSCR_RST (1<<0) | ||
64 | |||
65 | /* 0x04 Time Sync Event Register Bits */ | ||
66 | #define TSER_SNM (1<<3) | ||
67 | #define TSER_SNS (1<<2) | ||
68 | #define TTIPEND (1<<1) | ||
69 | |||
70 | /* 0x40 Time Synchronization Channel Control Register Bits */ | ||
71 | #define MASTER_MODE (1<<0) | ||
72 | #define TIMESTAMP_ALL (1<<1) | ||
73 | |||
74 | /* 0x44 Time Synchronization Channel Event Register Bits */ | ||
75 | #define TX_SNAPSHOT_LOCKED (1<<0) | ||
76 | #define RX_SNAPSHOT_LOCKED (1<<1) | ||
77 | |||
78 | #endif | ||
diff --git a/arch/powerpc/boot/dts/mpc8313erdb.dts b/arch/powerpc/boot/dts/mpc8313erdb.dts index 761faa7b6964..ac1eb320c7b4 100644 --- a/arch/powerpc/boot/dts/mpc8313erdb.dts +++ b/arch/powerpc/boot/dts/mpc8313erdb.dts | |||
@@ -176,6 +176,19 @@ | |||
176 | sleep = <&pmc 0x00300000>; | 176 | sleep = <&pmc 0x00300000>; |
177 | }; | 177 | }; |
178 | 178 | ||
179 | ptp_clock@24E00 { | ||
180 | compatible = "fsl,etsec-ptp"; | ||
181 | reg = <0x24E00 0xB0>; | ||
182 | interrupts = <12 0x8 13 0x8>; | ||
183 | interrupt-parent = < &ipic >; | ||
184 | fsl,tclk-period = <10>; | ||
185 | fsl,tmr-prsc = <100>; | ||
186 | fsl,tmr-add = <0x999999A4>; | ||
187 | fsl,tmr-fiper1 = <0x3B9AC9F6>; | ||
188 | fsl,tmr-fiper2 = <0x00018696>; | ||
189 | fsl,max-adj = <659999998>; | ||
190 | }; | ||
191 | |||
179 | enet0: ethernet@24000 { | 192 | enet0: ethernet@24000 { |
180 | #address-cells = <1>; | 193 | #address-cells = <1>; |
181 | #size-cells = <1>; | 194 | #size-cells = <1>; |
diff --git a/arch/powerpc/boot/dts/mpc8572ds.dts b/arch/powerpc/boot/dts/mpc8572ds.dts index cafc1285c140..f6c04d25e916 100644 --- a/arch/powerpc/boot/dts/mpc8572ds.dts +++ b/arch/powerpc/boot/dts/mpc8572ds.dts | |||
@@ -324,6 +324,19 @@ | |||
324 | }; | 324 | }; |
325 | }; | 325 | }; |
326 | 326 | ||
327 | ptp_clock@24E00 { | ||
328 | compatible = "fsl,etsec-ptp"; | ||
329 | reg = <0x24E00 0xB0>; | ||
330 | interrupts = <68 2 69 2 70 2 71 2>; | ||
331 | interrupt-parent = < &mpic >; | ||
332 | fsl,tclk-period = <5>; | ||
333 | fsl,tmr-prsc = <200>; | ||
334 | fsl,tmr-add = <0xAAAAAAAB>; | ||
335 | fsl,tmr-fiper1 = <0x3B9AC9FB>; | ||
336 | fsl,tmr-fiper2 = <0x3B9AC9FB>; | ||
337 | fsl,max-adj = <499999999>; | ||
338 | }; | ||
339 | |||
327 | enet0: ethernet@24000 { | 340 | enet0: ethernet@24000 { |
328 | #address-cells = <1>; | 341 | #address-cells = <1>; |
329 | #size-cells = <1>; | 342 | #size-cells = <1>; |
diff --git a/arch/powerpc/boot/dts/p2020ds.dts b/arch/powerpc/boot/dts/p2020ds.dts index 2bcf3683d223..dae403100f2f 100644 --- a/arch/powerpc/boot/dts/p2020ds.dts +++ b/arch/powerpc/boot/dts/p2020ds.dts | |||
@@ -178,6 +178,19 @@ | |||
178 | 178 | ||
179 | }; | 179 | }; |
180 | 180 | ||
181 | ptp_clock@24E00 { | ||
182 | compatible = "fsl,etsec-ptp"; | ||
183 | reg = <0x24E00 0xB0>; | ||
184 | interrupts = <68 2 69 2 70 2>; | ||
185 | interrupt-parent = < &mpic >; | ||
186 | fsl,tclk-period = <5>; | ||
187 | fsl,tmr-prsc = <200>; | ||
188 | fsl,tmr-add = <0xCCCCCCCD>; | ||
189 | fsl,tmr-fiper1 = <0x3B9AC9FB>; | ||
190 | fsl,tmr-fiper2 = <0x0001869B>; | ||
191 | fsl,max-adj = <249999999>; | ||
192 | }; | ||
193 | |||
181 | enet0: ethernet@24000 { | 194 | enet0: ethernet@24000 { |
182 | tbi-handle = <&tbi0>; | 195 | tbi-handle = <&tbi0>; |
183 | phy-handle = <&phy0>; | 196 | phy-handle = <&phy0>; |
diff --git a/arch/powerpc/boot/dts/p2020rdb.dts b/arch/powerpc/boot/dts/p2020rdb.dts index 3782a58f13be..1d7a05f3021e 100644 --- a/arch/powerpc/boot/dts/p2020rdb.dts +++ b/arch/powerpc/boot/dts/p2020rdb.dts | |||
@@ -224,6 +224,19 @@ | |||
224 | status = "disabled"; | 224 | status = "disabled"; |
225 | }; | 225 | }; |
226 | 226 | ||
227 | ptp_clock@24E00 { | ||
228 | compatible = "fsl,etsec-ptp"; | ||
229 | reg = <0x24E00 0xB0>; | ||
230 | interrupts = <68 2 69 2 70 2>; | ||
231 | interrupt-parent = < &mpic >; | ||
232 | fsl,tclk-period = <5>; | ||
233 | fsl,tmr-prsc = <200>; | ||
234 | fsl,tmr-add = <0xCCCCCCCD>; | ||
235 | fsl,tmr-fiper1 = <0x3B9AC9FB>; | ||
236 | fsl,tmr-fiper2 = <0x0001869B>; | ||
237 | fsl,max-adj = <249999999>; | ||
238 | }; | ||
239 | |||
227 | enet0: ethernet@24000 { | 240 | enet0: ethernet@24000 { |
228 | fixed-link = <1 1 1000 0 0>; | 241 | fixed-link = <1 1 1000 0 0>; |
229 | phy-connection-type = "rgmii-id"; | 242 | phy-connection-type = "rgmii-id"; |