1. 01 5月, 2019 2 次提交
    • T
      habanalabs: Manipulate DMA addresses in ASIC functions · 94cb669c
      Tomer Tayar 提交于
      Routing device accesses to the host memory requires the usage of a base
      offset, which is canceled by the iATU just before leaving the device.
      The value of the base offset might be distinctive between different ASIC
      types.
      The manipulation of the addresses is currently used throughout the
      driver code, and one should be aware to it whenever providing a host
      memory address to the device.
      This patch removes this manipulation from the driver common code, and
      moves it to the ASIC specific functions that are responsible for
      host memory allocation/mapping.
      Signed-off-by: NTomer Tayar <ttayar@habana.ai>
      Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com>
      94cb669c
    • O
      habanalabs: rename functions to improve code readability · d9c3aa80
      Oded Gabbay 提交于
      This patch renames four functions in the ASIC-specific functions section,
      so it will be easier to differentiate them from the generic kernel
      functions with the same name.
      
      This will help in future code reviews, to make sure we don't use the
      kernel functions directly.
      Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com>
      d9c3aa80
  2. 30 4月, 2019 1 次提交
  3. 29 4月, 2019 1 次提交
    • T
      habanalabs: Use single pool for CPU accessible host memory · 03d5f641
      Tomer Tayar 提交于
      The device's CPU accessible memory on host is managed in a dedicated
      pool, except for 2 regions - Primary Queue (PQ) and Event Queue (EQ) -
      which are allocated from generic DMA pools.
      Due to address length limitations of the CPU, the addresses of all these
      memory regions must have the same MSBs starting at bit 40.
      This patch modifies the allocation of the PQ and EQ to be also from the
      dedicated pool, to ensure compliance with the limitation.
      Signed-off-by: NTomer Tayar <ttayar@habana.ai>
      Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com>
      03d5f641
  4. 28 4月, 2019 1 次提交
    • O
      habanalabs: return old dram bar address upon change · a38693d7
      Oded Gabbay 提交于
      This patch changes the ASIC interface function that changes the DRAM bar
      window. The change is to return the old address that the DRAM bar pointed
      to instead of an error code.
      
      This simplifies the code that use this function (mainly in debugfs) to
      restore the bar to the old setting.
      
      This is also needed for easier support in future ASICs.
      Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com>
      a38693d7
  5. 26 4月, 2019 1 次提交
  6. 22 4月, 2019 1 次提交
    • O
      habanalabs: use ASIC functions interface for rreg/wreg · b2377e03
      Oded Gabbay 提交于
      This patch slightly changes the macros of RREG32 and WREG32, which are
      used when reading or writing from registers.
      
      Instead of directly calling a function in the common code from these
      macros, the new code calls a function from the ASIC functions interface.
      
      This change allows us to share much more code between real ASICs and
      simulators, which in turn reduces the maintenance burden and
      the chances for forgetting to port code between the ASIC files.
      
      The patch also implements the hl_poll_timeout macro, instead of calling
      the generic readl_poll_timeout macro. This is required to allow use of
      this macro in the simulator files.
      
      As a result from this change, more functions in goya.c are shared with the
      simulator and therefore, should not be defined as static.
      Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com>
      b2377e03
  7. 21 4月, 2019 2 次提交
  8. 10 4月, 2019 1 次提交
  9. 03 5月, 2019 4 次提交
  10. 02 5月, 2019 26 次提交