Commit dfd464d3 authored by Jean-Claude BAU's avatar Jean-Claude BAU

KConfig: Optimize TimingMode against bad configuration

KConfig has been improved adding new extra constraints when the timing
mode is changed. It has an impact on port configuration
(externalPortConfiguration & default bmc mode) and also on the
overwritten clock class.
parent 8759073d
......@@ -686,6 +686,7 @@ menu "PTP options"
config PTP_OPT_OVERWRITE_CLOCK_CLASS
boolean "Overwrite default clock-class"
depends on TIME_BC || TIME_FM
default FALSE
help
The clock class is automatically set depending of the timing mode.
......@@ -693,8 +694,10 @@ config PTP_OPT_OVERWRITE_CLOCK_CLASS
config PTP_OPT_CLOCK_CLASS
int "clock-class"
default 248
range 0 255
default 52 if TIME_FM
default 248
range 128 255 if TIME_BC
range 52 122 if TIME_FM
depends on PTP_OPT_OVERWRITE_CLOCK_CLASS
help
An attribute defining the TAI traceability, synchronization state and
......
menu "Port Timing Configuration"
config PTP_OPT_EXT_PORT_CONFIG_ENABLED
bool "externalPortConfigurationEnabled"
default true
depends on TIME_BC
default false
help
This option is used by the high accuracy profile to force the port state.
When set, BMCA is disabled.
......@@ -110,8 +111,8 @@ config PORT01_INST01_ASYMMETRY_CORRECTION_ENABLE
choice
prompt "BMCA mode"
depends on PTP_OPT_EXT_PORT_CONFIG_ENABLED!=y
default PORT01_INST01_BMODE_MASTER_ONLY if TIME_BC
default PORT01_INST01_BMODE_AUTO
default PORT01_INST01_BMODE_MASTER_ONLY if TIME_GM || TIME_FM
default PORT01_INST01_BMODE_AUTO if TIME_BC
config PORT01_INST01_BMODE_MASTER_ONLY
bool "MasterOnly"
config PORT01_INST01_BMODE_AUTO
......@@ -321,8 +322,8 @@ config PORT01_INST02_ASYMMETRY_CORRECTION_ENABLE
choice
prompt "BMCA mode"
depends on PTP_OPT_EXT_PORT_CONFIG_ENABLED!=y
default PORT01_INST02_BMODE_MASTER_ONLY if TIME_BC
default PORT01_INST02_BMODE_AUTO
default PORT01_INST02_BMODE_MASTER_ONLY if TIME_GM || TIME_FM
default PORT01_INST02_BMODE_AUTO if TIME_BC
config PORT01_INST02_BMODE_MASTER_ONLY
bool "MasterOnly"
config PORT01_INST02_BMODE_AUTO
......@@ -565,8 +566,8 @@ config PORT02_INST01_ASYMMETRY_CORRECTION_ENABLE
choice
prompt "BMCA mode"
depends on PTP_OPT_EXT_PORT_CONFIG_ENABLED!=y
default PORT02_INST01_BMODE_MASTER_ONLY if TIME_BC
default PORT02_INST01_BMODE_AUTO
default PORT02_INST01_BMODE_MASTER_ONLY if TIME_GM || TIME_FM
default PORT02_INST01_BMODE_AUTO if TIME_BC
config PORT02_INST01_BMODE_MASTER_ONLY
bool "MasterOnly"
config PORT02_INST01_BMODE_AUTO
......@@ -775,8 +776,8 @@ config PORT02_INST02_ASYMMETRY_CORRECTION_ENABLE
choice
prompt "BMCA mode"
depends on PTP_OPT_EXT_PORT_CONFIG_ENABLED!=y
default PORT02_INST02_BMODE_MASTER_ONLY if TIME_BC
default PORT02_INST02_BMODE_AUTO
default PORT02_INST02_BMODE_MASTER_ONLY if TIME_GM || TIME_FM
default PORT02_INST02_BMODE_AUTO if TIME_BC
config PORT02_INST02_BMODE_MASTER_ONLY
bool "MasterOnly"
config PORT02_INST02_BMODE_AUTO
......@@ -1019,8 +1020,8 @@ config PORT03_INST01_ASYMMETRY_CORRECTION_ENABLE
choice
prompt "BMCA mode"
depends on PTP_OPT_EXT_PORT_CONFIG_ENABLED!=y
default PORT03_INST01_BMODE_MASTER_ONLY if TIME_BC
default PORT03_INST01_BMODE_AUTO
default PORT03_INST01_BMODE_MASTER_ONLY if TIME_GM || TIME_FM
default PORT03_INST01_BMODE_AUTO if TIME_BC
config PORT03_INST01_BMODE_MASTER_ONLY
bool "MasterOnly"
config PORT03_INST01_BMODE_AUTO
......@@ -1229,8 +1230,8 @@ config PORT03_INST02_ASYMMETRY_CORRECTION_ENABLE
choice
prompt "BMCA mode"
depends on PTP_OPT_EXT_PORT_CONFIG_ENABLED!=y
default PORT03_INST02_BMODE_MASTER_ONLY if TIME_BC
default PORT03_INST02_BMODE_AUTO
default PORT03_INST02_BMODE_MASTER_ONLY if TIME_GM || TIME_FM
default PORT03_INST02_BMODE_AUTO if TIME_BC
config PORT03_INST02_BMODE_MASTER_ONLY
bool "MasterOnly"
config PORT03_INST02_BMODE_AUTO
......@@ -1473,8 +1474,8 @@ config PORT04_INST01_ASYMMETRY_CORRECTION_ENABLE
choice
prompt "BMCA mode"
depends on PTP_OPT_EXT_PORT_CONFIG_ENABLED!=y
default PORT04_INST01_BMODE_MASTER_ONLY if TIME_BC
default PORT04_INST01_BMODE_AUTO
default PORT04_INST01_BMODE_MASTER_ONLY if TIME_GM || TIME_FM
default PORT04_INST01_BMODE_AUTO if TIME_BC
config PORT04_INST01_BMODE_MASTER_ONLY
bool "MasterOnly"
config PORT04_INST01_BMODE_AUTO
......@@ -1683,8 +1684,8 @@ config PORT04_INST02_ASYMMETRY_CORRECTION_ENABLE
choice
prompt "BMCA mode"
depends on PTP_OPT_EXT_PORT_CONFIG_ENABLED!=y
default PORT04_INST02_BMODE_MASTER_ONLY if TIME_BC
default PORT04_INST02_BMODE_AUTO
default PORT04_INST02_BMODE_MASTER_ONLY if TIME_GM || TIME_FM
default PORT04_INST02_BMODE_AUTO if TIME_BC
config PORT04_INST02_BMODE_MASTER_ONLY
bool "MasterOnly"
config PORT04_INST02_BMODE_AUTO
......@@ -1927,8 +1928,8 @@ config PORT05_INST01_ASYMMETRY_CORRECTION_ENABLE
choice
prompt "BMCA mode"
depends on PTP_OPT_EXT_PORT_CONFIG_ENABLED!=y
default PORT05_INST01_BMODE_MASTER_ONLY if TIME_BC
default PORT05_INST01_BMODE_AUTO
default PORT05_INST01_BMODE_MASTER_ONLY if TIME_GM || TIME_FM
default PORT05_INST01_BMODE_AUTO if TIME_BC
config PORT05_INST01_BMODE_MASTER_ONLY
bool "MasterOnly"
config PORT05_INST01_BMODE_AUTO
......@@ -2137,8 +2138,8 @@ config PORT05_INST02_ASYMMETRY_CORRECTION_ENABLE
choice
prompt "BMCA mode"
depends on PTP_OPT_EXT_PORT_CONFIG_ENABLED!=y
default PORT05_INST02_BMODE_MASTER_ONLY if TIME_BC
default PORT05_INST02_BMODE_AUTO
default PORT05_INST02_BMODE_MASTER_ONLY if TIME_GM || TIME_FM
default PORT05_INST02_BMODE_AUTO if TIME_BC
config PORT05_INST02_BMODE_MASTER_ONLY
bool "MasterOnly"
config PORT05_INST02_BMODE_AUTO
......@@ -2381,8 +2382,8 @@ config PORT06_INST01_ASYMMETRY_CORRECTION_ENABLE
choice
prompt "BMCA mode"
depends on PTP_OPT_EXT_PORT_CONFIG_ENABLED!=y
default PORT06_INST01_BMODE_MASTER_ONLY if TIME_BC
default PORT06_INST01_BMODE_AUTO
default PORT06_INST01_BMODE_MASTER_ONLY if TIME_GM || TIME_FM
default PORT06_INST01_BMODE_AUTO if TIME_BC
config PORT06_INST01_BMODE_MASTER_ONLY
bool "MasterOnly"
config PORT06_INST01_BMODE_AUTO
......@@ -2591,8 +2592,8 @@ config PORT06_INST02_ASYMMETRY_CORRECTION_ENABLE
choice
prompt "BMCA mode"
depends on PTP_OPT_EXT_PORT_CONFIG_ENABLED!=y
default PORT06_INST02_BMODE_MASTER_ONLY if TIME_BC
default PORT06_INST02_BMODE_AUTO
default PORT06_INST02_BMODE_MASTER_ONLY if TIME_GM || TIME_FM
default PORT06_INST02_BMODE_AUTO if TIME_BC
config PORT06_INST02_BMODE_MASTER_ONLY
bool "MasterOnly"
config PORT06_INST02_BMODE_AUTO
......@@ -2835,8 +2836,8 @@ config PORT07_INST01_ASYMMETRY_CORRECTION_ENABLE
choice
prompt "BMCA mode"
depends on PTP_OPT_EXT_PORT_CONFIG_ENABLED!=y
default PORT07_INST01_BMODE_MASTER_ONLY if TIME_BC
default PORT07_INST01_BMODE_AUTO
default PORT07_INST01_BMODE_MASTER_ONLY if TIME_GM || TIME_FM
default PORT07_INST01_BMODE_AUTO if TIME_BC
config PORT07_INST01_BMODE_MASTER_ONLY
bool "MasterOnly"
config PORT07_INST01_BMODE_AUTO
......@@ -3045,8 +3046,8 @@ config PORT07_INST02_ASYMMETRY_CORRECTION_ENABLE
choice
prompt "BMCA mode"
depends on PTP_OPT_EXT_PORT_CONFIG_ENABLED!=y
default PORT07_INST02_BMODE_MASTER_ONLY if TIME_BC
default PORT07_INST02_BMODE_AUTO
default PORT07_INST02_BMODE_MASTER_ONLY if TIME_GM || TIME_FM
default PORT07_INST02_BMODE_AUTO if TIME_BC
config PORT07_INST02_BMODE_MASTER_ONLY
bool "MasterOnly"
config PORT07_INST02_BMODE_AUTO
......@@ -3289,8 +3290,8 @@ config PORT08_INST01_ASYMMETRY_CORRECTION_ENABLE
choice
prompt "BMCA mode"
depends on PTP_OPT_EXT_PORT_CONFIG_ENABLED!=y
default PORT08_INST01_BMODE_MASTER_ONLY if TIME_BC
default PORT08_INST01_BMODE_AUTO
default PORT08_INST01_BMODE_MASTER_ONLY if TIME_GM || TIME_FM
default PORT08_INST01_BMODE_AUTO if TIME_BC
config PORT08_INST01_BMODE_MASTER_ONLY
bool "MasterOnly"
config PORT08_INST01_BMODE_AUTO
......@@ -3499,8 +3500,8 @@ config PORT08_INST02_ASYMMETRY_CORRECTION_ENABLE
choice
prompt "BMCA mode"
depends on PTP_OPT_EXT_PORT_CONFIG_ENABLED!=y
default PORT08_INST02_BMODE_MASTER_ONLY if TIME_BC
default PORT08_INST02_BMODE_AUTO
default PORT08_INST02_BMODE_MASTER_ONLY if TIME_GM || TIME_FM
default PORT08_INST02_BMODE_AUTO if TIME_BC
config PORT08_INST02_BMODE_MASTER_ONLY
bool "MasterOnly"
config PORT08_INST02_BMODE_AUTO
......@@ -3743,8 +3744,8 @@ config PORT09_INST01_ASYMMETRY_CORRECTION_ENABLE
choice
prompt "BMCA mode"
depends on PTP_OPT_EXT_PORT_CONFIG_ENABLED!=y
default PORT09_INST01_BMODE_MASTER_ONLY if TIME_BC
default PORT09_INST01_BMODE_AUTO
default PORT09_INST01_BMODE_MASTER_ONLY if TIME_GM || TIME_FM
default PORT09_INST01_BMODE_AUTO if TIME_BC
config PORT09_INST01_BMODE_MASTER_ONLY
bool "MasterOnly"
config PORT09_INST01_BMODE_AUTO
......@@ -3953,8 +3954,8 @@ config PORT09_INST02_ASYMMETRY_CORRECTION_ENABLE
choice
prompt "BMCA mode"
depends on PTP_OPT_EXT_PORT_CONFIG_ENABLED!=y
default PORT09_INST02_BMODE_MASTER_ONLY if TIME_BC
default PORT09_INST02_BMODE_AUTO
default PORT09_INST02_BMODE_MASTER_ONLY if TIME_GM || TIME_FM
default PORT09_INST02_BMODE_AUTO if TIME_BC
config PORT09_INST02_BMODE_MASTER_ONLY
bool "MasterOnly"
config PORT09_INST02_BMODE_AUTO
......@@ -4197,8 +4198,8 @@ config PORT10_INST01_ASYMMETRY_CORRECTION_ENABLE
choice
prompt "BMCA mode"
depends on PTP_OPT_EXT_PORT_CONFIG_ENABLED!=y
default PORT10_INST01_BMODE_MASTER_ONLY if TIME_BC
default PORT10_INST01_BMODE_AUTO
default PORT10_INST01_BMODE_MASTER_ONLY if TIME_GM || TIME_FM
default PORT10_INST01_BMODE_AUTO if TIME_BC
config PORT10_INST01_BMODE_MASTER_ONLY
bool "MasterOnly"
config PORT10_INST01_BMODE_AUTO
......@@ -4407,8 +4408,8 @@ config PORT10_INST02_ASYMMETRY_CORRECTION_ENABLE
choice
prompt "BMCA mode"
depends on PTP_OPT_EXT_PORT_CONFIG_ENABLED!=y
default PORT10_INST02_BMODE_MASTER_ONLY if TIME_BC
default PORT10_INST02_BMODE_AUTO
default PORT10_INST02_BMODE_MASTER_ONLY if TIME_GM || TIME_FM
default PORT10_INST02_BMODE_AUTO if TIME_BC
config PORT10_INST02_BMODE_MASTER_ONLY
bool "MasterOnly"
config PORT10_INST02_BMODE_AUTO
......@@ -4651,8 +4652,8 @@ config PORT11_INST01_ASYMMETRY_CORRECTION_ENABLE
choice
prompt "BMCA mode"
depends on PTP_OPT_EXT_PORT_CONFIG_ENABLED!=y
default PORT11_INST01_BMODE_MASTER_ONLY if TIME_BC
default PORT11_INST01_BMODE_AUTO
default PORT11_INST01_BMODE_MASTER_ONLY if TIME_GM || TIME_FM
default PORT11_INST01_BMODE_AUTO if TIME_BC
config PORT11_INST01_BMODE_MASTER_ONLY
bool "MasterOnly"
config PORT11_INST01_BMODE_AUTO
......@@ -4861,8 +4862,8 @@ config PORT11_INST02_ASYMMETRY_CORRECTION_ENABLE
choice
prompt "BMCA mode"
depends on PTP_OPT_EXT_PORT_CONFIG_ENABLED!=y
default PORT11_INST02_BMODE_MASTER_ONLY if TIME_BC
default PORT11_INST02_BMODE_AUTO
default PORT11_INST02_BMODE_MASTER_ONLY if TIME_GM || TIME_FM
default PORT11_INST02_BMODE_AUTO if TIME_BC
config PORT11_INST02_BMODE_MASTER_ONLY
bool "MasterOnly"
config PORT11_INST02_BMODE_AUTO
......@@ -5105,8 +5106,8 @@ config PORT12_INST01_ASYMMETRY_CORRECTION_ENABLE
choice
prompt "BMCA mode"
depends on PTP_OPT_EXT_PORT_CONFIG_ENABLED!=y
default PORT12_INST01_BMODE_MASTER_ONLY if TIME_BC
default PORT12_INST01_BMODE_AUTO
default PORT12_INST01_BMODE_MASTER_ONLY if TIME_GM || TIME_FM
default PORT12_INST01_BMODE_AUTO if TIME_BC
config PORT12_INST01_BMODE_MASTER_ONLY
bool "MasterOnly"
config PORT12_INST01_BMODE_AUTO
......@@ -5315,8 +5316,8 @@ config PORT12_INST02_ASYMMETRY_CORRECTION_ENABLE
choice
prompt "BMCA mode"
depends on PTP_OPT_EXT_PORT_CONFIG_ENABLED!=y
default PORT12_INST02_BMODE_MASTER_ONLY if TIME_BC
default PORT12_INST02_BMODE_AUTO
default PORT12_INST02_BMODE_MASTER_ONLY if TIME_GM || TIME_FM
default PORT12_INST02_BMODE_AUTO if TIME_BC
config PORT12_INST02_BMODE_MASTER_ONLY
bool "MasterOnly"
config PORT12_INST02_BMODE_AUTO
......@@ -5559,8 +5560,8 @@ config PORT13_INST01_ASYMMETRY_CORRECTION_ENABLE
choice
prompt "BMCA mode"
depends on PTP_OPT_EXT_PORT_CONFIG_ENABLED!=y
default PORT13_INST01_BMODE_MASTER_ONLY if TIME_BC
default PORT13_INST01_BMODE_AUTO
default PORT13_INST01_BMODE_MASTER_ONLY if TIME_GM || TIME_FM
default PORT13_INST01_BMODE_AUTO if TIME_BC
config PORT13_INST01_BMODE_MASTER_ONLY
bool "MasterOnly"
config PORT13_INST01_BMODE_AUTO
......@@ -5769,8 +5770,8 @@ config PORT13_INST02_ASYMMETRY_CORRECTION_ENABLE
choice
prompt "BMCA mode"
depends on PTP_OPT_EXT_PORT_CONFIG_ENABLED!=y
default PORT13_INST02_BMODE_MASTER_ONLY if TIME_BC
default PORT13_INST02_BMODE_AUTO
default PORT13_INST02_BMODE_MASTER_ONLY if TIME_GM || TIME_FM
default PORT13_INST02_BMODE_AUTO if TIME_BC
config PORT13_INST02_BMODE_MASTER_ONLY
bool "MasterOnly"
config PORT13_INST02_BMODE_AUTO
......@@ -6013,8 +6014,8 @@ config PORT14_INST01_ASYMMETRY_CORRECTION_ENABLE
choice
prompt "BMCA mode"
depends on PTP_OPT_EXT_PORT_CONFIG_ENABLED!=y
default PORT14_INST01_BMODE_MASTER_ONLY if TIME_BC
default PORT14_INST01_BMODE_AUTO
default PORT14_INST01_BMODE_MASTER_ONLY if TIME_GM || TIME_FM
default PORT14_INST01_BMODE_AUTO if TIME_BC
config PORT14_INST01_BMODE_MASTER_ONLY
bool "MasterOnly"
config PORT14_INST01_BMODE_AUTO
......@@ -6223,8 +6224,8 @@ config PORT14_INST02_ASYMMETRY_CORRECTION_ENABLE
choice
prompt "BMCA mode"
depends on PTP_OPT_EXT_PORT_CONFIG_ENABLED!=y
default PORT14_INST02_BMODE_MASTER_ONLY if TIME_BC
default PORT14_INST02_BMODE_AUTO
default PORT14_INST02_BMODE_MASTER_ONLY if TIME_GM || TIME_FM
default PORT14_INST02_BMODE_AUTO if TIME_BC
config PORT14_INST02_BMODE_MASTER_ONLY
bool "MasterOnly"
config PORT14_INST02_BMODE_AUTO
......@@ -6467,8 +6468,8 @@ config PORT15_INST01_ASYMMETRY_CORRECTION_ENABLE
choice
prompt "BMCA mode"
depends on PTP_OPT_EXT_PORT_CONFIG_ENABLED!=y
default PORT15_INST01_BMODE_MASTER_ONLY if TIME_BC
default PORT15_INST01_BMODE_AUTO
default PORT15_INST01_BMODE_MASTER_ONLY if TIME_GM || TIME_FM
default PORT15_INST01_BMODE_AUTO if TIME_BC
config PORT15_INST01_BMODE_MASTER_ONLY
bool "MasterOnly"
config PORT15_INST01_BMODE_AUTO
......@@ -6677,8 +6678,8 @@ config PORT15_INST02_ASYMMETRY_CORRECTION_ENABLE
choice
prompt "BMCA mode"
depends on PTP_OPT_EXT_PORT_CONFIG_ENABLED!=y
default PORT15_INST02_BMODE_MASTER_ONLY if TIME_BC
default PORT15_INST02_BMODE_AUTO
default PORT15_INST02_BMODE_MASTER_ONLY if TIME_GM || TIME_FM
default PORT15_INST02_BMODE_AUTO if TIME_BC
config PORT15_INST02_BMODE_MASTER_ONLY
bool "MasterOnly"
config PORT15_INST02_BMODE_AUTO
......@@ -6921,8 +6922,8 @@ config PORT16_INST01_ASYMMETRY_CORRECTION_ENABLE
choice
prompt "BMCA mode"
depends on PTP_OPT_EXT_PORT_CONFIG_ENABLED!=y
default PORT16_INST01_BMODE_MASTER_ONLY if TIME_BC
default PORT16_INST01_BMODE_AUTO
default PORT16_INST01_BMODE_MASTER_ONLY if TIME_GM || TIME_FM
default PORT16_INST01_BMODE_AUTO if TIME_BC
config PORT16_INST01_BMODE_MASTER_ONLY
bool "MasterOnly"
config PORT16_INST01_BMODE_AUTO
......@@ -7131,8 +7132,8 @@ config PORT16_INST02_ASYMMETRY_CORRECTION_ENABLE
choice
prompt "BMCA mode"
depends on PTP_OPT_EXT_PORT_CONFIG_ENABLED!=y
default PORT16_INST02_BMODE_MASTER_ONLY if TIME_BC
default PORT16_INST02_BMODE_AUTO
default PORT16_INST02_BMODE_MASTER_ONLY if TIME_GM || TIME_FM
default PORT16_INST02_BMODE_AUTO if TIME_BC
config PORT16_INST02_BMODE_MASTER_ONLY
bool "MasterOnly"
config PORT16_INST02_BMODE_AUTO
......@@ -7375,8 +7376,8 @@ config PORT17_INST01_ASYMMETRY_CORRECTION_ENABLE
choice
prompt "BMCA mode"
depends on PTP_OPT_EXT_PORT_CONFIG_ENABLED!=y
default PORT17_INST01_BMODE_MASTER_ONLY if TIME_BC
default PORT17_INST01_BMODE_AUTO
default PORT17_INST01_BMODE_MASTER_ONLY if TIME_GM || TIME_FM
default PORT17_INST01_BMODE_AUTO if TIME_BC
config PORT17_INST01_BMODE_MASTER_ONLY
bool "MasterOnly"
config PORT17_INST01_BMODE_AUTO
......@@ -7585,8 +7586,8 @@ config PORT17_INST02_ASYMMETRY_CORRECTION_ENABLE
choice
prompt "BMCA mode"
depends on PTP_OPT_EXT_PORT_CONFIG_ENABLED!=y
default PORT17_INST02_BMODE_MASTER_ONLY if TIME_BC
default PORT17_INST02_BMODE_AUTO
default PORT17_INST02_BMODE_MASTER_ONLY if TIME_GM || TIME_FM
default PORT17_INST02_BMODE_AUTO if TIME_BC
config PORT17_INST02_BMODE_MASTER_ONLY
bool "MasterOnly"
config PORT17_INST02_BMODE_AUTO
......@@ -7829,8 +7830,8 @@ config PORT18_INST01_ASYMMETRY_CORRECTION_ENABLE
choice
prompt "BMCA mode"
depends on PTP_OPT_EXT_PORT_CONFIG_ENABLED!=y
default PORT18_INST01_BMODE_MASTER_ONLY if TIME_BC
default PORT18_INST01_BMODE_AUTO
default PORT18_INST01_BMODE_MASTER_ONLY if TIME_GM || TIME_FM
default PORT18_INST01_BMODE_AUTO if TIME_BC
config PORT18_INST01_BMODE_MASTER_ONLY
bool "MasterOnly"
config PORT18_INST01_BMODE_AUTO
......@@ -8039,8 +8040,8 @@ config PORT18_INST02_ASYMMETRY_CORRECTION_ENABLE
choice
prompt "BMCA mode"
depends on PTP_OPT_EXT_PORT_CONFIG_ENABLED!=y
default PORT18_INST02_BMODE_MASTER_ONLY if TIME_BC
default PORT18_INST02_BMODE_AUTO
default PORT18_INST02_BMODE_MASTER_ONLY if TIME_GM || TIME_FM
default PORT18_INST02_BMODE_AUTO if TIME_BC
config PORT18_INST02_BMODE_MASTER_ONLY
bool "MasterOnly"
config PORT18_INST02_BMODE_AUTO
......
......@@ -25,7 +25,8 @@ function print_header() {
echo -e "menu \"Port Timing Configuration\"" >$OUTPUT_FILE
echo -e "config PTP_OPT_EXT_PORT_CONFIG_ENABLED" >>$OUTPUT_FILE
echo -e "\tbool \"externalPortConfigurationEnabled\" " >>$OUTPUT_FILE
echo -e "\tdefault true" >>$OUTPUT_FILE
echo -e "\tdepends on TIME_BC" >>$OUTPUT_FILE
echo -e "\tdefault false" >>$OUTPUT_FILE
echo -e "\thelp" >>$OUTPUT_FILE
echo -e "\t This option is used by the high accuracy profile to force the port state." >>$OUTPUT_FILE
echo -e "\t When set, BMCA is disabled." >>$OUTPUT_FILE
......@@ -165,8 +166,8 @@ function print_instance_header() {
echo -e "\nchoice" >>$OUTPUT_FILE
echo -e " prompt \"BMCA mode\"" >>$OUTPUT_FILE
echo -e " depends on PTP_OPT_EXT_PORT_CONFIG_ENABLED!=y" >>$OUTPUT_FILE
echo -e " default PORT${1}_INST${2}_BMODE_MASTER_ONLY if TIME_BC" >>$OUTPUT_FILE
echo -e " default PORT${1}_INST${2}_BMODE_AUTO" >>$OUTPUT_FILE
echo -e " default PORT${1}_INST${2}_BMODE_MASTER_ONLY if TIME_GM || TIME_FM" >>$OUTPUT_FILE
echo -e " default PORT${1}_INST${2}_BMODE_AUTO if TIME_BC" >>$OUTPUT_FILE
echo -e " config PORT${1}_INST${2}_BMODE_MASTER_ONLY" >>$OUTPUT_FILE
echo -e " bool \"MasterOnly\"" >>$OUTPUT_FILE
echo -e " config PORT${1}_INST${2}_BMODE_AUTO" >>$OUTPUT_FILE
......
Subproject commit 3436fdc8ff87dbaa8f6efadea813bfb8eb3f185f
Subproject commit 01cd0a15d291bc74322141d90c1d0527027884f5
......@@ -398,21 +398,23 @@ declare -A globals
[[ "$PRE_FILE" != "" ]] && [[ -f $PRE_FILE ]] && decode_pre_file "$PRE_FILE"
# Use default value of clock class if not overwritten or empty string
if [ -v CONFIG_PTP_OPT_OVERWRITE_CLOCK_CLASS ] && [ -n "$CONFIG_PTP_OPT_CLOCK_CLASS" ]; then
globals[clock-class]="$CONFIG_PTP_OPT_CLOCK_CLASS"
else
if [ "$CONFIG_TIME_GM" = "y" ]; then
if [ "$CONFIG_TIME_GM" = "y" ]; then
globals[clock-class]=6
fi
if [ "$CONFIG_TIME_FM" = "y" ]; then
globals[clock-class]=52
fi
if [ "$CONFIG_TIME_BC" = "y" ]; then
globals[clock-class]=248
else
# Use default value of clock class if not overwritten or empty string
if [ -v CONFIG_PTP_OPT_OVERWRITE_CLOCK_CLASS ] && [ -n "$CONFIG_PTP_OPT_CLOCK_CLASS" ]; then
globals[clock-class]="$CONFIG_PTP_OPT_CLOCK_CLASS"
else
if [ "$CONFIG_TIME_FM" = "y" ]; then
globals[clock-class]=52
fi
if [ "$CONFIG_TIME_BC" = "y" ]; then
globals[clock-class]=248
fi
fi
fi
if [ -n "$CONFIG_PTP_OPT_CLOCK_ACCURACY" ]; then
globals[clock-accuracy]="$CONFIG_PTP_OPT_CLOCK_ACCURACY"
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment