diff options
author | Wu Hao <hao.wu@intel.com> | 2019-08-12 10:50:03 +0800 |
---|---|---|
committer | Moritz Fischer <mdf@kernel.org> | 2019-09-03 19:35:41 -0700 |
commit | cb3c2c47e3b8068e5d46ad829318cd077406fc9d (patch) | |
tree | 9866a45ad893cd8fdfbf7c5911ea6604db39e39b /drivers/fpga/dfl-fme-main.c | |
parent | bd127b8191cf22adac9dedeca4f38093d61ff1ca (diff) |
fpga: dfl: fme: add global error reporting support
This patch adds support for global error reporting for FPGA
Management Engine (FME), it introduces sysfs interfaces to
report different error detected by the hardware, and allow
user to clear errors or inject error for testing purpose.
Signed-off-by: Luwei Kang <luwei.kang@intel.com>
Signed-off-by: Ananda Ravuri <ananda.ravuri@intel.com>
Signed-off-by: Xu Yilun <yilun.xu@intel.com>
Signed-off-by: Wu Hao <hao.wu@intel.com>
Acked-by: Alan Tull <atull@kernel.org>
Signed-off-by: Moritz Fischer <mdf@kernel.org>
Diffstat (limited to 'drivers/fpga/dfl-fme-main.c')
-rw-r--r-- | drivers/fpga/dfl-fme-main.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/drivers/fpga/dfl-fme-main.c b/drivers/fpga/dfl-fme-main.c index bf8114d4d875..4d78e182878f 100644 --- a/drivers/fpga/dfl-fme-main.c +++ b/drivers/fpga/dfl-fme-main.c @@ -127,7 +127,10 @@ static struct attribute *fme_hdr_attrs[] = { &dev_attr_socket_id.attr, NULL, }; -ATTRIBUTE_GROUPS(fme_hdr); + +static const struct attribute_group fme_hdr_group = { + .attrs = fme_hdr_attrs, +}; static long fme_hdr_ioctl_release_port(struct dfl_feature_platform_data *pdata, unsigned long arg) @@ -188,6 +191,10 @@ static struct dfl_feature_driver fme_feature_drvs[] = { .ops = &fme_pr_mgmt_ops, }, { + .id_table = fme_global_err_id_table, + .ops = &fme_global_err_ops, + }, + { .ops = NULL, }, }; @@ -333,10 +340,16 @@ static int fme_remove(struct platform_device *pdev) return 0; } +static const struct attribute_group *fme_dev_groups[] = { + &fme_hdr_group, + &fme_global_err_group, + NULL +}; + static struct platform_driver fme_driver = { .driver = { .name = DFL_FPGA_FEATURE_DEV_FME, - .dev_groups = fme_hdr_groups, + .dev_groups = fme_dev_groups, }, .probe = fme_probe, .remove = fme_remove, |