Lines Matching full:sh

19 	const struct shell *sh;  member
22 static int parse_common_args(const struct shell *sh, char **argv, void **ctrl) in parse_common_args() argument
27 shell_error(sh, "service %s not found", argv[1]); in parse_common_args()
34 shell_error(sh, "ARM SiP services method %s not initialized", argv[1]); in parse_common_args()
40 static int cmd_reg(const struct shell *sh, size_t argc, char **argv) in cmd_reg() argument
46 err = parse_common_args(sh, argv, (void **)&ctrl); in cmd_reg()
53 shell_error(sh, "%s: register fail", ctrl->method); in cmd_reg()
56 shell_print(sh, "%s: register success: client token %08x\n", ctrl->method, c_token); in cmd_reg()
63 static int cmd_unreg(const struct shell *sh, size_t argc, char **argv) in cmd_unreg() argument
70 err = parse_common_args(sh, argv, (void **)&ctrl); in cmd_unreg()
78 shell_error(sh, "Out of range value"); in cmd_unreg()
81 shell_error(sh, "Invalid argument"); in cmd_unreg()
87 shell_error(sh, "%s: unregister fail (%d): client token %08x", ctrl->method, err, in cmd_unreg()
90 shell_print(sh, "%s: unregister success: client token %08x", ctrl->method, in cmd_unreg()
97 static int cmd_open(const struct shell *sh, size_t argc, char **argv) in cmd_open() argument
106 err = parse_common_args(sh, argv, (void **)&ctrl); in cmd_open()
114 shell_error(sh, "Out of range value"); in cmd_open()
117 shell_error(sh, "Invalid argument"); in cmd_open()
125 shell_error(sh, "Out of range value"); in cmd_open()
128 shell_error(sh, "Invalid Argument"); in cmd_open()
134 shell_error(sh, "Setting timeout value to %lu milliseconds", in cmd_open()
141 shell_error(sh, "%s: open fail (%d): client token %08x", ctrl->method, err, in cmd_open()
144 shell_print(sh, "%s: open success: client token %08x", ctrl->method, in cmd_open()
151 static int cmd_close(const struct shell *sh, size_t argc, char **argv) in cmd_close() argument
158 err = parse_common_args(sh, argv, (void **)&ctrl); in cmd_close()
166 shell_error(sh, "Out of range value"); in cmd_close()
169 shell_error(sh, "Invalid argument"); in cmd_close()
175 shell_error(sh, "%s: close fail (%d): client token %08x", ctrl->method, err, in cmd_close()
178 shell_print(sh, "%s: close success: client token %08x", ctrl->method, in cmd_close()
192 const struct shell *sh = priv->sh; in cmd_send_callback() local
194 shell_print(sh, "\n\rsip_svc send callback response\n"); in cmd_send_callback()
195 shell_print(sh, "\theader=%08x\n", response->header); in cmd_send_callback()
196 shell_print(sh, "\ta0=%016lx\n", response->a0); in cmd_send_callback()
197 shell_print(sh, "\ta1=%016lx\n", response->a1); in cmd_send_callback()
198 shell_print(sh, "\ta2=%016lx\n", response->a2); in cmd_send_callback()
199 shell_print(sh, "\ta3=%016lx\n", response->a3); in cmd_send_callback()
204 static int cmd_send(const struct shell *sh, size_t argc, char **argv) in cmd_send() argument
214 err = parse_common_args(sh, argv, (void **)&ctrl); in cmd_send()
222 shell_error(sh, "Out of range value"); in cmd_send()
225 shell_error(sh, "Invalid argument"); in cmd_send()
233 shell_error(sh, "Out of range value for a0"); in cmd_send()
236 shell_error(sh, "Invalid argument for a0"); in cmd_send()
243 shell_error(sh, "Out of range value for a1"); in cmd_send()
246 shell_error(sh, "Invalid argument for a1"); in cmd_send()
254 shell_error(sh, "Out of range value for a2"); in cmd_send()
257 shell_error(sh, "Invalid argument for a2"); in cmd_send()
265 shell_error(sh, "Out of range value for a3"); in cmd_send()
268 shell_error(sh, "Invalid argument for a3"); in cmd_send()
276 shell_error(sh, "Out of range value for a4"); in cmd_send()
279 shell_error(sh, "Invalid argument for a4"); in cmd_send()
287 shell_error(sh, "Out of range value for a5"); in cmd_send()
290 shell_error(sh, "Invalid argument for a5"); in cmd_send()
298 shell_error(sh, "Out of range value for a6"); in cmd_send()
301 shell_error(sh, "Invalid argument for a6"); in cmd_send()
309 shell_error(sh, "Out of range value for a7"); in cmd_send()
312 shell_error(sh, "Invalid argument for a7"); in cmd_send()
318 priv.sh = sh; in cmd_send()
327 shell_error(sh, "%s: send fail: client token %08x", ctrl->method, in cmd_send()
334 shell_print(sh, "%s: send success: client token %08x, trans_id %d", ctrl->method, in cmd_send()
341 static int cmd_info(const struct shell *sh, size_t argc, char **argv) in cmd_info() argument
349 err = parse_common_args(sh, argv, (void **)&ctrl); in cmd_info()
354 shell_print(sh, "---------------------------------------\n"); in cmd_info()
355 shell_print(sh, "sip_svc service information\n"); in cmd_info()
356 shell_print(sh, "---------------------------------------\n"); in cmd_info()
358 shell_print(sh, "active job cnt %d\n", ctrl->active_job_cnt); in cmd_info()
359 shell_print(sh, "active async job cnt %d\n", ctrl->active_async_job_cnt); in cmd_info()
361 shell_print(sh, "---------------------------------------\n"); in cmd_info()
362 shell_print(sh, "Client Token\tState\tTrans Cnt\n"); in cmd_info()
363 shell_print(sh, "---------------------------------------\n"); in cmd_info()
370 shell_print(sh, "%08x \t%-10s\t%-9d\n", ctrl->clients[i].token, in cmd_info()