Skip to content
Snippets Groups Projects
  1. Jul 14, 2020
  2. Jul 13, 2020
  3. Jul 07, 2020
    • Xu Yilun's avatar
      fpga: dfl: afu: add AFU interrupt support · 09d86150
      Xu Yilun authored
      
      AFU (Accelerated Function Unit) is dynamic region of the DFL based FPGA,
      and always defined by users. Some DFL based FPGA cards allow users to
      implement their own interrupts in AFU. In order to support this,
      hardware implements a new UINT (AFU Interrupt) private feature with
      related capability register which describes the number of supported
      AFU interrupts as well as the local index of the interrupts for
      software enumeration, and from software side, driver follows the common
      DFL interrupt notification and handling mechanism, and it implements
      two ioctls below for user to query number of irqs supported and set/unset
      interrupt triggers.
      
       Ioctls:
       * DFL_FPGA_PORT_UINT_GET_IRQ_NUM
         get the number of irqs, which is used to determine how many interrupts
         UINT feature supports.
      
       * DFL_FPGA_PORT_UINT_SET_IRQ
         set/unset eventfds as AFU interrupt triggers.
      
      Signed-off-by: default avatarLuwei Kang <luwei.kang@intel.com>
      Signed-off-by: default avatarWu Hao <hao.wu@intel.com>
      Signed-off-by: default avatarXu Yilun <yilun.xu@intel.com>
      Reviewed-by: default avatarMarcelo Tosatti <mtosatti@redhat.com>
      Acked-by: default avatarWu Hao <hao.wu@intel.com>
      Signed-off-by: default avatarMoritz Fischer <mdf@kernel.org>
      09d86150
    • Xu Yilun's avatar
      fpga: dfl: fme: add interrupt support for global error reporting · d43f20ba
      Xu Yilun authored
      
      Error reporting interrupt is very useful to notify users that some
      errors are detected by the hardware. Once users are notified, they
      could query hardware logged error states, no need to continuously
      poll on these states.
      
      This patch adds interrupt support for fme global error reporting sub
      feature. It follows the common DFL interrupt notification and handling
      mechanism. And it implements two ioctls below for user to query
      number of irqs supported, and set/unset interrupt triggers.
      
       Ioctls:
       * DFL_FPGA_FME_ERR_GET_IRQ_NUM
         get the number of irqs, which is used to determine whether/how many
         interrupts fme error reporting feature supports.
      
       * DFL_FPGA_FME_ERR_SET_IRQ
         set/unset given eventfds as fme error reporting interrupt triggers.
      
      Signed-off-by: default avatarLuwei Kang <luwei.kang@intel.com>
      Signed-off-by: default avatarWu Hao <hao.wu@intel.com>
      Signed-off-by: default avatarXu Yilun <yilun.xu@intel.com>
      Reviewed-by: default avatarMarcelo Tosatti <mtosatti@redhat.com>
      Acked-by: default avatarWu Hao <hao.wu@intel.com>
      Signed-off-by: default avatarMoritz Fischer <mdf@kernel.org>
      d43f20ba
    • Xu Yilun's avatar
      fpga: dfl: afu: add interrupt support for port error reporting · fe6a3d65
      Xu Yilun authored
      
      Error reporting interrupt is very useful to notify users that some
      errors are detected by the hardware. Once users are notified, they
      could query hardware logged error states, no need to continuously
      poll on these states.
      
      This patch adds interrupt support for port error reporting sub feature.
      It follows the common DFL interrupt notification and handling mechanism,
      implements two ioctl commands below for user to query number of irqs
      supported, and set/unset interrupt triggers.
      
       Ioctls:
       * DFL_FPGA_PORT_ERR_GET_IRQ_NUM
         get the number of irqs, which is used to determine whether/how many
         interrupts error reporting feature supports.
      
       * DFL_FPGA_PORT_ERR_SET_IRQ
         set/unset given eventfds as error interrupt triggers.
      
      Signed-off-by: default avatarLuwei Kang <luwei.kang@intel.com>
      Signed-off-by: default avatarWu Hao <hao.wu@intel.com>
      Signed-off-by: default avatarXu Yilun <yilun.xu@intel.com>
      Reviewed-by: default avatarMarcelo Tosatti <mtosatti@redhat.com>
      Acked-by: default avatarWu Hao <hao.wu@intel.com>
      Signed-off-by: default avatarMoritz Fischer <mdf@kernel.org>
      fe6a3d65
  4. Jun 28, 2020
  5. Jun 26, 2020
  6. Jun 19, 2020
  7. Jun 09, 2020
    • Arnd Bergmann's avatar
      fpga: zynqmp: fix modular build · 6a47d6ef
      Arnd Bergmann authored
      
      Two symbols need to be exported to allow the zynqmp-fpga module
      to get loaded dynamically:
      
      ERROR: modpost: "zynqmp_pm_fpga_load" [drivers/fpga/zynqmp-fpga.ko] undefined!
      ERROR: modpost: "zynqmp_pm_fpga_get_status" [drivers/fpga/zynqmp-fpga.ko] undefined!
      
      To ensure this is done correctly, also fix the Kconfig dependency
      to only allow building the fpga driver when the firmware driver is
      either disabled, or when it is reachable. With that, the dependency
      on the SoC itself can be removed, and there are no surprises when
      the fpga driver is built-in but the firmware a module.
      
      Fixes: 4db8180f ("firmware: xilinx: Remove eemi ops for fpga related APIs")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarMoritz Fischer <mdf@kernel.org>
      6a47d6ef
  8. May 29, 2020
  9. May 19, 2020
  10. Apr 30, 2020
  11. Apr 28, 2020
  12. Mar 31, 2020
  13. Jan 10, 2020
  14. Jan 03, 2020
  15. Oct 17, 2019
  16. Oct 05, 2019
    • Stephen Boyd's avatar
      fpga: Remove dev_err() usage after platform_get_irq() · d20c0da8
      Stephen Boyd authored
      
      We don't need dev_err() messages when platform_get_irq() fails now that
      platform_get_irq() prints an error message itself when something goes
      wrong. Let's remove these prints with a simple semantic patch.
      
      // <smpl>
      @@
      expression ret;
      struct platform_device *E;
      @@
      
      ret =
      (
      platform_get_irq(E, ...)
      |
      platform_get_irq_byname(E, ...)
      );
      
      if ( \( ret < 0 \| ret <= 0 \) )
      {
      (
      -if (ret != -EPROBE_DEFER)
      -{ ...
      -dev_err(...);
      -... }
      |
      ...
      -dev_err(...);
      )
      ...
      }
      // </smpl>
      
      While we're here, remove braces on if statements that only have one
      statement (manually).
      
      Cc: Moritz Fischer <mdf@kernel.org>
      Cc: linux-fpga@vger.kernel.org
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarStephen Boyd <swboyd@chromium.org>
      Signed-off-by: default avatarMoritz Fischer <mdf@kernel.org>
      d20c0da8
  17. Sep 04, 2019
Loading