Lines Matching full:sh

38 static void decode_ecc_error(const struct shell *sh, uint64_t ecc_error)  in decode_ecc_error()  argument
43 shell_fprintf(sh, SHELL_NORMAL, in decode_ecc_error()
45 shell_fprintf(sh, SHELL_NORMAL, in decode_ecc_error()
49 shell_fprintf(sh, SHELL_NORMAL, in decode_ecc_error()
54 shell_fprintf(sh, SHELL_NORMAL, in decode_ecc_error()
59 static int ecc_error_show(const struct shell *sh, const struct device *dev) in ecc_error_show() argument
66 shell_error(sh, "Error getting error log (err %d)", err); in ecc_error_show()
70 shell_fprintf(sh, SHELL_NORMAL, "ECC Error: 0x%llx\n", error); in ecc_error_show()
73 decode_ecc_error(sh, error); in ecc_error_show()
79 static int parity_error_show(const struct shell *sh, const struct device *dev) in parity_error_show() argument
86 shell_error(sh, "Error getting parity error log (err %d)", err); in parity_error_show()
90 shell_fprintf(sh, SHELL_NORMAL, "Parity Error: 0x%llx\n", error); in parity_error_show()
95 static int cmd_edac_info(const struct shell *sh, size_t argc, char **argv) in cmd_edac_info() argument
102 shell_error(sh, "IBECC device not ready"); in cmd_edac_info()
106 shell_fprintf(sh, SHELL_NORMAL, "Show EDAC status\n"); in cmd_edac_info()
108 err = ecc_error_show(sh, dev); in cmd_edac_info()
113 err = parity_error_show(sh, dev); in cmd_edac_info()
118 shell_fprintf(sh, SHELL_NORMAL, in cmd_edac_info()
126 static int cmd_inject_addr(const struct shell *sh, size_t argc, char **argv) in cmd_inject_addr() argument
133 shell_error(sh, "IBECC device not ready"); in cmd_inject_addr()
139 shell_fprintf(sh, SHELL_NORMAL, in cmd_inject_addr()
149 shell_error(sh, "Error getting address (err %d)", in cmd_inject_addr()
154 shell_fprintf(sh, SHELL_NORMAL, in cmd_inject_addr()
159 shell_fprintf(sh, SHELL_NORMAL, in cmd_inject_addr()
164 shell_error(sh, "Error setting address (err %d)", in cmd_inject_addr()
173 static int cmd_inject_mask(const struct shell *sh, size_t argc, char **argv) in cmd_inject_mask() argument
180 shell_error(sh, "IBECC device not ready"); in cmd_inject_mask()
186 shell_fprintf(sh, SHELL_NORMAL, in cmd_inject_mask()
196 shell_error(sh, "Error getting mask (err %d)", err); in cmd_inject_mask()
200 shell_fprintf(sh, SHELL_NORMAL, in cmd_inject_mask()
205 shell_fprintf(sh, SHELL_NORMAL, in cmd_inject_mask()
210 shell_error(sh, "Error setting mask (err %d)", err); in cmd_inject_mask()
218 static int cmd_inject_trigger(const struct shell *sh, size_t argc, in cmd_inject_trigger() argument
225 shell_error(sh, "IBECC device not ready"); in cmd_inject_trigger()
229 shell_fprintf(sh, SHELL_NORMAL, "Triggering injection\n"); in cmd_inject_trigger()
236 static int cmd_inject_disable_nmi(const struct shell *sh, size_t argc, in cmd_inject_disable_nmi() argument
244 static int cmd_inject_enable_nmi(const struct shell *sh, size_t argc, in cmd_inject_enable_nmi() argument
264 static int cmd_inject_error_type_show(const struct shell *sh, size_t argc, in cmd_inject_error_type_show() argument
273 shell_error(sh, "IBECC device not ready"); in cmd_inject_error_type_show()
279 shell_error(sh, "Error getting error type (err %d)", err); in cmd_inject_error_type_show()
283 shell_fprintf(sh, SHELL_NORMAL, "Injection error type: %s\n", in cmd_inject_error_type_show()
289 static int set_error_type(const struct shell *sh, uint32_t error_type) in set_error_type() argument
295 shell_error(sh, "IBECC device not ready"); in set_error_type()
299 shell_fprintf(sh, SHELL_NORMAL, "Set injection error type: %s\n", in set_error_type()
305 static int cmd_inject_error_type_cor(const struct shell *sh, size_t argc, in cmd_inject_error_type_cor() argument
308 return set_error_type(sh, EDAC_ERROR_TYPE_DRAM_COR); in cmd_inject_error_type_cor()
311 static int cmd_inject_error_type_uc(const struct shell *sh, size_t argc, in cmd_inject_error_type_uc() argument
314 return set_error_type(sh, EDAC_ERROR_TYPE_DRAM_UC); in cmd_inject_error_type_uc()
317 static int cmd_inject_test(const struct shell *sh, size_t argc, char **argv) in cmd_inject_test() argument
323 shell_error(sh, "IBECC device not ready"); in cmd_inject_test()
360 static int cmd_ecc_error_show(const struct shell *sh, size_t argc, in cmd_ecc_error_show() argument
367 shell_error(sh, "IBECC device not ready"); in cmd_ecc_error_show()
371 return ecc_error_show(sh, dev); in cmd_ecc_error_show()
374 static int cmd_ecc_error_clear(const struct shell *sh, size_t argc, in cmd_ecc_error_clear() argument
382 shell_error(sh, "IBECC device not ready"); in cmd_ecc_error_clear()
388 shell_error(sh, "Error clear ecc error log (err %d)", in cmd_ecc_error_clear()
393 shell_fprintf(sh, SHELL_NORMAL, "ECC Error Log cleared\n"); in cmd_ecc_error_clear()
404 static int cmd_parity_error_show(const struct shell *sh, size_t argc, in cmd_parity_error_show() argument
411 shell_error(sh, "IBECC device not ready"); in cmd_parity_error_show()
415 return parity_error_show(sh, dev); in cmd_parity_error_show()
418 static int cmd_parity_error_clear(const struct shell *sh, size_t argc, in cmd_parity_error_clear() argument
426 shell_error(sh, "IBECC device not ready"); in cmd_parity_error_clear()
432 shell_error(sh, "Error clear parity error log (err %d)", in cmd_parity_error_clear()
437 shell_fprintf(sh, SHELL_NORMAL, "Parity Error Log cleared\n"); in cmd_parity_error_clear()