Home
last modified time | relevance | path

Searched refs:hdev (Results 1 – 25 of 395) sorted by relevance

12345678910>>...16

/openbmc/linux/drivers/accel/habanalabs/common/
H A Ddevice.c46 static u64 hl_set_dram_bar(struct hl_device *hdev, u64 addr, struct pci_mem_region *region, in hl_set_dram_bar() argument
49 struct asic_fixed_properties *prop = &hdev->asic_prop; in hl_set_dram_bar()
58 old_base = hdev->asic_funcs->set_dram_bar_base(hdev, bar_base_addr); in hl_set_dram_bar()
67 int hl_access_sram_dram_region(struct hl_device *hdev, u64 addr, u64 *val, in hl_access_sram_dram_region() argument
70 struct pci_mem_region *region = &hdev->pci_mem_region[region_type]; in hl_access_sram_dram_region()
75 old_base = hl_set_dram_bar(hdev, addr, region, &bar_region_base); in hl_access_sram_dram_region()
80 acc_addr = hdev->pcie_bar[region->bar_id] + region->offset_in_bar + in hl_access_sram_dram_region()
105 rc = hl_set_dram_bar(hdev, old_base, region, NULL); in hl_access_sram_dram_region()
113 static void *hl_dma_alloc_common(struct hl_device *hdev, size_t size, dma_addr_t *dma_handle, in hl_dma_alloc_common() argument
121 ptr = hdev->asic_funcs->asic_dma_alloc_coherent(hdev, size, dma_handle, flag); in hl_dma_alloc_common()
[all …]
H A Dhabanalabs_drv.c81 static enum hl_asic_type get_asic_type(struct hl_device *hdev) in get_asic_type() argument
83 struct pci_dev *pdev = hdev->pdev; in get_asic_type()
139 struct hl_device *hdev; in hl_device_open() local
144 hdev = idr_find(&hl_devs_idr, iminor(inode)); in hl_device_open()
147 if (!hdev) { in hl_device_open()
157 hpriv->hdev = hdev; in hl_device_open()
168 hl_mem_mgr_init(hpriv->hdev->dev, &hpriv->mem_mgr); in hl_device_open()
172 mutex_lock(&hdev->fpriv_list_lock); in hl_device_open()
174 if (!hl_device_operational(hdev, &status)) { in hl_device_open()
175 dev_dbg_ratelimited(hdev->dev, in hl_device_open()
[all …]
H A Dfirmware_if.c111 static int hl_get_sw_major_minor_subminor(struct hl_device *hdev, const char *fw_str) in hl_get_sw_major_minor_subminor() argument
138 start = extract_u32_until_given_char(start, &hdev->fw_sw_major_ver, '.'); in hl_get_sw_major_minor_subminor()
143 start = extract_u32_until_given_char(start, &hdev->fw_sw_minor_ver, '.'); in hl_get_sw_major_minor_subminor()
148 start = extract_u32_until_given_char(start, &hdev->fw_sw_sub_minor_ver, '-'); in hl_get_sw_major_minor_subminor()
155 hdev->fw_sw_major_ver = 0; in hl_get_sw_major_minor_subminor()
156 hdev->fw_sw_minor_ver = 0; in hl_get_sw_major_minor_subminor()
157 hdev->fw_sw_sub_minor_ver = 0; in hl_get_sw_major_minor_subminor()
171 static int hl_get_preboot_major_minor(struct hl_device *hdev, char *preboot_ver) in hl_get_preboot_major_minor() argument
173 preboot_ver = extract_u32_until_given_char(preboot_ver, &hdev->fw_inner_major_ver, '.'); in hl_get_preboot_major_minor()
175 dev_err(hdev->dev, "Error parsing preboot major version\n"); in hl_get_preboot_major_minor()
[all …]
H A Dhw_queue.c43 struct hl_device *hdev = cs->ctx->hdev; in hl_hw_queue_update_ci() local
47 if (hdev->disabled) in hl_hw_queue_update_ci()
50 q = &hdev->kernel_queues[0]; in hl_hw_queue_update_ci()
53 if (!hdev->asic_prop.max_queues || q->queue_type == QUEUE_TYPE_HW) in hl_hw_queue_update_ci()
61 for (i = 0 ; i < hdev->asic_prop.max_queues ; i++, q++) { in hl_hw_queue_update_ci()
83 void hl_hw_queue_submit_bd(struct hl_device *hdev, struct hl_hw_queue *q, in hl_hw_queue_submit_bd() argument
95 hdev->asic_funcs->ring_doorbell(hdev, q->hw_queue_id, q->pi); in hl_hw_queue_submit_bd()
116 static int ext_queue_sanity_checks(struct hl_device *hdev, in ext_queue_sanity_checks() argument
121 &hdev->completion_queue[q->cq_id].free_slots_cnt; in ext_queue_sanity_checks()
128 dev_dbg(hdev->dev, "Queue %d doesn't have room for %d CBs\n", in ext_queue_sanity_checks()
[all …]
H A Dsysfs.c14 struct hl_device *hdev = dev_get_drvdata(dev); in clk_max_freq_mhz_show() local
17 if (!hl_device_operational(hdev, NULL)) in clk_max_freq_mhz_show()
20 value = hl_fw_get_frequency(hdev, hdev->asic_prop.clk_pll_index, false); in clk_max_freq_mhz_show()
24 hdev->asic_prop.max_freq_value = value; in clk_max_freq_mhz_show()
32 struct hl_device *hdev = dev_get_drvdata(dev); in clk_max_freq_mhz_store() local
36 if (!hl_device_operational(hdev, NULL)) { in clk_max_freq_mhz_store()
47 hdev->asic_prop.max_freq_value = value * 1000 * 1000; in clk_max_freq_mhz_store()
49 hl_fw_set_frequency(hdev, hdev->asic_prop.clk_pll_index, hdev->asic_prop.max_freq_value); in clk_max_freq_mhz_store()
57 struct hl_device *hdev = dev_get_drvdata(dev); in clk_cur_freq_mhz_show() local
60 if (!hl_device_operational(hdev, NULL)) in clk_cur_freq_mhz_show()
[all …]
/openbmc/linux/net/bluetooth/
H A Dhci_sync.c24 static void hci_cmd_sync_complete(struct hci_dev *hdev, u8 result, u16 opcode, in hci_cmd_sync_complete() argument
27 bt_dev_dbg(hdev, "result 0x%2.2x", result); in hci_cmd_sync_complete()
29 if (hdev->req_status != HCI_REQ_PEND) in hci_cmd_sync_complete()
32 hdev->req_result = result; in hci_cmd_sync_complete()
33 hdev->req_status = HCI_REQ_DONE; in hci_cmd_sync_complete()
36 kfree_skb(hdev->req_skb); in hci_cmd_sync_complete()
37 hdev->req_skb = NULL; in hci_cmd_sync_complete()
46 hdev->req_rsp = skb_get(skb); in hci_cmd_sync_complete()
49 wake_up_interruptible(&hdev->req_wait_q); in hci_cmd_sync_complete()
52 static struct sk_buff *hci_cmd_sync_alloc(struct hci_dev *hdev, u16 opcode, in hci_cmd_sync_alloc() argument
[all …]
H A Dhci_debugfs.c39 struct hci_dev *hdev = file->private_data; \
42 buf[0] = test_bit(__quirk, &hdev->quirks) ? 'Y' : 'N'; \
52 struct hci_dev *hdev = file->private_data; \
56 if (test_bit(HCI_UP, &hdev->flags)) \
63 if (enable == test_bit(__quirk, &hdev->quirks)) \
66 change_bit(__quirk, &hdev->quirks); \
81 struct hci_dev *hdev = f->private; \
83 hci_dev_lock(hdev); \
84 seq_printf(f, "%s\n", hdev->__field ? : ""); \
85 hci_dev_unlock(hdev); \
[all …]
H A Dcoredump.c32 bt_dev_dbg(hdev, \
34 hci_dmp_cb(skb)->pkt_type, hdev->dump.state)
51 static int hci_devcd_update_state(struct hci_dev *hdev, int state) in hci_devcd_update_state() argument
53 bt_dev_dbg(hdev, "Updating devcoredump state from %d to %d.", in hci_devcd_update_state()
54 hdev->dump.state, state); in hci_devcd_update_state()
56 hdev->dump.state = state; in hci_devcd_update_state()
58 return hci_devcd_update_hdr_state(hdev->dump.head, in hci_devcd_update_state()
59 hdev->dump.alloc_size, state); in hci_devcd_update_state()
62 static int hci_devcd_mkheader(struct hci_dev *hdev, struct sk_buff *skb) in hci_devcd_mkheader() argument
72 if (hdev->dump.dmp_hdr) in hci_devcd_mkheader()
[all …]
H A Dhci_core.c69 struct hci_dev *hdev = NULL, *d; in hci_dev_get() local
79 hdev = hci_dev_hold(d); in hci_dev_get()
84 return hdev; in hci_dev_get()
89 bool hci_discovery_active(struct hci_dev *hdev) in hci_discovery_active() argument
91 struct discovery_state *discov = &hdev->discovery; in hci_discovery_active()
103 void hci_discovery_set_state(struct hci_dev *hdev, int state) in hci_discovery_set_state() argument
105 int old_state = hdev->discovery.state; in hci_discovery_set_state()
107 BT_DBG("%s state %u -> %u", hdev->name, hdev->discovery.state, state); in hci_discovery_set_state()
112 hdev->discovery.state = state; in hci_discovery_set_state()
116 hci_update_passive_scan(hdev); in hci_discovery_set_state()
[all …]
H A Dhci_request.c35 void hci_req_init(struct hci_request *req, struct hci_dev *hdev) in hci_req_init() argument
38 req->hdev = hdev; in hci_req_init()
47 bool hci_req_status_pend(struct hci_dev *hdev) in hci_req_status_pend() argument
49 return hdev->req_status == HCI_REQ_PEND; in hci_req_status_pend()
55 struct hci_dev *hdev = req->hdev; in req_run() local
59 bt_dev_dbg(hdev, "length %u", skb_queue_len(&req->cmd_q)); in req_run()
81 spin_lock_irqsave(&hdev->cmd_q.lock, flags); in req_run()
82 skb_queue_splice_tail(&req->cmd_q, &hdev->cmd_q); in req_run()
83 spin_unlock_irqrestore(&hdev->cmd_q.lock, flags); in req_run()
85 queue_work(hdev->workqueue, &hdev->cmd_work); in req_run()
[all …]
H A Dhci_event.c50 static void *hci_ev_skb_pull(struct hci_dev *hdev, struct sk_buff *skb, in hci_ev_skb_pull() argument
57 bt_dev_err(hdev, "Malformed Event: 0x%2.2x", ev); in hci_ev_skb_pull()
62 static void *hci_cc_skb_pull(struct hci_dev *hdev, struct sk_buff *skb, in hci_cc_skb_pull() argument
69 bt_dev_err(hdev, "Malformed Command Complete: 0x%4.4x", op); in hci_cc_skb_pull()
74 static void *hci_le_ev_skb_pull(struct hci_dev *hdev, struct sk_buff *skb, in hci_le_ev_skb_pull() argument
81 bt_dev_err(hdev, "Malformed LE Event: 0x%2.2x", ev); in hci_le_ev_skb_pull()
86 static u8 hci_cc_inquiry_cancel(struct hci_dev *hdev, void *data, in hci_cc_inquiry_cancel() argument
91 bt_dev_dbg(hdev, "status 0x%2.2x", rp->status); in hci_cc_inquiry_cancel()
100 if (rp->status == HCI_ERROR_COMMAND_DISALLOWED && !test_bit(HCI_INQUIRY, &hdev->flags)) { in hci_cc_inquiry_cancel()
101 bt_dev_warn(hdev, "Ignoring error of Inquiry Cancel command"); in hci_cc_inquiry_cancel()
[all …]
H A Dmgmt.c323 static int mgmt_index_event(u16 event, struct hci_dev *hdev, void *data, in mgmt_index_event() argument
326 return mgmt_send_event(event, hdev, HCI_CHANNEL_CONTROL, data, len, in mgmt_index_event()
330 static int mgmt_limited_event(u16 event, struct hci_dev *hdev, void *data, in mgmt_limited_event() argument
333 return mgmt_send_event(event, hdev, HCI_CHANNEL_CONTROL, data, len, in mgmt_limited_event()
337 static int mgmt_event(u16 event, struct hci_dev *hdev, void *data, u16 len, in mgmt_event() argument
340 return mgmt_send_event(event, hdev, HCI_CHANNEL_CONTROL, data, len, in mgmt_event()
366 static int read_version(struct sock *sk, struct hci_dev *hdev, void *data, in read_version() argument
371 bt_dev_dbg(hdev, "sock %p", sk); in read_version()
379 static int read_commands(struct sock *sk, struct hci_dev *hdev, void *data, in read_commands() argument
387 bt_dev_dbg(hdev, "sock %p", sk); in read_commands()
[all …]
/openbmc/linux/net/nfc/hci/
H A Dcore.c37 void nfc_hci_reset_pipes(struct nfc_hci_dev *hdev) in nfc_hci_reset_pipes() argument
42 hdev->pipes[i].gate = NFC_HCI_INVALID_GATE; in nfc_hci_reset_pipes()
43 hdev->pipes[i].dest_host = NFC_HCI_INVALID_HOST; in nfc_hci_reset_pipes()
45 memset(hdev->gate2pipe, NFC_HCI_INVALID_PIPE, sizeof(hdev->gate2pipe)); in nfc_hci_reset_pipes()
49 void nfc_hci_reset_pipes_per_host(struct nfc_hci_dev *hdev, u8 host) in nfc_hci_reset_pipes_per_host() argument
54 if (hdev->pipes[i].dest_host != host) in nfc_hci_reset_pipes_per_host()
57 hdev->pipes[i].gate = NFC_HCI_INVALID_GATE; in nfc_hci_reset_pipes_per_host()
58 hdev->pipes[i].dest_host = NFC_HCI_INVALID_HOST; in nfc_hci_reset_pipes_per_host()
65 struct nfc_hci_dev *hdev = container_of(work, struct nfc_hci_dev, in nfc_hci_msg_tx_work() local
71 mutex_lock(&hdev->msg_tx_mutex); in nfc_hci_msg_tx_work()
[all …]
/openbmc/linux/drivers/net/ethernet/hisilicon/hns3/hns3vf/
H A Dhclgevf_main.c19 static int hclgevf_reset_hdev(struct hclgevf_dev *hdev);
20 static void hclgevf_task_schedule(struct hclgevf_dev *hdev,
50 void hclgevf_arq_init(struct hclgevf_dev *hdev) in hclgevf_arq_init() argument
52 struct hclge_comm_cmq *cmdq = &hdev->hw.hw.cmq; in hclgevf_arq_init()
56 hdev->arq.hdev = hdev; in hclgevf_arq_init()
57 hdev->arq.head = 0; in hclgevf_arq_init()
58 hdev->arq.tail = 0; in hclgevf_arq_init()
59 atomic_set(&hdev->arq.count, 0); in hclgevf_arq_init()
75 struct hclgevf_dev *hdev = hclgevf_ae_get_hdev(handle); in hclgevf_update_stats() local
78 status = hclge_comm_tqps_update_stats(handle, &hdev->hw.hw); in hclgevf_update_stats()
[all …]
H A Dhclgevf_mbx.c17 static void hclgevf_reset_mbx_resp_status(struct hclgevf_dev *hdev) in hclgevf_reset_mbx_resp_status() argument
22 hdev->mbx_resp.received_resp = false; in hclgevf_reset_mbx_resp_status()
23 hdev->mbx_resp.origin_mbx_msg = 0; in hclgevf_reset_mbx_resp_status()
24 hdev->mbx_resp.resp_status = 0; in hclgevf_reset_mbx_resp_status()
25 hdev->mbx_resp.match_id++; in hclgevf_reset_mbx_resp_status()
27 if (hdev->mbx_resp.match_id == 0) in hclgevf_reset_mbx_resp_status()
28 hdev->mbx_resp.match_id = HCLGEVF_MBX_MATCH_ID_START; in hclgevf_reset_mbx_resp_status()
29 memset(hdev->mbx_resp.additional_info, 0, HCLGE_MBX_MAX_RESP_DATA_SIZE); in hclgevf_reset_mbx_resp_status()
40 static int hclgevf_get_mbx_resp(struct hclgevf_dev *hdev, u16 code0, u16 code1, in hclgevf_get_mbx_resp() argument
50 dev_err(&hdev->pdev->dev, in hclgevf_get_mbx_resp()
[all …]
/openbmc/linux/drivers/bluetooth/
H A Dbtintel.c52 int btintel_check_bdaddr(struct hci_dev *hdev) in btintel_check_bdaddr() argument
57 skb = __hci_cmd_sync(hdev, HCI_OP_READ_BD_ADDR, 0, NULL, in btintel_check_bdaddr()
61 bt_dev_err(hdev, "Reading Intel device address failed (%d)", in btintel_check_bdaddr()
67 bt_dev_err(hdev, "Intel device address length mismatch"); in btintel_check_bdaddr()
80 bt_dev_err(hdev, "Found Intel default device address (%pMR)", in btintel_check_bdaddr()
82 set_bit(HCI_QUIRK_INVALID_BDADDR, &hdev->quirks); in btintel_check_bdaddr()
91 int btintel_enter_mfg(struct hci_dev *hdev) in btintel_enter_mfg() argument
96 skb = __hci_cmd_sync(hdev, 0xfc11, 2, param, HCI_CMD_TIMEOUT); in btintel_enter_mfg()
98 bt_dev_err(hdev, "Entering manufacturer mode failed (%ld)", in btintel_enter_mfg()
108 int btintel_exit_mfg(struct hci_dev *hdev, bool reset, bool patched) in btintel_exit_mfg() argument
[all …]
/openbmc/linux/include/net/bluetooth/
H A Dhci_sync.h11 typedef int (*hci_cmd_sync_work_func_t)(struct hci_dev *hdev, void *data);
12 typedef void (*hci_cmd_sync_work_destroy_t)(struct hci_dev *hdev, void *data,
27 struct sk_buff *__hci_cmd_sync(struct hci_dev *hdev, u16 opcode, u32 plen,
29 struct sk_buff *hci_cmd_sync(struct hci_dev *hdev, u16 opcode, u32 plen,
31 struct sk_buff *__hci_cmd_sync_ev(struct hci_dev *hdev, u16 opcode, u32 plen,
33 struct sk_buff *__hci_cmd_sync_sk(struct hci_dev *hdev, u16 opcode, u32 plen,
36 int __hci_cmd_sync_status(struct hci_dev *hdev, u16 opcode, u32 plen,
38 int __hci_cmd_sync_status_sk(struct hci_dev *hdev, u16 opcode, u32 plen,
41 int hci_cmd_sync_status(struct hci_dev *hdev, u16 opcode, u32 plen,
44 void hci_cmd_sync_init(struct hci_dev *hdev);
[all …]
/openbmc/linux/drivers/media/platform/qcom/venus/
H A Dhfi_venus.c138 static void venus_set_state(struct venus_hfi_device *hdev, in venus_set_state() argument
141 mutex_lock(&hdev->lock); in venus_set_state()
142 hdev->state = state; in venus_set_state()
143 mutex_unlock(&hdev->lock); in venus_set_state()
146 static bool venus_is_valid_state(struct venus_hfi_device *hdev) in venus_is_valid_state() argument
148 return hdev->state != VENUS_STATE_DEINIT; in venus_is_valid_state()
151 static void venus_dump_packet(struct venus_hfi_device *hdev, const void *packet) in venus_dump_packet() argument
162 static int venus_write_queue(struct venus_hfi_device *hdev, in venus_write_queue() argument
178 venus_dump_packet(hdev, packet); in venus_write_queue()
236 static int venus_read_queue(struct venus_hfi_device *hdev, in venus_read_queue() argument
[all …]
/openbmc/linux/drivers/crypto/
H A Dimg-hash.c85 struct img_hash_dev *hdev; member
112 struct img_hash_dev *hdev; member
149 static inline u32 img_hash_read(struct img_hash_dev *hdev, u32 offset) in img_hash_read() argument
151 return readl_relaxed(hdev->io_base + offset); in img_hash_read()
154 static inline void img_hash_write(struct img_hash_dev *hdev, in img_hash_write() argument
157 writel_relaxed(value, hdev->io_base + offset); in img_hash_write()
160 static inline __be32 img_hash_read_result_queue(struct img_hash_dev *hdev) in img_hash_read_result_queue() argument
162 return cpu_to_be32(img_hash_read(hdev, CR_RESULT_QUEUE)); in img_hash_read_result_queue()
165 static void img_hash_start(struct img_hash_dev *hdev, bool dma) in img_hash_start() argument
167 struct img_hash_request_ctx *ctx = ahash_request_ctx(hdev->req); in img_hash_start()
[all …]
/openbmc/linux/drivers/net/ethernet/hisilicon/hns3/hns3pf/
H A Dhclge_dcb.c11 static int hclge_ieee_ets_to_tm_info(struct hclge_dev *hdev, in hclge_ieee_ets_to_tm_info() argument
19 hdev->tm_info.tc_info[i].tc_sch_mode = in hclge_ieee_ets_to_tm_info()
21 hdev->tm_info.pg_info[0].tc_dwrr[i] = 0; in hclge_ieee_ets_to_tm_info()
24 hdev->tm_info.tc_info[i].tc_sch_mode = in hclge_ieee_ets_to_tm_info()
26 hdev->tm_info.pg_info[0].tc_dwrr[i] = in hclge_ieee_ets_to_tm_info()
39 hclge_tm_prio_tc_info_update(hdev, ets->prio_tc); in hclge_ieee_ets_to_tm_info()
44 static void hclge_tm_info_to_ieee_ets(struct hclge_dev *hdev, in hclge_tm_info_to_ieee_ets() argument
51 ets->ets_cap = hdev->tc_max; in hclge_tm_info_to_ieee_ets()
54 ets->prio_tc[i] = hdev->tm_info.prio_tc[i]; in hclge_tm_info_to_ieee_ets()
55 if (i < hdev->tm_info.num_tc) in hclge_tm_info_to_ieee_ets()
[all …]
H A Dhclge_tm.c138 static void hclge_pfc_stats_get(struct hclge_dev *hdev, bool tx, u64 *stats) in hclge_pfc_stats_get() argument
149 stats[i] = HCLGE_STATS_READ(&hdev->mac_stats, offset[i]); in hclge_pfc_stats_get()
152 void hclge_pfc_rx_stats_get(struct hclge_dev *hdev, u64 *stats) in hclge_pfc_rx_stats_get() argument
154 hclge_pfc_stats_get(hdev, false, stats); in hclge_pfc_rx_stats_get()
157 void hclge_pfc_tx_stats_get(struct hclge_dev *hdev, u64 *stats) in hclge_pfc_tx_stats_get() argument
159 hclge_pfc_stats_get(hdev, true, stats); in hclge_pfc_tx_stats_get()
162 int hclge_mac_pause_en_cfg(struct hclge_dev *hdev, bool tx, bool rx) in hclge_mac_pause_en_cfg() argument
171 return hclge_cmd_send(&hdev->hw, &desc, 1); in hclge_mac_pause_en_cfg()
174 int hclge_pfc_pause_en_cfg(struct hclge_dev *hdev, u8 tx_rx_bitmap, in hclge_pfc_pause_en_cfg() argument
185 return hclge_cmd_send(&hdev->hw, &desc, 1); in hclge_pfc_pause_en_cfg()
[all …]
H A Dhclge_main.c46 static int hclge_set_mac_mtu(struct hclge_dev *hdev, int new_mps);
47 static int hclge_init_vlan_config(struct hclge_dev *hdev);
48 static void hclge_sync_vlan_filter(struct hclge_dev *hdev);
51 static void hclge_rfs_filter_expire(struct hclge_dev *hdev);
52 static int hclge_clear_arfs_rules(struct hclge_dev *hdev);
55 static int hclge_set_default_loopback(struct hclge_dev *hdev);
57 static void hclge_sync_mac_table(struct hclge_dev *hdev);
58 static void hclge_restore_hw_table(struct hclge_dev *hdev);
59 static void hclge_sync_promisc_mode(struct hclge_dev *hdev);
60 static void hclge_sync_fd_table(struct hclge_dev *hdev);
[all …]
H A Dhclge_ptp.c8 static int hclge_ptp_get_cycle(struct hclge_dev *hdev) in hclge_ptp_get_cycle() argument
10 struct hclge_ptp *ptp = hdev->ptp; in hclge_ptp_get_cycle()
12 ptp->cycle.quo = readl(hdev->ptp->io_base + HCLGE_PTP_CYCLE_QUO_REG) & in hclge_ptp_get_cycle()
14 ptp->cycle.numer = readl(hdev->ptp->io_base + HCLGE_PTP_CYCLE_NUM_REG); in hclge_ptp_get_cycle()
15 ptp->cycle.den = readl(hdev->ptp->io_base + HCLGE_PTP_CYCLE_DEN_REG); in hclge_ptp_get_cycle()
18 dev_err(&hdev->pdev->dev, "invalid ptp cycle denominator!\n"); in hclge_ptp_get_cycle()
27 struct hclge_dev *hdev = hclge_ptp_get_hdev(ptp); in hclge_ptp_adjfine() local
28 struct hclge_ptp_cycle *cycle = &hdev->ptp->cycle; in hclge_ptp_adjfine()
43 spin_lock_irqsave(&hdev->ptp->lock, flags); in hclge_ptp_adjfine()
45 hdev->ptp->io_base + HCLGE_PTP_CYCLE_QUO_REG); in hclge_ptp_adjfine()
[all …]
/openbmc/linux/drivers/accel/habanalabs/common/pci/
H A Dpci.c32 int hl_pci_bars_map(struct hl_device *hdev, const char * const name[3], in hl_pci_bars_map() argument
35 struct pci_dev *pdev = hdev->pdev; in hl_pci_bars_map()
40 dev_err(hdev->dev, "Cannot obtain PCI resources\n"); in hl_pci_bars_map()
46 hdev->pcie_bar[bar] = is_wc[i] ? in hl_pci_bars_map()
49 if (!hdev->pcie_bar[bar]) { in hl_pci_bars_map()
50 dev_err(hdev->dev, "pci_ioremap%s_bar failed for %s\n", in hl_pci_bars_map()
62 if (hdev->pcie_bar[bar]) in hl_pci_bars_map()
63 iounmap(hdev->pcie_bar[bar]); in hl_pci_bars_map()
77 static void hl_pci_bars_unmap(struct hl_device *hdev) in hl_pci_bars_unmap() argument
79 struct pci_dev *pdev = hdev->pdev; in hl_pci_bars_unmap()
[all …]
/openbmc/linux/drivers/accel/habanalabs/goya/
H A Dgoya_hwmgr.c10 void goya_set_pll_profile(struct hl_device *hdev, enum hl_pll_frequency freq) in goya_set_pll_profile() argument
12 struct goya_device *goya = hdev->asic_specific; in goya_set_pll_profile()
14 if (!hdev->pdev) in goya_set_pll_profile()
19 hl_fw_set_frequency(hdev, HL_GOYA_MME_PLL, hdev->high_pll); in goya_set_pll_profile()
20 hl_fw_set_frequency(hdev, HL_GOYA_TPC_PLL, hdev->high_pll); in goya_set_pll_profile()
21 hl_fw_set_frequency(hdev, HL_GOYA_IC_PLL, hdev->high_pll); in goya_set_pll_profile()
24 hl_fw_set_frequency(hdev, HL_GOYA_MME_PLL, GOYA_PLL_FREQ_LOW); in goya_set_pll_profile()
25 hl_fw_set_frequency(hdev, HL_GOYA_TPC_PLL, GOYA_PLL_FREQ_LOW); in goya_set_pll_profile()
26 hl_fw_set_frequency(hdev, HL_GOYA_IC_PLL, GOYA_PLL_FREQ_LOW); in goya_set_pll_profile()
29 hl_fw_set_frequency(hdev, HL_GOYA_MME_PLL, goya->mme_clk); in goya_set_pll_profile()
[all …]

12345678910>>...16