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>
This commit is contained in:
parent
61409a6d2f
commit
f80628ba96
4 changed files with 52 additions and 46 deletions
|
@ -102,7 +102,7 @@ static int cmd_inject_addr(const struct shell *shell, size_t argc, char **argv)
|
|||
}
|
||||
|
||||
if (argc == 1) {
|
||||
uint64_t addr = edac_inject_addr_get(dev);
|
||||
uint64_t addr = edac_inject_get_param1(dev);
|
||||
|
||||
shell_fprintf(shell, SHELL_NORMAL,
|
||||
"Injection address base: 0x%lx\n", addr);
|
||||
|
@ -111,7 +111,7 @@ static int cmd_inject_addr(const struct shell *shell, size_t argc, char **argv)
|
|||
|
||||
shell_fprintf(shell, SHELL_NORMAL,
|
||||
"Set injection address base to: %s\n", argv[1]);
|
||||
edac_inject_addr_set(dev, value);
|
||||
edac_inject_set_param1(dev, value);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -135,7 +135,7 @@ static int cmd_inject_mask(const struct shell *shell, size_t argc, char **argv)
|
|||
}
|
||||
|
||||
if (argc == 1) {
|
||||
uint64_t mask = edac_inject_addr_mask_get(dev);
|
||||
uint64_t mask = edac_inject_get_param2(dev);
|
||||
|
||||
shell_fprintf(shell, SHELL_NORMAL,
|
||||
"Injection address mask: 0x%lx\n", mask);
|
||||
|
@ -145,7 +145,7 @@ static int cmd_inject_mask(const struct shell *shell, size_t argc, char **argv)
|
|||
shell_fprintf(shell, SHELL_NORMAL,
|
||||
"Set injection address mask to %lx\n", value);
|
||||
|
||||
return edac_inject_addr_mask_set(dev, value);
|
||||
return edac_inject_set_param2(dev, value);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue