Commit f44ca1c7 authored by Adam Wujek's avatar Adam Wujek 💬

userspace/libwr: get rid of minipc call get_timing_state

Remove unused minipc call get_timing_state.
Remove functions functions halexp_get_timing_state, export_get_timing_state
and struct hexp_timing_state_t.
Update developer manual
Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
parent 20ec92d5
......@@ -1595,13 +1595,6 @@ the processes (excluding the @sc{rt} subsystem).
by @i{wr_phytool}.
Called by @i{ppsi} directly (no @i{libwr}) in @t{wrs-time.c}.
@item hal::get_timing_state
@c FIXME: shmem this if used (not used it seems)
Called by library code (@t{halexp_get_timing_state},
but not used. The function fills a structure of type
@t{hexp_timing_state_t} that is never used.
@item hal::lock_cmd
Called by library code (@t{halexp_lock_cmd}) but not used.
......
......@@ -85,19 +85,12 @@ typedef struct {
#define HEXP_PORT_TSC_FALLING 2
*/
typedef struct {
int timing_mode; /* Free-running Master/GM/BC */
int locked_port;
} hexp_timing_state_t;
/* Prototypes of functions that call on rpc */
extern int halexp_check_running(void);
extern int halexp_reset_port(const char *port_name);
extern int halexp_calibration_cmd(const char *port_name, int command, int on_off);
extern int halexp_lock_cmd(const char *port_name, int command, int priority);
extern int halexp_pps_cmd(int cmd, hexp_pps_params_t *params);
extern int halexp_get_timing_state(hexp_timing_state_t *state);
/* Export structures, shared by server and client for argument matching */
#ifdef HAL_EXPORT_STRUCTURES
......@@ -156,14 +149,6 @@ struct minipc_pd __rpcdef_pps_cmd = {
},
};
struct minipc_pd __rpcdef_get_timing_state = {
.name = "get_timing_state",
.retval = MINIPC_ARG_ENCODE(MINIPC_ATYPE_STRUCT, hexp_timing_state_t),
.args = {
MINIPC_ARG_END,
},
};
#endif /* HAL_EXPORT_STRUCTURES */
#endif
......@@ -36,16 +36,6 @@ int halexp_pps_cmd(int cmd, hexp_pps_params_t * params)
return rval;
}
int halexp_get_timing_state(hexp_timing_state_t * tstate)
{
int ret;
ret = minipc_call(hal_ch, DEFAULT_TO, &__rpcdef_get_timing_state,
tstate);
if (ret < 0)
return ret;
return 0;
}
/* Some clients call this, some call the client_init() defined later */
int halexp_client_try_connect(int retries, int timeout)
{
......
......@@ -140,14 +140,6 @@ int halexp_pps_cmd(int cmd, hexp_pps_params_t * params)
extern int hal_port_any_locked();
int halexp_get_timing_state(hexp_timing_state_t * state)
{
state->timing_mode = hal_get_timing_mode();
state->locked_port = hal_port_any_locked();
return 0;
}
static void hal_cleanup_wripc()
{
minipc_close(hal_ch);
......@@ -179,13 +171,6 @@ static int export_lock_cmd(const struct minipc_pd *pd,
return 0;
}
static int export_get_timing_state(const struct minipc_pd *pd,
uint32_t * args, void *ret)
{
halexp_get_timing_state(ret);
return 0;
}
/* Creates a wripc server and exports all public API functions */
int hal_init_wripc(struct hal_port_state *hal_ports)
{
......@@ -203,11 +188,9 @@ int hal_init_wripc(struct hal_port_state *hal_ports)
/* fill the function pointers */
__rpcdef_pps_cmd.f = export_pps_cmd;
__rpcdef_lock_cmd.f = export_lock_cmd;
__rpcdef_get_timing_state.f = export_get_timing_state;
minipc_export(hal_ch, &__rpcdef_pps_cmd);
minipc_export(hal_ch, &__rpcdef_lock_cmd);
minipc_export(hal_ch, &__rpcdef_get_timing_state);
/* FIXME: pll_cmd is empty anyways???? */
......
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