02 Nov, 2017

1 commit

  • Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the 'GPL-2.0'
    SPDX license identifier. The SPDX identifier is a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset of
    the use cases:
    - file had no licensing information it it.
    - file was a */uapi/* one with no licensing information in it,
    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to license
    had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied to
    a file was done in a spreadsheet of side by side results from of the
    output of two independent scanners (ScanCode & Windriver) producing SPDX
    tag:value files created by Philippe Ombredanne. Philippe prepared the
    base worksheet, and did an initial spot review of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537 files
    assessed. Kate Stewart did a file by file comparison of the scanner
    results in the spreadsheet to determine which SPDX license identifier(s)
    to be applied to the file. She confirmed any determination that was not
    immediately clear with lawyers working with the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:
    - Files considered eligible had to be source code files.
    - Make and config files were included as candidates if they contained >5
    lines of source
    - File already had some variant of a license header in it (even if
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

17 Jul, 2017

2 commits

  • Add a flag that is passed to the write_init() callback, indicating
    that the bitstream is compressed.

    The low-level driver will deal with the flag, or return an error,
    if compressed bitstreams are not supported.

    Signed-off-by: Anatolij Gustschin
    Reviewed-by: Andy Shevchenko
    Signed-off-by: Alan Tull
    Signed-off-by: Greg Kroah-Hartman

    Anatolij Gustschin
     
  • Add a flag that is passed to the write_init() callback,
    indicating that the SPI bitstream starts with LSB first.
    SPI controllers usually send data with MSB first. If an
    FPGA expects bitstream data as LSB first, the data must
    be reversed either by the SPI controller or by the driver.

    Alternatively the bitstream could be prepared as bit-reversed
    to avoid the bit-swapping while sending. This flag indicates
    such bit-reversed SPI bitstream. The low-level driver will
    deal with the flag and perform bit-reversing if needed.

    Signed-off-by: Anatolij Gustschin
    Signed-off-by: Joshua Clayton
    Signed-off-by: Alan Tull
    Signed-off-by: Greg Kroah-Hartman

    Anatolij Gustschin
     

08 Apr, 2017

2 commits


17 Mar, 2017

1 commit

  • Add a flag that is passed to the write_init() callback, indicating
    that the bitstream is encrypted.

    The low-level driver will deal with the flag, or return an error,
    if encrypted bitstreams are not supported.

    Signed-off-by: Moritz Fischer
    Acked-by: Michal Simek
    Signed-off-by: Alan Tull
    Signed-off-by: Greg Kroah-Hartman

    Moritz Fischer
     

10 Feb, 2017

1 commit

  • Requiring contiguous kernel memory is not a good idea, this is a limited
    resource and allocation can fail under normal work loads.

    This introduces a .write_sg op that supporting drivers can provide
    to DMA directly from dis-contiguous memory and a new entry point
    fpga_mgr_buf_load_sg that users can call to directly provide page
    lists.

    The full matrix of compatibility is provided, either the linear or sg
    interface can be used by the user with a driver supporting either
    interface.

    A notable change for drivers is that the .write op can now be called
    multiple times.

    Signed-off-by: Jason Gunthorpe
    Acked-by: Alan Tull
    Acked-by: Moritz Fischer
    Signed-off-by: Greg Kroah-Hartman

    Jason Gunthorpe
     

30 Nov, 2016

1 commit

  • This interface was designed for streaming, but write_init's buf
    argument has an unclear purpose. Define it to be the first bytes
    of the bitstream. Each driver gets to set how many bytes (at most)
    it wants to see. Short bitstreams will be passed through as-is, while
    long ones will be truncated.

    The intent is to allow drivers to peek at the header before the transfer
    actually starts.

    Signed-off-by: Jason Gunthorpe
    Acked-by: Alan Tull

    Jason Gunthorpe
     

11 Nov, 2016

4 commits

  • FPGA Regions support programming FPGA under control of the Device
    Tree.

    Signed-off-by: Alan Tull
    Signed-off-by: Greg Kroah-Hartman

    Alan Tull
     
  • This framework adds API functions for enabling/
    disabling FPGA bridges under kernel control.

    This allows the Linux kernel to disable FPGA bridges
    during FPGA reprogramming and to enable FPGA bridges
    when FPGA reprogramming is done. This framework is
    be manufacturer-agnostic, allowing it to be used in
    interfaces that use the FPGA Manager Framework to
    reprogram FPGA's.

    The functions are:
    * of_fpga_bridge_get
    * fpga_bridge_put
    Get/put an exclusive reference to a FPGA bridge.

    * fpga_bridge_enable
    * fpga_bridge_disable
    Enable/Disable traffic through a bridge.

    * fpga_bridge_register
    * fpga_bridge_unregister
    Register/unregister a device-specific low level FPGA
    Bridge driver.

    Get an exclusive reference to a bridge and add it to a list:
    * fpga_bridge_get_to_list

    To enable/disable/put a set of bridges that are on a list:
    * fpga_bridges_enable
    * fpga_bridges_disable
    * fpga_bridges_put

    Signed-off-by: Alan Tull
    Signed-off-by: Greg Kroah-Hartman

    Alan Tull
     
  • This patch adds a minor change in the FPGA Manager API
    to hold information that is specific to an FPGA image
    file. This change is expected to bring little, if any,
    pain. The socfpga and zynq drivers are fixed up in
    this patch.

    An FPGA image file will have particulars that affect how the
    image is programmed to the FPGA. One example is that
    current 'flags' currently has one bit which shows whether the
    FPGA image was built for full reconfiguration or partial
    reconfiguration. Another example is timeout values for
    enabling or disabling the bridges in the FPGA. As the
    complexity of the FPGA design increases, the bridges in the
    FPGA may take longer times to enable or disable.

    This patch adds a new 'struct fpga_image_info', moves the
    current 'u32 flags' to it. Two other image-specific u32's
    are added for the bridge enable/disable timeouts. The FPGA
    Manager API functions are changed, replacing the 'u32 flag'
    parameter with a pointer to struct fpga_image_info.
    Subsequent patches fix the existing low level FPGA manager
    drivers.

    Signed-off-by: Alan Tull
    Acked-by: Moritz Fischer
    Signed-off-by: Greg Kroah-Hartman

    Alan Tull
     
  • The intent is to provide a non-DT method of getting
    ahold of a FPGA manager to do some FPGA programming.

    This patch refactors of_fpga_mgr_get() to reuse most of it
    while adding a new method fpga_mgr_get() for getting a
    pointer to a fpga manager struct, given the device.

    Signed-off-by: Alan Tull
    Signed-off-by: Greg Kroah-Hartman

    Alan Tull
     

08 Oct, 2015

1 commit

  • API to support programming FPGA's.

    The following functions are exported as GPL:
    * fpga_mgr_buf_load
    Load fpga from image in buffer

    * fpga_mgr_firmware_load
    Request firmware and load it to the FPGA.

    * fpga_mgr_register
    * fpga_mgr_unregister
    FPGA device drivers can be added by calling
    fpga_mgr_register() to register a set of
    fpga_manager_ops to do device specific stuff.

    * of_fpga_mgr_get
    * fpga_mgr_put
    Get/put a reference to a fpga manager.

    The following sysfs files are created:
    * /sys/class/fpga_manager//name
    Name of low level driver.

    * /sys/class/fpga_manager//state
    State of fpga manager

    Signed-off-by: Alan Tull
    Acked-by: Michal Simek
    Signed-off-by: Greg Kroah-Hartman

    Alan Tull