habanalabs: remove power9 workaround for dma support
[linux-2.6-microblaze.git] / drivers / misc / habanalabs / common / habanalabs.h
index ecfdfec..6c7a602 100644 (file)
@@ -1161,7 +1161,6 @@ struct fw_load_mgr {
  *                    internal memory via DMA engine.
  * @add_device_attr: add ASIC specific device attributes.
  * @handle_eqe: handle event queue entry (IRQ) from CPU-CP.
- * @set_pll_profile: change PLL profile (manual/automatic).
  * @get_events_stat: retrieve event queue entries histogram.
  * @read_pte: read MMU page table entry from DRAM.
  * @write_pte: write MMU page table entry to DRAM.
@@ -1287,12 +1286,10 @@ struct hl_asic_funcs {
                                bool user_address, u64 val);
        int (*debugfs_read_dma)(struct hl_device *hdev, u64 addr, u32 size,
                                void *blob_addr);
-       void (*add_device_attr)(struct hl_device *hdev,
-                               struct attribute_group *dev_attr_grp);
+       void (*add_device_attr)(struct hl_device *hdev, struct attribute_group *dev_clk_attr_grp,
+                               struct attribute_group *dev_vrm_attr_grp);
        void (*handle_eqe)(struct hl_device *hdev,
                                struct hl_eq_entry *eq_entry);
-       void (*set_pll_profile)(struct hl_device *hdev,
-                       enum hl_pll_frequency freq);
        void* (*get_events_stat)(struct hl_device *hdev, bool aggregate,
                                u32 *size);
        u64 (*read_pte)(struct hl_device *hdev, u64 addr);
@@ -2607,8 +2604,6 @@ struct hl_reset_info {
  * @in_debug: whether the device is in a state where the profiling/tracing infrastructure
  *            can be used. This indication is needed because in some ASICs we need to do
  *            specific operations to enable that infrastructure.
- * @power9_64bit_dma_enable: true to enable 64-bit DMA mask support. Relevant
- *                           only to POWER9 machines.
  * @cdev_sysfs_created: were char devices and sysfs nodes created.
  * @stop_on_err: true if engines should stop on error.
  * @supports_sync_stream: is sync stream supported.
@@ -2731,7 +2726,6 @@ struct hl_device {
        u8                              device_cpu_disabled;
        u8                              dma_mask;
        u8                              in_debug;
-       u8                              power9_64bit_dma_enable;
        u8                              cdev_sysfs_created;
        u8                              stop_on_err;
        u8                              supports_sync_stream;
@@ -3092,37 +3086,26 @@ enum pci_region hl_get_pci_memory_region(struct hl_device *hdev, u64 addr);
 int hl_pci_init(struct hl_device *hdev);
 void hl_pci_fini(struct hl_device *hdev);
 
-long hl_get_frequency(struct hl_device *hdev, u32 pll_index,
-                                                               bool curr);
-void hl_set_frequency(struct hl_device *hdev, u32 pll_index,
-                                                               u64 freq);
-int hl_get_temperature(struct hl_device *hdev,
-                      int sensor_index, u32 attr, long *value);
-int hl_set_temperature(struct hl_device *hdev,
-                      int sensor_index, u32 attr, long value);
-int hl_get_voltage(struct hl_device *hdev,
-                  int sensor_index, u32 attr, long *value);
-int hl_get_current(struct hl_device *hdev,
-                  int sensor_index, u32 attr, long *value);
-int hl_get_fan_speed(struct hl_device *hdev,
-                    int sensor_index, u32 attr, long *value);
-int hl_get_pwm_info(struct hl_device *hdev,
-                   int sensor_index, u32 attr, long *value);
-void hl_set_pwm_info(struct hl_device *hdev, int sensor_index, u32 attr,
-                       long value);
-u64 hl_get_max_power(struct hl_device *hdev);
-void hl_set_max_power(struct hl_device *hdev);
-int hl_set_voltage(struct hl_device *hdev,
-                       int sensor_index, u32 attr, long value);
-int hl_set_current(struct hl_device *hdev,
-                       int sensor_index, u32 attr, long value);
-int hl_set_power(struct hl_device *hdev,
-                       int sensor_index, u32 attr, long value);
-int hl_get_power(struct hl_device *hdev,
-                       int sensor_index, u32 attr, long *value);
-int hl_get_clk_rate(struct hl_device *hdev, u32 *cur_clk, u32 *max_clk);
-void hl_set_pll_profile(struct hl_device *hdev, enum hl_pll_frequency freq);
-void hl_sysfs_add_dev_clk_attr(struct hl_device *hdev, struct attribute_group *dev_attr_grp);
+long hl_fw_get_frequency(struct hl_device *hdev, u32 pll_index, bool curr);
+void hl_fw_set_frequency(struct hl_device *hdev, u32 pll_index, u64 freq);
+int hl_get_temperature(struct hl_device *hdev, int sensor_index, u32 attr, long *value);
+int hl_set_temperature(struct hl_device *hdev, int sensor_index, u32 attr, long value);
+int hl_get_voltage(struct hl_device *hdev, int sensor_index, u32 attr, long *value);
+int hl_get_current(struct hl_device *hdev, int sensor_index, u32 attr, long *value);
+int hl_get_fan_speed(struct hl_device *hdev, int sensor_index, u32 attr, long *value);
+int hl_get_pwm_info(struct hl_device *hdev, int sensor_index, u32 attr, long *value);
+void hl_set_pwm_info(struct hl_device *hdev, int sensor_index, u32 attr, long value);
+u64 hl_fw_get_max_power(struct hl_device *hdev);
+void hl_fw_set_max_power(struct hl_device *hdev);
+int hl_set_voltage(struct hl_device *hdev, int sensor_index, u32 attr, long value);
+int hl_set_current(struct hl_device *hdev, int sensor_index, u32 attr, long value);
+int hl_set_power(struct hl_device *hdev, int sensor_index, u32 attr, long value);
+int hl_get_power(struct hl_device *hdev, int sensor_index, u32 attr, long *value);
+int hl_fw_get_clk_rate(struct hl_device *hdev, u32 *cur_clk, u32 *max_clk);
+void hl_fw_set_pll_profile(struct hl_device *hdev);
+void hl_sysfs_add_dev_clk_attr(struct hl_device *hdev, struct attribute_group *dev_clk_attr_grp);
+void hl_sysfs_add_dev_vrm_attr(struct hl_device *hdev, struct attribute_group *dev_vrm_attr_grp);
+
 void hw_sob_get(struct hl_hw_sob *hw_sob);
 void hw_sob_put(struct hl_hw_sob *hw_sob);
 void hl_encaps_handle_do_release(struct kref *ref);