summaryrefslogtreecommitdiff
path: root/drivers/fpga/dfl-afu.h
diff options
context:
space:
mode:
authorRuss Weight <russell.h.weight@intel.com>2021-03-24 01:46:50 +0300
committerMoritz Fischer <mdf@kernel.org>2021-03-24 21:15:04 +0300
commit9a8d3cda8daf54b1f8e67ccb360876379b7e7895 (patch)
tree6b3edaecfaf44801b5bba4e4428b1776ba2bd542 /drivers/fpga/dfl-afu.h
parent6f1e376cfc6864a2f46538db909bbd5253c3c146 (diff)
downloadlinux-9a8d3cda8daf54b1f8e67ccb360876379b7e7895.tar.xz
fpga: dfl: afu: harden port enable logic
Port enable is not complete until ACK = 0. Change __afu_port_enable() to guarantee that the enable process is complete by polling for ACK == 0. Signed-off-by: Russ Weight <russell.h.weight@intel.com> Reviewed-by: Tom Rix <trix@redhat.com> Reviewed-by: Matthew Gerlach <matthew.gerlach@linux.intel.com> Acked-by: Wu Hao <hao.wu@intel.com> Signed-off-by: Moritz Fischer <mdf@kernel.org>
Diffstat (limited to 'drivers/fpga/dfl-afu.h')
-rw-r--r--drivers/fpga/dfl-afu.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/fpga/dfl-afu.h b/drivers/fpga/dfl-afu.h
index 576e94960086..e5020e2b1f3d 100644
--- a/drivers/fpga/dfl-afu.h
+++ b/drivers/fpga/dfl-afu.h
@@ -80,7 +80,7 @@ struct dfl_afu {
};
/* hold pdata->lock when call __afu_port_enable/disable */
-void __afu_port_enable(struct platform_device *pdev);
+int __afu_port_enable(struct platform_device *pdev);
int __afu_port_disable(struct platform_device *pdev);
void afu_mmio_region_init(struct dfl_feature_platform_data *pdata);