diff options
author | Eric Ruei | 2019-03-21 09:19:26 -0500 |
---|---|---|
committer | Eric Ruei | 2019-03-21 10:37:57 -0500 |
commit | 2b48bb38da8453df1d57cbe0c58e8bb5551ec83c (patch) | |
tree | 9bf4992705ae3f46ce5d4fbda32a79857704f64b | |
parent | 308be592614861559690c911132c2aed4e2934d8 (diff) | |
download | linuxptp-ext/ti-linuxptp-release.tar.gz linuxptp-ext/ti-linuxptp-release.tar.xz linuxptp-ext/ti-linuxptp-release.zip |
ti: phc2sys: fix the error/warning messages for -r (REALTIME) optionext/ti-linuxptp-release
This patch removes the error/warning messages triggered by the -r
(REALTIME) option. The following two functions are not applicable to
CLOCK_REALTIME and therefore should not be invoked:
- enable_pps_output()
- enable_extts_input()
Signed-off-by: Eric Ruei <e-ruei1@ti.com>
-rw-r--r-- | phc2sys.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -964,6 +964,9 @@ static int autocfg_extts_init_clocks(struct node *node) | |||
964 | 964 | ||
965 | /* disable pps output and latch on all clocks */ | 965 | /* disable pps output and latch on all clocks */ |
966 | LIST_FOREACH(clock, &node->clocks, list) { | 966 | LIST_FOREACH(clock, &node->clocks, list) { |
967 | if (clock->clkid == CLOCK_REALTIME) | ||
968 | continue; | ||
969 | |||
967 | enable_pps_output(clock->clkid, 0); | 970 | enable_pps_output(clock->clkid, 0); |
968 | enable_extts_input(clock, CLK_EXTTS_IDX(n, clock), 0); | 971 | enable_extts_input(clock, CLK_EXTTS_IDX(n, clock), 0); |
969 | 972 | ||
@@ -1114,8 +1117,10 @@ static int do_autocfg_extts_loop(struct node *node, int subscriptions) | |||
1114 | } | 1117 | } |
1115 | 1118 | ||
1116 | LIST_FOREACH(clock, &node->clocks, list) { | 1119 | LIST_FOREACH(clock, &node->clocks, list) { |
1117 | enable_pps_output(clock->clkid, 0); | 1120 | if (clock->clkid != CLOCK_REALTIME) { |
1118 | enable_extts_input(clock, CLK_EXTTS_IDX(n, clock), 0); | 1121 | enable_pps_output(clock->clkid, 0); |
1122 | enable_extts_input(clock, CLK_EXTTS_IDX(n, clock), 0); | ||
1123 | } | ||
1119 | close(CLOCKID_TO_FD(clock->clkid)); | 1124 | close(CLOCKID_TO_FD(clock->clkid)); |
1120 | } | 1125 | } |
1121 | 1126 | ||