Commit Graph

22 Commits

Author SHA1 Message Date
Gerard Marull-Paretas 667eeb11fb shell: fix MISRA 5.7 violations on `struct shell`
MISRA Rule 5.7 requires uniqueness of tag identifiers. Shell is
frequently problematic because many code uses `const struct shell
*shell`. This causes CI noise every time one of these shell files is
edited, so let's update all of them with `const struct shell *sh`
instead.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-04-14 12:21:08 +02:00
Andrei Emeltchenko 662cea4638 edac: shell: Update Copyright to 2022
Update Copyright.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2022-06-22 10:28:44 +03:00
Andrei Emeltchenko 8390ae5d70 edac: shell: Do not show error on ENODATA
In a case with ENODATA do not show error.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2022-06-22 10:28:44 +03:00
Andrei Emeltchenko d0d87a213b edac: shell: Refactor edac shell
Removing code duplicates.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2022-06-22 10:28:44 +03:00
Andrei Emeltchenko 75eba3fdb9 edac: shell: Update edac shell comments
Update edac shell comments reflecting devmem move from edac to a
special shell module.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2022-06-22 10:28:44 +03:00
Kumar Gala 04622c8b6f edac: shell: Remove use of DT_LABEL
Remove DT_LABEL usage that is needed for device_get_binding, replace
this with DEVICE_DT_GET.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-06-10 09:46:15 +02:00
Gerard Marull-Paretas fb60aab245 drivers: migrate includes to <zephyr/...>
In order to bring consistency in-tree, migrate all drivers to the new
prefix <zephyr/...>. Note that the conversion has been scripted, refer
to #45388 for more details.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-05-06 19:58:21 +02:00
Krzysztof Chruscinski eb3375f47c shell: Add __printf_like to shell_fprintf
Add __printf_like modifier to validate strings used by shell.
Fixing warnings triggered by this change.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-10-14 16:32:19 -04:00
Henrik Brix Andersen fe2075d140 shell: modules: promote edac mem shell subcommand to root shell command
Promote the "edac mem" shell subcommand to a generic "devmem" root shell
command. This command is useful for poking around registers and memory
outside of the EDAC drivers.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2021-07-02 13:21:25 -04:00
Andrei Emeltchenko 882600834e edac: shell: Use helper functions for shell devmem command
Using helper functions decreases function complexity numbers reported
by static code analyzers.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2021-06-30 18:29:21 -04:00
Andrei Emeltchenko fee256bc72 edac: shell: Print exact error with shell error message
Include to shell_error() also exact error.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2021-06-30 18:29:21 -04:00
Andrei Emeltchenko 228232e29d edac: shell: Check error for log clear functions
Check errors returned by edac_ecc_error_log_clear() and
edac_parity_error_log_clear().

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2021-06-30 18:29:21 -04:00
Andrei Emeltchenko 9bad08e3e7 edac: shell: Use boolean expressions in if conditions
Use only boolean in if conditions as new coding style implies.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2021-06-30 18:29:21 -04:00
Andrei Emeltchenko daf8095851 edac: shell: Replace ret with err
Replace ret with err for simple int type errors.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2021-06-30 18:29:21 -04:00
Andrei Emeltchenko 0eb48e30c6 edac: shell: Use new EDAC API in shell
Use new EDAC API in shell.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2021-06-30 18:29:21 -04:00
Andrei Emeltchenko 3f4a41946a edac: shell: Add test_default command
Add setting default inject test parameters.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2021-02-19 16:06:29 +02:00
Andrei Emeltchenko 4bbcd1433e edac: shell: Update shell commands comments
Correct commands descriptions in comments

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2021-02-19 16:06:29 +02:00
Andrei Emeltchenko 8a71b16f93 edac: Update shell commands
Add error_type and trigger shell commands and remove outdated ctrl.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2021-02-04 09:37:42 -05:00
Andrei Emeltchenko 89a253b052 edac: Use Device Tree values for BDF and PCI VID
Start using DTS values for PCI Vendor ID and PCI BDF. For the PCI
Device ID we do not use DTS since this would require changing overlay
for different SKU board.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2021-02-04 09:37:42 -05:00
Andrei Emeltchenko 2dc413aa74 edac: Split EDAC set ctrl to set error_type and error_trigger
Split setting EDAC IBECC ctrl to setting error_type and
error_trigger to make it easier for other platforms.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2021-01-21 08:34:07 -05:00
Andrei Emeltchenko f80628ba96 edac: Generalize EDAC API
Replace addr with param1 and addr_mask with param2 for get / set types
of functions. Those names are more general and allow to implement
error injections for other platforms.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2021-01-21 08:34:07 -05:00
Andrei Emeltchenko f7f2dd85be edac: shell: Add EDAC shell
Add EDAC shell module which would be included in the EDAC sample.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2021-01-21 08:34:07 -05:00