diff options
| author | Wu Hao <hao.wu@intel.com> | 2018-06-29 20:53:33 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-07-15 07:55:47 -0400 |
| commit | 6fd893c409e5939ea2145b27796c155535988734 (patch) | |
| tree | d585ba1e9b27bef55eb6a93bc58369fa72d7484b /drivers/fpga | |
| parent | e4664c0ee4ac44993c62d10b048ab0a960691da5 (diff) | |
fpga: dfl: afu: add DFL_FPGA_GET_API_VERSION/CHECK_EXTENSION ioctls support
DFL_FPGA_GET_API_VERSION and DFL_FPGA_CHECK_EXTENSION ioctls are common
ones which need to be supported by all feature devices drivers including
FME and AFU. This patch implements above 2 ioctls in FPGA Accelerated
Function Unit (AFU) driver.
Signed-off-by: Tim Whisonant <tim.whisonant@intel.com>
Signed-off-by: Enno Luebbers <enno.luebbers@intel.com>
Signed-off-by: Shiva Rao <shiva.rao@intel.com>
Signed-off-by: Christopher Rauer <christopher.rauer@intel.com>
Signed-off-by: Xiao Guangrong <guangrong.xiao@linux.intel.com>
Signed-off-by: Wu Hao <hao.wu@intel.com>
Acked-by: Alan Tull <atull@kernel.org>
Acked-by: Moritz Fischer <mdf@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/fpga')
| -rw-r--r-- | drivers/fpga/dfl-afu-main.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/fpga/dfl-afu-main.c b/drivers/fpga/dfl-afu-main.c index d36b3e9f3984..4074b97122e2 100644 --- a/drivers/fpga/dfl-afu-main.c +++ b/drivers/fpga/dfl-afu-main.c | |||
| @@ -236,6 +236,13 @@ static int afu_release(struct inode *inode, struct file *filp) | |||
| 236 | return 0; | 236 | return 0; |
| 237 | } | 237 | } |
| 238 | 238 | ||
| 239 | static long afu_ioctl_check_extension(struct dfl_feature_platform_data *pdata, | ||
| 240 | unsigned long arg) | ||
| 241 | { | ||
| 242 | /* No extension support for now */ | ||
| 243 | return 0; | ||
| 244 | } | ||
| 245 | |||
| 239 | static long afu_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) | 246 | static long afu_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) |
| 240 | { | 247 | { |
| 241 | struct platform_device *pdev = filp->private_data; | 248 | struct platform_device *pdev = filp->private_data; |
| @@ -248,6 +255,10 @@ static long afu_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) | |||
| 248 | pdata = dev_get_platdata(&pdev->dev); | 255 | pdata = dev_get_platdata(&pdev->dev); |
| 249 | 256 | ||
| 250 | switch (cmd) { | 257 | switch (cmd) { |
| 258 | case DFL_FPGA_GET_API_VERSION: | ||
| 259 | return DFL_FPGA_API_VERSION; | ||
| 260 | case DFL_FPGA_CHECK_EXTENSION: | ||
| 261 | return afu_ioctl_check_extension(pdata, arg); | ||
| 251 | default: | 262 | default: |
| 252 | /* | 263 | /* |
| 253 | * Let sub-feature's ioctl function to handle the cmd | 264 | * Let sub-feature's ioctl function to handle the cmd |
