- Nov 04, 2013
-
-
Alessandro Rubini authored
Currently implementations of WR functions do not include wr-api.h. I need such consistency check to have compiler help in creating the wr_operations structures. Anyways, files should always include its own header. I add wr-api.h in arch.h for laziness, so I get all files for sure. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
timeint_to_wr was actually copying data to a local uninitialized variable of the same type as the input one. The uninitialized structure generates warnings about unitialized fields (at least on newer compilers than the one we use on wr-switch). Instead of clearing the local variable, just use structure assignment and get rid of the function. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
When adjusting the time, we expect stamps to be invalid for a while. Don't print errors unless the fact repeats unexpectedly. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This centralizes a "software" enable timing output, that calls the "hardware" one (previous code) while keeping track of the status. With non-wr the pps output is always enabled if the offset from master is less than 1s. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This sets the clock class in arch-wrpc in a way more aligned to the standard. A grandmaster is 6 if locked to atomic or gps, but 52 if it is designated grandmaster but doesn't lock to a primary source (this is was we poor developers experience). A "master" is 187, the old default, and a slave-only remains 255 as it has always been. This also removes the ability to stop the program while it waits for the pll to lock. It can only succeed or timeout. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This defines PP_CLASS_SLAVE_ONLY and similar names, and uses them properly. Also, the global "struct default_rt_opts" was not following the conventions about naming, so rename it to be a "pp" thing. Moreover, since we put all globals in ppg and we have ppg->rt_opts, try to use that instead of a separate global. Unfortunately the initialization sequence is not well ordered, so __pp_default_rt_opts still remains as a global variable, double-underscored to show it's not meant to be used. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
-
- Nov 01, 2013
-
-
Grzegorz Daniluk authored
-
- Oct 17, 2013
-
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
- Oct 16, 2013
-
-
Alessandro Rubini authored
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
wrc_ptp_ppsi.o was not picked any more from libarch.a into ppsi.o, now that we don't refer to pp_diag_verbosity any more. So force linking it, or the final wrc.elf build will fail for undefined symbols. Also, remove a no-more-needed -I directive. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
We are already not using "const" verbosity in wrpc-sw, which is our most size-constrained architecture. So remove this legacy support. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This is a long-standing bug introduced when fsm.c was changed to immediately enter a new state (before that, we had a grace period in state-faulty). The problem is exposed by running the suggested config file, if eth1 and/or eth2 exist but are currently down. This patch introduces a specific timeout, so we wait 4 seconds before reinitializing the pp instance; we thus avoid burning 100% CPU Time in trying again and again. As a side effect, this reduces timeouts provided to extensions from 4 to 3. I could have reused one of the other timeouts, as faulty state does not use them, but I'd better have proper timeout names in diagnostics. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
The "port" config word is not creating a new port any more, it locates an existing port, if any is there. This allows, for example, to set diagnostics from the command line: -C "port eth0; diagnostics 022" Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
This option sets configuration options from command line, as specified in CONFIG_ITEM. CONFIG_ITEM must be a valid configuration string, so you'll likely need to quote it on the command line. The semicolon can be used as a separator, to stick several configuration items in the same argument. This option can also be used more than once on the same command line, to set different parameters. If used twice to set the same parameter, the last value overrides previous values -- and later config files, specified with "-f" may override -C values.
-
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
The structures are going to be exported, so use the pp_ prefix. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This undoes part of the strangeness we had in configuration files. Now "-f" is recognized on the command line, and more than one file can be specified. Only if no file is found, the default one is used (wr-switch looks in /wrc/etc/ppsi.conf first). Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
- Oct 15, 2013
-
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This is a rewrite of the configuration parser, more based on data structures se we'll soon be able to read more than one configuration file (to add special cases while developing) and protocol extensions will be able to extend the table of allowed options. Both the configuration file format and the layout of the code calling lib/conf.c::pp_config_file() is unchanged in this commit. This means that even if you enable config diagnostics on the command line it won't have effect, because the config file is parsed before the command line. This is fixed by a later commit. The only visible change in this commit is that "port" is allowed as a synonim for "link", to be deprecated soon (but it will not be removed from the parsing of the config file). Thus, pp_instance->link_name is renamed to port_name. The compiled size of this commit is the same as the previous one. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Also, add "config" to the list of diag things, to allow tracing config file errors (used in later commits). Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
- Oct 05, 2013
-
-
Alessandro Rubini authored
This patch adds support for modifying the utc/tai offset. The "set" time operation, when called with a NULL pointer to the time structure, will do the operation in its own arch-specific way. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This adds support for the utc/tai offset. Unix, bare and wrs use UTC in system time and TAI in PTP frames. WR time is TAI as well, and wrpc-sw passes 0 as offset value when run as master. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Some fields are just statically there: avoid malloc and error checking Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This saves a few dozen bytes in wrpc-sw builds. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
The 1588 standard talks extensively about "mean path delay" and the meanPathDelay variable. Even if the name is not the best one, we'd better rename the fields and variable. This is a massive change, but the currenct code has been validated at the Lemgo plug fest, and I don't expect any need to revert older patches at this point. I'm sorry for git-blame users, including myself, but this change is a step forward. I should have knonw better when choosing "one way delay" between the two names of the older code. Thanks to Aurelio for noting the problem. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
- Oct 01, 2013
-
-
Grzegorz Daniluk authored
-
- Sep 24, 2013
-
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-