Home
last modified time | relevance | path

Searched refs:hw_dev (Results 1 – 25 of 73) sorted by relevance

123

/OK3568_Linux_fs/kernel/drivers/media/platform/rockchip/isp/
H A Dhw.c135 if (dev->hw_dev->is_unite) { in default_sw_reg_flag()
145 struct rkisp_hw_dev *hw_dev = dev_get_drvdata(dev); in mipi_irq_hdl() local
146 struct rkisp_device *isp = hw_dev->isp[hw_dev->mipi_dev_id]; in mipi_irq_hdl()
147 void __iomem *base = !hw_dev->is_unite ? in mipi_irq_hdl()
148 hw_dev->base_addr : hw_dev->base_next_addr; in mipi_irq_hdl()
152 if (hw_dev->is_thunderboot) in mipi_irq_hdl()
158 if (hw_dev->isp_ver == ISP_V13 || hw_dev->isp_ver == ISP_V12) { in mipi_irq_hdl()
167 } else if (hw_dev->isp_ver >= ISP_V20) { in mipi_irq_hdl()
175 if (hw_dev->isp_ver == ISP_V20) in mipi_irq_hdl()
177 else if (hw_dev->isp_ver == ISP_V21) in mipi_irq_hdl()
[all …]
H A Ddev.c178 struct rkisp_hw_dev *hw_dev = dev->hw_dev; in __isp_pipeline_s_isp_clk() local
184 hw_dev->isp_size[dev->dev_id].is_on = true; in __isp_pipeline_s_isp_clk()
185 if (hw_dev->is_runing) { in __isp_pipeline_s_isp_clk()
187 hw_dev->is_dvfs = true; in __isp_pipeline_s_isp_clk()
192 (dev->is_pre_on && hw_dev->dev_num > 1)) { in __isp_pipeline_s_isp_clk()
195 for (i = 0; i < hw_dev->dev_num; i++) { in __isp_pipeline_s_isp_clk()
196 fps = hw_dev->isp_size[i].fps; in __isp_pipeline_s_isp_clk()
199 data_rate += (fps * hw_dev->isp_size[i].size); in __isp_pipeline_s_isp_clk()
203 fps = hw_dev->isp_size[i].fps; in __isp_pipeline_s_isp_clk()
206 data_rate = fps * hw_dev->isp_size[i].size; in __isp_pipeline_s_isp_clk()
[all …]
H A Dcommon.c19 if (dev->hw_dev->is_single || is_direct) { in rkisp_write()
23 writel(val, dev->hw_dev->base_addr + reg); in rkisp_write()
37 if (dev->hw_dev->is_single || is_direct) { in rkisp_next_write()
39 writel(val, dev->hw_dev->base_next_addr + reg); in rkisp_next_write()
47 if (dev->hw_dev->is_single || is_direct) in rkisp_read()
48 val = readl(dev->hw_dev->base_addr + reg); in rkisp_read()
58 if (dev->hw_dev->is_single || is_direct) in rkisp_next_read()
59 val = readl(dev->hw_dev->base_next_addr + reg); in rkisp_next_read()
148 struct rkisp_hw_dev *hw = dev->hw_dev; in rkisp_update_regs()
191 const struct vb2_mem_ops *g_ops = dev->hw_dev->mem_ops; in rkisp_alloc_buffer()
[all …]
H A Dcapture_v30.c278 if (!stream->ispdev->hw_dev->is_single) in bp_is_stream_stopped()
290 if (!stream->ispdev->hw_dev->is_single) { in fbc_is_stream_stopped()
335 !dev->hw_dev->is_unite) { in rkisp_stream_config_dcrop()
475 bool is_unite = dev->hw_dev->is_unite; in mp_config_mi()
561 bool is_unite = dev->hw_dev->is_unite; in sp_config_mi()
628 bool is_unite = stream->ispdev->hw_dev->is_unite; in fbc_config_mi()
653 bool is_unite = dev->hw_dev->is_unite; in bp_config_mi()
701 false, stream->ispdev->hw_dev->is_unite); in mp_enable_mi()
716 stream->ispdev->hw_dev->is_unite); in sp_enable_mi()
723 bool is_unite = stream->ispdev->hw_dev->is_unite; in fbc_enable_mi()
[all …]
H A Dcsi.c277 bool is_feature_on = dev->hw_dev->is_feature_on; in csi_config()
278 u64 iq_feature = dev->hw_dev->iq_feature; in csi_config()
292 (dev->isp_inp & INP_RAWRD2 || !dev->hw_dev->is_single)) in csi_config()
300 if (!dev->hw_dev->is_mi_update) in csi_config()
311 if (dev->hw_dev->is_single) { in csi_config()
316 for (i = 0; i < dev->hw_dev->dev_num; i++) { in csi_config()
317 if (dev->hw_dev->isp[i] && in csi_config()
318 !dev->hw_dev->isp[i]->is_hw_link) in csi_config()
320 rkisp_set_bits(dev->hw_dev->isp[i], in csi_config()
562 bool is_feature_on = dev->hw_dev->is_feature_on; in rkisp_csi_config_patch()
[all …]
H A Drkisp.c216 if (dev->hw_dev->is_unite) { in rkisp_align_sensor_resolution()
432 dev->hw_dev->isp_size[i].fps = in rkisp_update_sensor_info()
502 struct rkisp_hw_dev *hw = dev->hw_dev; in rkisp_dvfs()
541 struct rkisp_hw_dev *hw = dev->hw_dev; in rkisp_multi_overflow_hdl()
596 struct rkisp_hw_dev *hw = dev->hw_dev; in rkisp_trigger_read_back()
853 struct rkisp_hw_dev *hw = dev->hw_dev; in rkisp_rdbk_trigger_handle()
986 if (dev->hw_dev->is_multi_overflow && in rkisp_check_idle()
996 if (dev->irq_ends == dev->irq_ends_mask && dev->hw_dev->monitor.is_en) { in rkisp_check_idle()
997 dev->hw_dev->monitor.retry = 0; in rkisp_check_idle()
998 dev->hw_dev->monitor.state |= ISP_FRAME_END; in rkisp_check_idle()
[all …]
H A Dregs.c46 if (async && dev->hw_dev->is_single) in rkisp_disable_dcrop()
49 mask, val, false, dev->hw_dev->is_unite); in rkisp_disable_dcrop()
57 bool is_unite = dev->hw_dev->is_unite; in rkisp_config_dcrop()
76 if (async && dev->hw_dev->is_single) in rkisp_config_dcrop()
150 if (async && dev->hw_dev->is_single) in update_rsz_shadow()
153 val, false, dev->hw_dev->is_unite); in update_rsz_shadow()
223 if (dev->hw_dev->is_unite) { in set_scale()
354 if (async && dev->hw_dev->is_single) in set_bilinear_scale()
365 bool is_unite = dev->hw_dev->is_unite; in rkisp_config_rsz()
391 bool is_unite = stream->ispdev->hw_dev->is_unite; in rkisp_disable_rsz()
H A Disp_rockit.c107 g_ops = ispdev->hw_dev->mem_ops; in rkisp_rockit_buf_queue()
138 mem = g_ops->attach_dmabuf(stream->ispdev->hw_dev->dev, in rkisp_rockit_buf_queue()
155 if (ispdev->hw_dev->is_dma_sg_ops) { in rkisp_rockit_buf_queue()
206 if (stream->ispdev->hw_dev->is_single && in rkisp_rockit_buf_queue()
440 const struct vb2_mem_ops *g_ops = stream->ispdev->hw_dev->mem_ops; in rkisp_rockit_buf_free()
473 rockit_cfg->isp_num = dev->hw_dev->dev_num; in rkisp_rockit_dev_init()
475 if (dev->hw_dev->isp[i]) { in rkisp_rockit_dev_init()
477 dev->hw_dev->isp[i]->name; in rkisp_rockit_dev_init()
479 dev->hw_dev->isp[i]; in rkisp_rockit_dev_init()
H A Dcapture_v32.c451 if (!stream->ispdev->hw_dev->is_single) { in bp_is_stream_stopped()
468 if (!dev->hw_dev->is_single) { in bpds_is_stream_stopped()
485 if (!dev->hw_dev->is_single) { in mpds_is_stream_stopped()
1032 dummy_buf = &dev->hw_dev->dummy_buf; in update_mi()
1059 if (dev->hw_dev->is_single && in update_mi()
1088 if (!dev->hw_dev->is_single) { in update_mi()
1361 if (!mis && !stream->ispdev->hw_dev->is_single && in mi_frame_start()
1490 bool is_wait = dev->hw_dev->is_shutdown ? false : true; in rkisp_stream_stop()
1494 if (stream->ops->disable_mi && dev->hw_dev->is_single) in rkisp_stream_stop()
1497 spin_lock_irqsave(&dev->hw_dev->rdbk_lock, lock_flags); in rkisp_stream_stop()
[all …]
H A Dcapture_v21.c999 if (!buf && dev->hw_dev->dummy_buf.mem_priv) { in update_dmatx_v2()
1000 buf = &dev->hw_dev->dummy_buf; in update_dmatx_v2()
1016 struct rkisp_dummy_buffer *dummy_buf = &stream->ispdev->hw_dev->dummy_buf; in update_mi()
1030 if (!dev->hw_dev->is_single) { in update_mi()
1330 bool is_wait = dev->hw_dev->is_shutdown ? false : true; in rkisp_stream_stop()
1339 if ((!dev->hw_dev->is_single && stream->id != RKISP_STREAM_MP && in rkisp_stream_stop()
1340 stream->id != RKISP_STREAM_SP) || dev->hw_dev->is_single) in rkisp_stream_stop()
1345 if (IS_HDR_RDBK(dev->rd_mode) && !dev->hw_dev->is_single) { in rkisp_stream_stop()
1346 spin_lock_irqsave(&dev->hw_dev->rdbk_lock, lock_flags); in rkisp_stream_stop()
1347 if (dev->hw_dev->cur_dev_id != dev->dev_id || dev->hw_dev->is_idle) { in rkisp_stream_stop()
[all …]
H A Dbridge_v30.c62 if (!dev->ispdev->hw_dev->is_mi_update) in bridge_start()
75 if (dev->ispdev->hw_dev->is_single) in bridge_stop()
93 struct rkisp_hw_dev *hw = dev->hw_dev; in bridge_update_mi()
114 struct rkisp_hw_dev *hw = ispdev->hw_dev; in bridge_frame_end()
204 if (dev->ispdev->hw_dev->is_single) in is_stopped_mp()
H A Dbridge_v20.c45 struct rkisp_hw_dev *hw = dev->ispdev->hw_dev; in dump_dbg_reg()
422 struct rkisp_hw_dev *hw = dev->hw_dev; in rkisp_bridge_try_sendtohal()
483 struct rkisp_hw_dev *hw = dev->hw_dev; in rkisp_bridge_save_fbcgain()
580 if (!dev->ispdev->hw_dev->is_mi_update) { in bridge_start()
612 if (!dev->ispdev->hw_dev->is_shutdown) { in bridge_stop()
639 struct rkisp_hw_dev *hw = dev->hw_dev; in bridge_update_mi()
669 struct rkisp_hw_dev *hw = ispdev->hw_dev; in bridge_frame_end()
812 struct rkisp_hw_dev *hw = dev->ispdev->hw_dev; in config_mpfbc()
820 if (dev->ispdev->hw_dev->nxt_buf) in config_mpfbc()
837 if (dev->ispdev->hw_dev->is_single) in disable_mpfbc()
[all …]
/OK3568_Linux_fs/kernel/drivers/media/platform/rockchip/ispp/
H A Dhw.c84 if (dev->hw_dev->ispp_ver == ISPP_V10) { in default_sw_reg_flag()
105 } else if (dev->hw_dev->ispp_ver == ISPP_V20) { in default_sw_reg_flag()
182 struct rkispp_hw_dev *hw_dev = dev_get_drvdata(dev); in irq_hdl() local
183 struct rkispp_device *ispp = hw_dev->ispp[hw_dev->cur_dev_id]; in irq_hdl()
184 void __iomem *base = hw_dev->base_addr; in irq_hdl()
187 spin_lock(&hw_dev->irq_lock); in irq_hdl()
190 spin_unlock(&hw_dev->irq_lock); in irq_hdl()
194 rkispp_fec_irq(hw_dev); in irq_hdl()
299 struct rkispp_hw_dev *hw_dev; in rkispp_hw_probe() local
308 hw_dev = devm_kzalloc(dev, sizeof(*hw_dev), GFP_KERNEL); in rkispp_hw_probe()
[all …]
H A Dcommon.c18 if (dev->hw_dev->is_single) in rkispp_write()
19 writel(val, dev->hw_dev->base_addr + reg); in rkispp_write()
26 if (dev->hw_dev->is_single) in rkispp_read()
27 val = readl(dev->hw_dev->base_addr + reg); in rkispp_read()
49 void __iomem *base = dev->hw_dev->base_addr; in rkispp_update_regs()
69 const struct vb2_mem_ops *g_ops = dev->hw_dev->mem_ops; in rkispp_allow_buffer()
79 if (dev->hw_dev->is_dma_contig) in rkispp_allow_buffer()
82 mem_priv = g_ops->alloc(dev->hw_dev->dev, attrs, buf->size, in rkispp_allow_buffer()
90 if (dev->hw_dev->is_dma_sg_ops) { in rkispp_allow_buffer()
123 const struct vb2_mem_ops *g_ops = dev->hw_dev->mem_ops; in rkispp_free_buffer()
[all …]
H A Dstream_v20.c46 dummy_buf = &dev->hw_dev->dummy_buf; in update_mi()
64 struct rkispp_hw_dev *hw = dev->hw_dev; in config_fec()
138 rkispp_set_clk_rate(dev->hw_dev->clks[0], dev->hw_dev->core_clk_max); in config_fec()
199 void __iomem *base = dev->hw_dev->base_addr; in fec_work_event()
286 if (!dev->hw_dev->is_single) in fec_work_event()
310 if (!dev->hw_dev->is_shutdown) in fec_work_event()
326 if (dev->hw_dev->is_shutdown) in rkispp_module_work_event()
352 if (!dev->hw_dev->is_idle) in rkispp_module_work_event()
353 dev->hw_dev->is_idle = true; in rkispp_module_work_event()
390 mutex_lock(&dev->hw_dev->dev_lock); in start_isp()
[all …]
H A Ddev.c105 if (ispp_dev->hw_dev->max_in.w && ispp_dev->hw_dev->max_in.h) in get_remote_node_dev()
107 &ispp_dev->hw_dev->max_in); in get_remote_node_dev()
356 mutex_lock(&ispp_dev->hw_dev->dev_lock); in rkispp_runtime_suspend()
357 ret = pm_runtime_put_sync(ispp_dev->hw_dev->dev); in rkispp_runtime_suspend()
358 mutex_unlock(&ispp_dev->hw_dev->dev_lock); in rkispp_runtime_suspend()
372 mutex_lock(&ispp_dev->hw_dev->dev_lock); in rkispp_runtime_resume()
373 ret = pm_runtime_get_sync(ispp_dev->hw_dev->dev); in rkispp_runtime_resume()
374 mutex_unlock(&ispp_dev->hw_dev->dev_lock); in rkispp_runtime_resume()
H A Dstream.c320 rkispp_set_clk_rate(dev->hw_dev->clks[0], dev->hw_dev->core_clk_max); in irq_work()
322 dev->hw_dev->is_first = false; in irq_work()
446 if (dev->hw_dev->pool[i].dbufs == dbufs) in get_pool_buf()
447 return &dev->hw_dev->pool[i]; in get_pool_buf()
685 val = dev->hw_dev->dummy_buf.dma_addr; in is_stopped_mb()
694 val = readl(dev->hw_dev->base_addr + RKISPP_CTRL_SYS_STATUS); in is_stopped_mb()
775 if (dev->hw_dev->is_single) in is_stopped_scl()
779 val = readl(dev->hw_dev->base_addr + RKISPP_CTRL_SYS_STATUS); in is_stopped_scl()
913 if (stream->isppdev->hw_dev->is_dma_sg_ops) { in rkispp_buf_queue()
973 (dev->dev_id != dev->hw_dev->cur_dev_id || dev->hw_dev->is_idle)) in rkispp_stream_stop()
[all …]
H A Dstream_v10.c50 void __iomem *base = dev->hw_dev->base_addr; in rkispp_frame_done_early()
120 dummy_buf = &dev->hw_dev->dummy_buf; in update_mi()
260 struct rkispp_hw_dev *hw = dev->hw_dev; in config_tnr()
467 struct rkispp_hw_dev *hw = dev->hw_dev; in config_nr_shp()
737 void __iomem *base = dev->hw_dev->base_addr; in nr_work_event()
785 if (vdev->is_done_early && !dev->hw_dev->is_first) in nr_work_event()
933 if (!dev->hw_dev->is_single) { in nr_work_event()
1018 if (!is_quick && !dev->hw_dev->is_shutdown) { in nr_work_event()
1048 is_start && !dev->hw_dev->is_first && in nr_work_event()
1064 void __iomem *base = dev->hw_dev->base_addr; in tnr_work_event()
[all …]
H A Dstats.c31 dummy_buf = &stats_vdev->dev->hw_dev->dummy_buf; in update_addr()
41 void __iomem *base = stats_vdev->dev->hw_dev->base_addr; in rkispp_stats_frame_end()
243 if (stats_dev->dev->hw_dev->is_dma_sg_ops) { in rkispp_stats_vb2_buf_queue()
319 q->mem_ops = stats_vdev->dev->hw_dev->mem_ops; in rkispp_stats_init_vb2_queue()
323 q->dev = stats_vdev->dev->hw_dev->dev; in rkispp_stats_init_vb2_queue()
324 if (stats_vdev->dev->hw_dev->is_dma_contig) in rkispp_stats_init_vb2_queue()
/OK3568_Linux_fs/kernel/sound/isa/wavefront/
H A Dwavefront.c222 int hw_dev, in snd_wavefront_new_synth() argument
235 if (snd_hwdep_new(card, "WaveFront", hw_dev, &wavefront_synth) < 0) in snd_wavefront_new_synth()
247 int hw_dev, in snd_wavefront_new_fx() argument
259 if (snd_hwdep_new (card, "YSS225", hw_dev, &fx_processor) < 0) in snd_wavefront_new_fx()
358 int hw_dev = 0, midi_dev = 0, err; in snd_wavefront_probe() local
390 err = snd_opl3_hwdep_new(opl3, hw_dev, 1, NULL); in snd_wavefront_probe()
393 hw_dev++; in snd_wavefront_probe()
415 wavefront_synth = snd_wavefront_new_synth(card, hw_dev, acard); in snd_wavefront_probe()
423 hw_dev++; in snd_wavefront_probe()
482 hw_dev, in snd_wavefront_probe()
[all …]
/OK3568_Linux_fs/kernel/drivers/media/platform/rockchip/cif/
H A Dcif-rockit.c97 g_ops = cif_dev->hw_dev->mem_ops; in rkcif_rockit_buf_queue()
135 mem = g_ops->attach_dmabuf(stream->cifdev->hw_dev->dev, in rkcif_rockit_buf_queue()
149 if (stream->cifdev->hw_dev->is_dma_sg_ops) { in rkcif_rockit_buf_queue()
241 const struct vb2_mem_ops *g_ops = stream->cifdev->hw_dev->mem_ops; in rkcif_rockit_buf_free()
342 rockit_rkcif_cfg->cif_num = dev->hw_dev->dev_num; in rkcif_rockit_dev_init()
344 if (dev->hw_dev->cif_dev[i]) { in rkcif_rockit_dev_init()
345 rockit_rkcif_cfg->rkcif_dev_cfg[i].cif_name = dev_name(dev->hw_dev->cif_dev[i]->dev); in rkcif_rockit_dev_init()
347 dev->hw_dev->cif_dev[i]; in rkcif_rockit_dev_init()
H A Dcommon.c14 const struct vb2_mem_ops *g_ops = dev->hw_dev->mem_ops; in rkcif_alloc_buffer()
24 if (dev->hw_dev->is_dma_contig) in rkcif_alloc_buffer()
27 mem_priv = g_ops->alloc(dev->hw_dev->dev, attrs, buf->size, in rkcif_alloc_buffer()
35 if (dev->hw_dev->is_dma_sg_ops) { in rkcif_alloc_buffer()
68 const struct vb2_mem_ops *g_ops = dev->hw_dev->mem_ops; in rkcif_free_buffer()
90 struct rkcif_hw *hw = dev->hw_dev; in rkcif_alloc_page_dummy_buf()
138 dma_unmap_sg(dev->hw_dev->dev, sg->sgl, sg->nents, DMA_BIDIRECTIONAL); in rkcif_free_page_dummy_buf()
149 struct rkcif_hw *hw = dev->hw_dev; in rkcif_alloc_common_dummy_buf()
178 struct rkcif_hw *hw = dev->hw_dev; in rkcif_free_common_dummy_buf()
H A Ddev.c628 void __iomem *base = dev->hw_dev->base_addr; in rkcif_write_register()
629 const struct cif_reg *reg = &dev->hw_dev->cif_regs[index]; in rkcif_write_register()
664 void __iomem *base = dev->hw_dev->base_addr; in rkcif_write_register_or()
665 const struct cif_reg *reg = &dev->hw_dev->cif_regs[index]; in rkcif_write_register_or()
703 void __iomem *base = dev->hw_dev->base_addr; in rkcif_write_register_and()
704 const struct cif_reg *reg = &dev->hw_dev->cif_regs[index]; in rkcif_write_register_and()
742 void __iomem *base = dev->hw_dev->base_addr; in rkcif_read_register()
743 const struct cif_reg *reg = &dev->hw_dev->cif_regs[index]; in rkcif_read_register()
776 struct rkcif_hw *cif_hw = dev->hw_dev; in rkcif_write_grf_reg()
793 struct rkcif_hw *cif_hw = dev->hw_dev; in rkcif_read_grf_reg()
[all …]
/OK3568_Linux_fs/kernel/drivers/net/ethernet/huawei/hinic/
H A Dhinic_sriov.c260 struct hinic_hwdev *hw_dev = hwdev; in hinic_register_vf_msg_handler() local
264 nic_io = &hw_dev->func_to_io; in hinic_register_vf_msg_handler()
266 dev_err(&hw_dev->hwif->pdev->dev, "Register VF id %d exceed limit[0-%d]\n", in hinic_register_vf_msg_handler()
273 err = hinic_init_vf_config(hw_dev, vf_id); in hinic_register_vf_msg_handler()
288 struct hinic_hwdev *hw_dev = hwdev; in hinic_unregister_vf_msg_handler() local
291 nic_io = &hw_dev->func_to_io; in hinic_unregister_vf_msg_handler()
305 struct hinic_hwdev *hw_dev = hwdev; in hinic_change_vf_mtu_msg_handler() local
311 dev_err(&hw_dev->hwif->pdev->dev, "Failed to set VF %u mtu\n", in hinic_change_vf_mtu_msg_handler()
344 struct hinic_hwdev *hw_dev = hwdev; in hinic_set_vf_mac_msg_handler() local
349 nic_io = &hw_dev->func_to_io; in hinic_set_vf_mac_msg_handler()
[all …]
/OK3568_Linux_fs/kernel/drivers/staging/comedi/
H A Ddrivers.c50 int comedi_set_hw_dev(struct comedi_device *dev, struct device *hw_dev) in comedi_set_hw_dev() argument
52 if (hw_dev == dev->hw_dev) in comedi_set_hw_dev()
54 if (dev->hw_dev) in comedi_set_hw_dev()
56 dev->hw_dev = get_device(hw_dev); in comedi_set_hw_dev()
63 put_device(dev->hw_dev); in comedi_clear_hw_dev()
64 dev->hw_dev = NULL; in comedi_clear_hw_dev()

123