Home
last modified time | relevance | path

Searched refs:hwdev (Results 1 – 25 of 64) sorted by relevance

123

/linux/drivers/net/ethernet/huawei/hinic3/
H A Dhinic3_hwdev.c48 static int hinic3_comm_aeqs_init(struct hinic3_hwdev *hwdev) in hinic3_comm_aeqs_init() argument
54 num_aeqs = hwdev->hwif->attr.num_aeqs; in hinic3_comm_aeqs_init()
56 dev_warn(hwdev->dev, "Adjust aeq num to %d\n", in hinic3_comm_aeqs_init()
60 err = hinic3_alloc_irqs(hwdev, num_aeqs, aeq_msix_entries, in hinic3_comm_aeqs_init()
63 dev_err(hwdev->dev, "Failed to alloc aeq irqs, num_aeqs: %u\n", in hinic3_comm_aeqs_init()
69 dev_warn(hwdev->dev, "Adjust aeq num to %u\n", in hinic3_comm_aeqs_init()
74 err = hinic3_aeqs_init(hwdev, num_aeqs, aeq_msix_entries); in hinic3_comm_aeqs_init()
76 dev_err(hwdev->dev, "Failed to init aeqs\n"); in hinic3_comm_aeqs_init()
84 hinic3_free_irq(hwdev, aeq_msix_entries[i].vector); in hinic3_comm_aeqs_init()
89 static int hinic3_comm_ceqs_init(struct hinic3_hwdev *hwdev) in hinic3_comm_ceqs_init() argument
[all …]
H A Dhinic3_hw_cfg.c13 static void hinic3_parse_pub_res_cap(struct hinic3_hwdev *hwdev, in hinic3_parse_pub_res_cap() argument
22 static void hinic3_parse_l2nic_res_cap(struct hinic3_hwdev *hwdev, in hinic3_parse_l2nic_res_cap() argument
33 static void hinic3_parse_dev_cap(struct hinic3_hwdev *hwdev, in hinic3_parse_dev_cap() argument
37 struct hinic3_dev_cap *cap = &hwdev->cfg_mgmt->cap; in hinic3_parse_dev_cap()
40 hinic3_parse_pub_res_cap(hwdev, cap, dev_cap, type); in hinic3_parse_dev_cap()
43 if (hinic3_support_nic(hwdev)) in hinic3_parse_dev_cap()
44 hinic3_parse_l2nic_res_cap(hwdev, cap, dev_cap, type); in hinic3_parse_dev_cap()
47 static int get_cap_from_fw(struct hinic3_hwdev *hwdev, in get_cap_from_fw() argument
54 dev_cap.func_id = hinic3_global_func_id(hwdev); in get_cap_from_fw()
58 err = hinic3_send_mbox_to_mgmt(hwdev, MGMT_MOD_CFGM, in get_cap_from_fw()
[all …]
H A Dhinic3_eqs.c106 int hinic3_aeq_register_cb(struct hinic3_hwdev *hwdev, in hinic3_aeq_register_cb() argument
112 aeqs = hwdev->aeqs; in hinic3_aeq_register_cb()
119 void hinic3_aeq_unregister_cb(struct hinic3_hwdev *hwdev, in hinic3_aeq_unregister_cb() argument
124 aeqs = hwdev->aeqs; in hinic3_aeq_unregister_cb()
131 int hinic3_ceq_register_cb(struct hinic3_hwdev *hwdev, in hinic3_ceq_register_cb() argument
137 ceqs = hwdev->ceqs; in hinic3_ceq_register_cb()
144 void hinic3_ceq_unregister_cb(struct hinic3_hwdev *hwdev, in hinic3_ceq_unregister_cb() argument
149 ceqs = hwdev->ceqs; in hinic3_ceq_unregister_cb()
174 hinic3_hwif_write_reg(eq->hwdev->hwif, addr, val); in set_eq_cons_idx()
185 struct hinic3_hwdev *hwdev = ceqs->hwdev; in ceq_event_handler() local
[all …]
H A Dhinic3_mbox.c85 struct hinic3_hwdev *hwdev = mbox->hwdev; in get_mbox_msg_desc() local
90 } else if (HINIC3_IS_VF(hwdev)) { in get_mbox_msg_desc()
93 if (src_func_id != hinic3_pf_id_of_vf(hwdev) || !msg_ch) in get_mbox_msg_desc()
149 dev_err(mbox->hwdev->dev, in mbox_segment_valid()
153 dev_err(mbox->hwdev->dev, in mbox_segment_valid()
190 void hinic3_mbox_func_aeqe_handler(struct hinic3_hwdev *hwdev, u8 *header, in hinic3_mbox_func_aeqe_handler() argument
199 mbox = hwdev->mbox; in hinic3_mbox_func_aeqe_handler()
204 dev_err(mbox->hwdev->dev, in hinic3_mbox_func_aeqe_handler()
212 static int init_mbox_dma_queue(struct hinic3_hwdev *hwdev, in init_mbox_dma_queue() argument
222 mq->dma_buf_vaddr = dma_alloc_coherent(hwdev->dev, size, in init_mbox_dma_queue()
[all …]
H A Dhinic3_nic_io.c211 struct hinic3_hwdev *hwdev = nic_dev->hwdev; in hinic3_init_nic_io() local
221 err = hinic3_set_func_svc_used_state(hwdev, COMM_FUNC_SVC_T_NIC, 1); in hinic3_init_nic_io()
223 dev_err(hwdev->dev, "Failed to set function svc used state\n"); in hinic3_init_nic_io()
229 dev_err(hwdev->dev, "Failed to init function table\n"); in hinic3_init_nic_io()
237 dev_err(hwdev->dev, "Failed to get nic features\n"); in hinic3_init_nic_io()
243 dev_dbg(hwdev->dev, "nic features: 0x%llx\n\n", nic_io->feature_cap); in hinic3_init_nic_io()
248 hinic3_set_func_svc_used_state(hwdev, COMM_FUNC_SVC_T_NIC, 0); in hinic3_init_nic_io()
260 hinic3_set_func_svc_used_state(nic_dev->hwdev, COMM_FUNC_SVC_T_NIC, 0); in hinic3_free_nic_io()
268 struct hinic3_hwdev *hwdev = nic_dev->hwdev; in hinic3_init_nicio_res() local
272 nic_io->max_qps = hinic3_func_max_qnum(hwdev); in hinic3_init_nicio_res()
[all …]
H A Dhinic3_hwif.c96 struct hinic3_hwdev *hwdev = priv_data; in check_hwif_ready_handler() local
99 attr1 = hinic3_hwif_read_reg(hwdev->hwif, HINIC3_CSR_FUNC_ATTR1_ADDR); in check_hwif_ready_handler()
105 static int wait_hwif_ready(struct hinic3_hwdev *hwdev) in wait_hwif_ready() argument
107 return hinic3_wait_for_timeout(hwdev, check_hwif_ready_handler, in wait_hwif_ready()
135 static int init_hwif_attr(struct hinic3_hwdev *hwdev) in init_hwif_attr() argument
140 hwif = hwdev->hwif; in init_hwif_attr()
164 dev_err(hwdev->dev, "Ceq num cfg in fw is zero\n"); in init_hwif_attr()
169 dev_err(hwdev->dev, in init_hwif_attr()
206 static void hinic3_set_ppf(struct hinic3_hwdev *hwdev) in hinic3_set_ppf() argument
208 struct hinic3_hwif *hwif = hwdev->hwif; in hinic3_set_ppf()
[all …]
H A Dhinic3_cmdq.c119 struct hinic3_cmd_buf *hinic3_alloc_cmd_buf(struct hinic3_hwdev *hwdev) in hinic3_alloc_cmd_buf() argument
124 cmdqs = hwdev->cmdqs; in hinic3_alloc_cmd_buf()
133 dev_err(hwdev->dev, "Failed to allocate cmdq cmd buf from the pool\n"); in hinic3_alloc_cmd_buf()
148 void hinic3_free_cmd_buf(struct hinic3_hwdev *hwdev, in hinic3_free_cmd_buf() argument
156 cmdqs = hwdev->cmdqs; in hinic3_free_cmd_buf()
163 struct hinic3_hwdev *hwdev) in cmdq_clear_cmd_buf() argument
166 hinic3_free_cmd_buf(hwdev, cmd_info->buf_in); in cmdq_clear_cmd_buf()
228 cmdq_clear_cmd_buf(&cmdq->cmd_infos[ci], cmdq->hwdev); in cmdq_sync_cmd_handler()
232 void hinic3_cmdq_ceq_handler(struct hinic3_hwdev *hwdev, __le32 ceqe_data) in hinic3_cmdq_ceq_handler() argument
235 struct hinic3_cmdqs *cmdqs = hwdev->cmdqs; in hinic3_cmdq_ceq_handler()
[all …]
H A Dhinic3_lld.c35 static bool hinic3_adev_svc_supported(struct hinic3_hwdev *hwdev, in hinic3_adev_svc_supported() argument
40 return hinic3_support_nic(hwdev); in hinic3_adev_svc_supported()
56 static struct hinic3_adev *hinic3_add_one_adev(struct hinic3_hwdev *hwdev, in hinic3_add_one_adev() argument
69 hadev->adev.id = hwdev->dev_id; in hinic3_add_one_adev()
70 hadev->adev.dev.parent = hwdev->dev; in hinic3_add_one_adev()
73 hadev->hwdev = hwdev; in hinic3_add_one_adev()
77 dev_err(hwdev->dev, "failed init adev %s %u\n", in hinic3_add_one_adev()
78 svc_name, hwdev->dev_id); in hinic3_add_one_adev()
85 dev_err(hwdev->dev, "failed to add adev %s %u\n", in hinic3_add_one_adev()
86 svc_name, hwdev->dev_id); in hinic3_add_one_adev()
[all …]
H A Dhinic3_main.c81 struct hinic3_hwdev *hwdev = nic_dev->hwdev; in hinic3_alloc_txrxqs() local
86 dev_err(hwdev->dev, "Failed to alloc txqs\n"); in hinic3_alloc_txrxqs()
92 dev_err(hwdev->dev, "Failed to alloc rxqs\n"); in hinic3_alloc_txrxqs()
98 dev_err(hwdev->dev, "Failed to init_intr_coalesce\n"); in hinic3_alloc_txrxqs()
127 dev_info(nic_dev->hwdev->dev, in hinic3_periodic_work_handler()
136 struct hinic3_hwdev *hwdev) in hinic3_init_nic_dev() argument
139 struct pci_dev *pdev = hwdev->pdev; in hinic3_init_nic_dev()
143 nic_dev->hwdev = hwdev; in hinic3_init_nic_dev()
153 nic_dev->nic_svc_cap = hwdev->cfg_mgmt->cap.nic_svc_cap; in hinic3_init_nic_dev()
157 dev_err(hwdev->dev, "Failed to initialize nic workqueue\n"); in hinic3_init_nic_dev()
[all …]
H A Dhinic3_mgmt.c26 struct device *dev = pf_to_mgmt->hwdev->dev; in hinic3_mgmt_resp_msg_handler()
68 hinic3_response_mbox_to_mgmt(pf_to_mgmt->hwdev, mgmt_work->mod, in hinic3_recv_mgmt_msg_work_handler()
154 struct hinic3_hwdev *hwdev = pf_to_mgmt->hwdev; in hinic3_recv_mgmt_msg_handler() local
172 dev_err(hwdev->dev, "invalid receive segment\n"); in hinic3_recv_mgmt_msg_handler()
211 struct device *dev = pf_to_mgmt->hwdev->dev; in alloc_msg_buf()
250 int hinic3_pf_to_mgmt_init(struct hinic3_hwdev *hwdev) in hinic3_pf_to_mgmt_init() argument
259 hwdev->pf_to_mgmt = pf_to_mgmt; in hinic3_pf_to_mgmt_init()
260 pf_to_mgmt->hwdev = hwdev; in hinic3_pf_to_mgmt_init()
264 dev_err(hwdev->dev, "Failed to initialize MGMT workqueue\n"); in hinic3_pf_to_mgmt_init()
271 dev_err(hwdev->dev, "Failed to allocate msg buffers\n"); in hinic3_pf_to_mgmt_init()
[all …]
H A Dhinic3_netdev_ops.c41 err = hinic3_alloc_irqs(nic_dev->hwdev, irq_num_gap, in hinic3_qp_irq_change()
54 hinic3_free_irq(nic_dev->hwdev, in hinic3_qp_irq_change()
118 hinic3_free_irq(nic_dev->hwdev, in hinic3_destroy_num_qps()
233 hinic3_sync_dcb_state(nic_dev->hwdev, 1, 0); in hinic3_configure()
345 err = hinic3_set_port_enable(nic_dev->hwdev, enable); in hinic3_maybe_set_port_state()
371 glb_func_id = hinic3_global_func_id(nic_dev->hwdev); in hinic3_vport_up()
372 err = hinic3_set_vport_enable(nic_dev->hwdev, glb_func_id, true); in hinic3_vport_up()
392 err = hinic3_get_link_status(nic_dev->hwdev, &link_status_up); in hinic3_vport_up()
401 hinic3_set_vport_enable(nic_dev->hwdev, glb_func_id, false); in hinic3_vport_up()
403 hinic3_flush_qps_res(nic_dev->hwdev); in hinic3_vport_up()
[all …]
H A Dhinic3_queue_common.c23 static void __queue_pages_free(struct hinic3_hwdev *hwdev, in __queue_pages_free() argument
28 hinic3_dma_free_coherent_align(hwdev->dev, in __queue_pages_free()
35 void hinic3_queue_pages_free(struct hinic3_hwdev *hwdev, in hinic3_queue_pages_free() argument
38 __queue_pages_free(hwdev, qpages, qpages->num_pages); in hinic3_queue_pages_free()
41 int hinic3_queue_pages_alloc(struct hinic3_hwdev *hwdev, in hinic3_queue_pages_alloc() argument
55 err = hinic3_dma_zalloc_coherent_align(hwdev->dev, in hinic3_queue_pages_alloc()
61 __queue_pages_free(hwdev, qpages, pg_idx); in hinic3_queue_pages_alloc()
/linux/drivers/net/ethernet/huawei/hinic/
H A Dhinic_hw_dev.c51 static int parse_capability(struct hinic_hwdev *hwdev, in parse_capability() argument
54 struct hinic_cap *nic_cap = &hwdev->nic_cap; in parse_capability()
57 if (!HINIC_IS_VF(hwdev->hwif) && dev_cap->intr_type != INTR_MSIX_TYPE) in parse_capability()
60 num_aeqs = HINIC_HWIF_NUM_AEQS(hwdev->hwif); in parse_capability()
61 num_ceqs = HINIC_HWIF_NUM_CEQS(hwdev->hwif); in parse_capability()
62 num_irqs = HINIC_HWIF_NUM_IRQS(hwdev->hwif); in parse_capability()
70 if (!HINIC_IS_VF(hwdev->hwif)) in parse_capability()
78 if (!HINIC_IS_VF(hwdev->hwif)) { in parse_capability()
83 hwdev->port_id = dev_cap->port_id; in parse_capability()
96 struct hinic_hwdev *hwdev = &pfhwdev->hwdev; in get_capability() local
[all …]
H A Dhinic_port.c37 struct hinic_hwdev *hwdev = nic_dev->hwdev; in change_mac() local
39 struct hinic_hwif *hwif = hwdev->hwif; in change_mac()
54 err = hinic_port_msg_cmd(hwdev, cmd, &port_mac_cmd, in change_mac()
116 struct hinic_hwdev *hwdev = nic_dev->hwdev; in hinic_port_get_mac() local
118 struct hinic_hwif *hwif = hwdev->hwif; in hinic_port_get_mac()
125 err = hinic_port_msg_cmd(hwdev, HINIC_PORT_CMD_GET_MAC, in hinic_port_get_mac()
147 struct hinic_hwdev *hwdev = nic_dev->hwdev; in hinic_port_set_mtu() local
149 struct hinic_hwif *hwif = hwdev->hwif; in hinic_port_set_mtu()
157 err = hinic_port_msg_cmd(hwdev, HINIC_PORT_CMD_CHANGE_MTU, in hinic_port_set_mtu()
178 struct hinic_hwdev *hwdev = nic_dev->hwdev; in hinic_port_add_vlan() local
[all …]
H A Dhinic_sriov.c29 static int hinic_set_mac(struct hinic_hwdev *hwdev, const u8 *mac_addr, in hinic_set_mac() argument
40 err = hinic_port_msg_cmd(hwdev, HINIC_PORT_CMD_SET_MAC, &mac_info, in hinic_set_mac()
44 …dev_err(&hwdev->func_to_io.hwif->pdev->dev, "Failed to set MAC, err: %d, status: 0x%x, out size: 0… in hinic_set_mac()
52 static void hinic_notify_vf_link_status(struct hinic_hwdev *hwdev, u16 vf_id, in hinic_notify_vf_link_status() argument
55 struct vf_data_storage *vf_infos = hwdev->func_to_io.vf_infos; in hinic_notify_vf_link_status()
62 link.func_id = hinic_glb_pf_vf_offset(hwdev->hwif) + vf_id; in hinic_notify_vf_link_status()
63 err = hinic_mbox_to_vf(hwdev, HINIC_MOD_L2NIC, in hinic_notify_vf_link_status()
68 dev_err(&hwdev->hwif->pdev->dev, in hinic_notify_vf_link_status()
76 void hinic_notify_all_vfs_link_changed(struct hinic_hwdev *hwdev, in hinic_notify_all_vfs_link_changed() argument
79 struct hinic_func_to_io *nic_io = &hwdev->func_to_io; in hinic_notify_all_vfs_link_changed()
[all …]
H A Dhinic_hw_mbox.c186 static bool check_func_id(struct hinic_hwdev *hwdev, u16 src_func_idx, in check_func_id() argument
192 dev_warn(&hwdev->hwif->pdev->dev, in check_func_id()
201 dev_warn(&hwdev->hwif->pdev->dev, in check_func_id()
210 bool hinic_mbox_check_func_id_8B(struct hinic_hwdev *hwdev, u16 func_idx, in hinic_mbox_check_func_id_8B() argument
213 return check_func_id(hwdev, func_idx, buf_in, in_size, in hinic_mbox_check_func_id_8B()
224 int hinic_register_pf_mbox_cb(struct hinic_hwdev *hwdev, in hinic_register_pf_mbox_cb() argument
228 struct hinic_mbox_func_to_func *func_to_func = hwdev->func_to_func; in hinic_register_pf_mbox_cb()
247 int hinic_register_vf_mbox_cb(struct hinic_hwdev *hwdev, in hinic_register_vf_mbox_cb() argument
251 struct hinic_mbox_func_to_func *func_to_func = hwdev->func_to_func; in hinic_register_vf_mbox_cb()
268 void hinic_unregister_pf_mbox_cb(struct hinic_hwdev *hwdev, in hinic_unregister_pf_mbox_cb() argument
[all …]
H A Dhinic_hw_mbox.h29 bool (*check_cmd)(struct hinic_hwdev *hwdev, u16 src_func_idx,
89 struct hinic_hwdev *hwdev; member
126 int (*cmd_msg_handler)(void *hwdev, u16 vf_id,
131 bool hinic_mbox_check_func_id_8B(struct hinic_hwdev *hwdev, u16 func_idx,
134 bool hinic_mbox_check_cmd_valid(struct hinic_hwdev *hwdev,
139 int hinic_register_pf_mbox_cb(struct hinic_hwdev *hwdev,
143 int hinic_register_vf_mbox_cb(struct hinic_hwdev *hwdev,
147 void hinic_unregister_pf_mbox_cb(struct hinic_hwdev *hwdev,
150 void hinic_unregister_vf_mbox_cb(struct hinic_hwdev *hwdev,
153 int hinic_func_to_func_init(struct hinic_hwdev *hwdev);
[all …]
H A Dhinic_main.c114 int i, num_qps = hinic_hwdev_num_qps(nic_dev->hwdev); in gather_nic_stats()
131 int err, i, j, num_txqs = hinic_hwdev_num_qps(nic_dev->hwdev); in create_txqs()
145 struct hinic_sq *sq = hinic_hwdev_get_sq(nic_dev->hwdev, i); in create_txqs()
181 int num_txqs = hinic_hwdev_num_qps(nic_dev->hwdev); in enable_txqs_napi()
190 int num_txqs = hinic_hwdev_num_qps(nic_dev->hwdev); in disable_txqs_napi()
203 int i, num_txqs = hinic_hwdev_num_qps(nic_dev->hwdev); in free_txqs()
228 int err, i, j, num_rxqs = hinic_hwdev_num_qps(nic_dev->hwdev); in create_rxqs()
242 struct hinic_rq *rq = hinic_hwdev_get_rq(nic_dev->hwdev, i); in create_rxqs()
282 int i, num_rxqs = hinic_hwdev_num_qps(nic_dev->hwdev); in free_rxqs()
301 return hinic_set_max_qnum(nic_dev, nic_dev->hwdev->nic_cap.max_qps); in hinic_configure_max_qnum()
[all …]
H A Dhinic_hw_dev.h464 struct hinic_hwdev hwdev; member
610 void hinic_hwdev_cb_register(struct hinic_hwdev *hwdev,
616 void hinic_hwdev_cb_unregister(struct hinic_hwdev *hwdev,
619 int hinic_port_msg_cmd(struct hinic_hwdev *hwdev, enum hinic_port_cmd cmd,
623 int hinic_hilink_msg_cmd(struct hinic_hwdev *hwdev, enum hinic_hilink_cmd cmd,
627 int hinic_hwdev_ifup(struct hinic_hwdev *hwdev, u16 sq_depth, u16 rq_depth);
629 void hinic_hwdev_ifdown(struct hinic_hwdev *hwdev);
633 void hinic_free_hwdev(struct hinic_hwdev *hwdev);
635 int hinic_hwdev_num_qps(struct hinic_hwdev *hwdev);
637 struct hinic_sq *hinic_hwdev_get_sq(struct hinic_hwdev *hwdev, int i);
[all …]
H A Dhinic_devlink.c33 dev_err(&priv->hwdev->hwif->pdev->dev, "Wrong fw_magic read from file, fw_magic: 0x%x\n", in check_image_valid()
39 dev_err(&priv->hwdev->hwif->pdev->dev, "Wrong fw_type_num read from file, fw_type_num: 0x%x\n", in check_image_valid()
51 dev_err(&priv->hwdev->hwif->pdev->dev, "Wrong data size read from file\n"); in check_image_valid()
73 dev_err(&priv->hwdev->hwif->pdev->dev, "Duplicate section type: %u\n", in check_image_integrity()
92 …dev_err(&priv->hwdev->hwif->pdev->dev, "Check file integrity failed, valid: 0x%x or 0x%lx, current… in check_image_integrity()
96 dev_err(&priv->hwdev->hwif->pdev->dev, "Check file integrity failed, valid:0x%x, current: 0x%x\n", in check_image_integrity()
107 if (hinic_get_board_info(priv->hwdev, &board_info)) { in check_image_device_type()
108 dev_err(&priv->hwdev->hwif->pdev->dev, "Get board info failed\n"); in check_image_device_type()
115 …dev_err(&priv->hwdev->hwif->pdev->dev, "The device type of upgrade file doesn't match the device t… in check_image_device_type()
116 dev_err(&priv->hwdev->hwif->pdev->dev, "The image device type: 0x%x, firmware device type: 0x%x\n", in check_image_device_type()
[all …]
/linux/drivers/gpu/drm/arm/
H A Dmalidp_hw.c270 static int malidp500_query_hw(struct malidp_hw_device *hwdev) in malidp500_query_hw() argument
272 u32 conf = malidp_hw_read(hwdev, MALIDP500_CONFIG_ID); in malidp500_query_hw()
276 hwdev->min_line_size = 2; in malidp500_query_hw()
277 hwdev->max_line_size = SZ_2K * ln_size_mult; in malidp500_query_hw()
278 hwdev->rotation_memory[0] = SZ_1K * 64 * ln_size_mult; in malidp500_query_hw()
279 hwdev->rotation_memory[1] = 0; /* no second rotation memory bank */ in malidp500_query_hw()
284 static void malidp500_enter_config_mode(struct malidp_hw_device *hwdev) in malidp500_enter_config_mode() argument
288 malidp_hw_setbits(hwdev, MALIDP500_DC_CONFIG_REQ, MALIDP500_DC_CONTROL); in malidp500_enter_config_mode()
290 status = malidp_hw_read(hwdev, hwdev->hw->map.dc_base + MALIDP_REG_STATUS); in malidp500_enter_config_mode()
303 static void malidp500_leave_config_mode(struct malidp_hw_device *hwdev) in malidp500_leave_config_mode() argument
[all …]
H A Dmalidp_hw.h147 int (*query_hw)(struct malidp_hw_device *hwdev);
152 void (*enter_config_mode)(struct malidp_hw_device *hwdev);
157 void (*leave_config_mode)(struct malidp_hw_device *hwdev);
162 bool (*in_config_mode)(struct malidp_hw_device *hwdev);
171 void (*set_config_valid)(struct malidp_hw_device *hwdev, u8 value);
177 void (*modeset)(struct malidp_hw_device *hwdev, struct videomode *m);
183 int (*rotmem_required)(struct malidp_hw_device *hwdev, u16 w, u16 h,
186 int (*se_set_scaling_coeffs)(struct malidp_hw_device *hwdev,
190 long (*se_calc_mclk)(struct malidp_hw_device *hwdev,
203 int (*enable_memwrite)(struct malidp_hw_device *hwdev, dma_addr_t *addrs,
[all …]
H A Dmalidp_crtc.c29 struct malidp_hw_device *hwdev = malidp->dev; in malidp_crtc_mode_valid() local
38 rate = clk_round_rate(hwdev->pxlclk, req_rate); in malidp_crtc_mode_valid()
53 struct malidp_hw_device *hwdev = malidp->dev; in malidp_crtc_atomic_enable() local
63 clk_prepare_enable(hwdev->pxlclk); in malidp_crtc_atomic_enable()
66 clk_set_rate(hwdev->pxlclk, crtc->state->adjusted_mode.crtc_clock * 1000); in malidp_crtc_atomic_enable()
68 hwdev->hw->modeset(hwdev, &vm); in malidp_crtc_atomic_enable()
69 hwdev->hw->leave_config_mode(hwdev); in malidp_crtc_atomic_enable()
79 struct malidp_hw_device *hwdev = malidp->dev; in malidp_crtc_atomic_disable() local
85 hwdev->hw->enter_config_mode(hwdev); in malidp_crtc_atomic_disable()
87 clk_disable_unprepare(hwdev->pxlclk); in malidp_crtc_atomic_disable()
[all …]
H A Dmalidp_planes.c510 ms->format = malidp_hw_get_format_id(&mp->hwdev->hw->map, in malidp_de_plane_check()
518 u8 alignment = malidp_hw_get_pitch_align(mp->hwdev, rotated); in malidp_de_plane_check()
539 if ((new_plane_state->crtc_w > mp->hwdev->max_line_size) || in malidp_de_plane_check()
540 (new_plane_state->crtc_h > mp->hwdev->max_line_size) || in malidp_de_plane_check()
541 (new_plane_state->crtc_w < mp->hwdev->min_line_size) || in malidp_de_plane_check()
542 (new_plane_state->crtc_h < mp->hwdev->min_line_size)) in malidp_de_plane_check()
551 !(mp->hwdev->hw->features & MALIDP_DEVICE_LV_HAS_3_STRIDES) && in malidp_de_plane_check()
584 val = mp->hwdev->hw->rotmem_required(mp->hwdev, new_plane_state->crtc_w, in malidp_de_plane_check()
615 num_strides = (mp->hwdev->hw->features & in malidp_de_set_plane_pitches()
626 malidp_hw_write(mp->hwdev, pitches[i] * block_h, in malidp_de_set_plane_pitches()
[all …]
/linux/drivers/hwmon/
H A Dhwmon.c133 struct hwmon_device *hwdev = to_hwmon_device(dev); in hwmon_dev_release() local
135 if (hwdev->group.attrs) in hwmon_dev_release()
136 hwmon_free_attrs(hwdev->group.attrs); in hwmon_dev_release()
137 kfree(hwdev->groups); in hwmon_dev_release()
138 kfree(hwdev->label); in hwmon_dev_release()
139 kfree(hwdev); in hwmon_dev_release()
166 struct hwmon_device *hwdev = to_hwmon_device(tdata->dev); in hwmon_thermal_get_temp() local
170 guard(mutex)(&hwdev->lock); in hwmon_thermal_get_temp()
172 ret = hwdev->chip->ops->read(tdata->dev, hwmon_temp, hwmon_temp_input, in hwmon_thermal_get_temp()
185 struct hwmon_device *hwdev = to_hwmon_device(tdata->dev); in hwmon_thermal_set_trips() local
[all …]

123