1. 26 5月, 2018 1 次提交
    • A
      fpga: manager: change api, don't use drvdata · 7085e2a9
      Alan Tull 提交于
      Change fpga_mgr_register to not set or use drvdata.  This supports
      the case where a PCIe device has more than one manager.
      
      Add fpga_mgr_create/free functions.  Change fpga_mgr_register and
      fpga_mgr_unregister functions to take the mgr struct as their only
      parameter.
      
        struct fpga_manager *fpga_mgr_create(struct device *dev,
                      const char *name,
                      const struct fpga_manager_ops *mops,
                      void *priv);
        void fpga_mgr_free(struct fpga_manager *mgr);
        int fpga_mgr_register(struct fpga_manager *mgr);
        void fpga_mgr_unregister(struct fpga_manager *mgr);
      
      Update the drivers that call fpga_mgr_register with the new API.
      Signed-off-by: NAlan Tull <atull@kernel.org>
      [Moritz: Fixup whitespace issue]
      Reported-by: NJiuyue Ma <majiuyue@huawei.com>
      Signed-off-by: NMoritz Fischer <mdf@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      7085e2a9
  2. 28 11月, 2017 2 次提交
    • A
      fpga: mgr: separate getting/locking FPGA manager · ebf877a5
      Alan Tull 提交于
      Previously when the user gets a FPGA manager, it was locked
      and nobody else could use it for programming.
      
      This commit makes it straightforward to save a reference to an
      FPGA manager and only lock it when programming the FPGA.
      
      Add functions that get an FPGA manager's mutex for exclusive use:
      * fpga_mgr_lock
      * fpga_mgr_unlock
      
      The following functions no longer lock an FPGA manager's mutex:
      * of_fpga_mgr_get
      * fpga_mgr_get
      * fpga_mgr_put
      Signed-off-by: NAlan Tull <atull@kernel.org>
      Acked-by: NMoritz Fischer <mdf@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ebf877a5
    • A
      fpga: mgr: API change to replace fpga load functions with single function · 5cf0c7f6
      Alan Tull 提交于
      fpga-mgr has three methods for programming FPGAs, depending on
      whether the image is in a scatter gather list, a contiguous
      buffer, or a firmware file. This makes it difficult to write
      upper layers as the caller has to assume whether the FPGA image
      is in a sg table, as a single buffer, or a firmware file.
      This commit moves these parameters to struct fpga_image_info
      and adds a single function for programming fpgas.
      
      New functions:
      * fpga_mgr_load - given fpga manager and struct fpga_image_info,
         program the fpga.
      
      * fpga_image_info_alloc - alloc a struct fpga_image_info.
      
      * fpga_image_info_free - free a struct fpga_image_info.
      
      These three functions are unexported:
      * fpga_mgr_buf_load_sg
      * fpga_mgr_buf_load
      * fpga_mgr_firmware_load
      
      Also use devm_kstrdup to copy firmware_name so we aren't making
      assumptions about where it comes from when allocing/freeing the
      struct fpga_image_info.
      
      API documentation has been updated and a new document for
      FPGA region has been added.
      Signed-off-by: NAlan Tull <atull@kernel.org>
      Acked-by: NMoritz Fischer <mdf@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      5cf0c7f6
  3. 10 2月, 2017 1 次提交
  4. 30 11月, 2016 1 次提交
  5. 11 11月, 2016 2 次提交
  6. 08 10月, 2015 1 次提交