04 Sep, 2019

2 commits

  • Error reporting is one important private feature, it reports error
    detected on port and accelerated function unit (AFU). It introduces
    several sysfs interfaces to allow userspace to check and clear
    errors detected by hardware.

    Signed-off-by: Xu Yilun
    Signed-off-by: Wu Hao
    Acked-by: Alan Tull
    Signed-off-by: Moritz Fischer

    Wu Hao
     
  • As these two functions are used by other private features within the
    same driver module but different driver files. e.g. in error reporting
    private feature, it requires to clear errors when port is in reset.

    Signed-off-by: Xu Yilun
    Signed-off-by: Wu Hao
    Acked-by: Moritz Fischer
    Acked-by: Alan Tull
    Signed-off-by: Moritz Fischer

    Wu Hao
     

15 Jul, 2018

2 commits

  • DMA memory regions are required for Accelerated Function Unit (AFU) usage.
    These two ioctls allow user space applications to map user memory regions
    for dma, and unmap them after use. Iova is returned from driver to user
    space application via DFL_FPGA_PORT_DMA_MAP ioctl. Application needs to
    unmap it after use, otherwise, driver will unmap them in device file
    release operation.

    Each AFU has its own rb tree to keep track of its mapped DMA regions.

    Ioctl interfaces:
    * DFL_FPGA_PORT_DMA_MAP
    Do the dma mapping per user_addr and length provided by user.
    Return iova in provided struct dfl_fpga_port_dma_map.

    * DFL_FPGA_PORT_DMA_UNMAP
    Unmap the dma region per iova provided by user.

    Signed-off-by: Tim Whisonant
    Signed-off-by: Enno Luebbers
    Signed-off-by: Shiva Rao
    Signed-off-by: Christopher Rauer
    Signed-off-by: Xiao Guangrong
    Signed-off-by: Wu Hao
    Acked-by: Alan Tull
    Signed-off-by: Greg Kroah-Hartman

    Wu Hao
     
  • User Accelerated Function Unit sub feature exposes the MMIO region of
    the AFU. After valid PR bitstream is programmed and the port is enabled,
    then this MMIO region could be accessed.

    This patch adds support to enumerate the AFU MMIO region and expose it
    to userspace via mmap file operation. Below interfaces are exposed to user:

    Sysfs interface:
    * /sys/class/fpga_region///afu_id
    Read-only. Indicate which PR bitstream is programmed to this AFU.

    Ioctl interfaces:
    * DFL_FPGA_PORT_GET_INFO
    Provide info to userspace on the number of supported region.
    Only UAFU region is supported now.

    * DFL_FPGA_PORT_GET_REGION_INFO
    Provide region information, including access permission, region size,
    offset from the start of device fd.

    Signed-off-by: Tim Whisonant
    Signed-off-by: Enno Luebbers
    Signed-off-by: Shiva Rao
    Signed-off-by: Christopher Rauer
    Signed-off-by: Xiao Guangrong
    Signed-off-by: Wu Hao
    Acked-by: Alan Tull
    Signed-off-by: Greg Kroah-Hartman

    Xiao Guangrong