Lines Matching full:ece

4  * Compression Engine (ECE) present on Nuvoton NPCM SoCs.
128 struct npcm_ece ece; member
213 struct regmap *ece = video->ece.regmap; in npcm_video_ece_get_ed_size() local
217 ret = regmap_read_poll_timeout(ece, ECE_DDA_STS, val, in npcm_video_ece_get_ed_size()
227 regmap_read(ece, ECE_HEX_CTRL, &val); in npcm_video_ece_get_ed_size()
240 struct regmap *ece = video->ece.regmap; in npcm_video_ece_enc_rect() local
245 regmap_update_bits(ece, ECE_DDA_CTRL, ECE_DDA_CTRL_ECEEN, 0); in npcm_video_ece_enc_rect()
246 regmap_update_bits(ece, ECE_DDA_CTRL, ECE_DDA_CTRL_ECEEN, ECE_DDA_CTRL_ECEEN); in npcm_video_ece_enc_rect()
247 regmap_write(ece, ECE_DDA_STS, ECE_DDA_STS_CDREADY | ECE_DDA_STS_ACDRDY); in npcm_video_ece_enc_rect()
248 regmap_write(ece, ECE_RECT_XY, rect_offset); in npcm_video_ece_enc_rect()
267 regmap_write(ece, ECE_RECT_DIMEN, temp); in npcm_video_ece_enc_rect()
272 struct regmap *ece = video->ece.regmap; in npcm_video_ece_read_rect_offset() local
275 regmap_read(ece, ECE_HEX_RECT_OFFSET, &offset); in npcm_video_ece_read_rect_offset()
285 struct regmap *ece = video->ece.regmap; in npcm_video_ece_set_lp() local
308 regmap_write(ece, ECE_RESOL, lp); in npcm_video_ece_set_lp()
314 struct regmap *ece = video->ece.regmap; in npcm_video_ece_set_fb_addr() local
316 regmap_write(ece, ECE_FBR_BA, buffer); in npcm_video_ece_set_fb_addr()
322 struct regmap *ece = video->ece.regmap; in npcm_video_ece_set_enc_dba() local
324 regmap_write(ece, ECE_ED_BA, addr); in npcm_video_ece_set_enc_dba()
329 struct regmap *ece = video->ece.regmap; in npcm_video_ece_clear_rect_offset() local
331 regmap_write(ece, ECE_HEX_RECT_OFFSET, 0); in npcm_video_ece_clear_rect_offset()
336 struct regmap *ece = video->ece.regmap; in npcm_video_ece_ctrl_reset() local
338 regmap_update_bits(ece, ECE_DDA_CTRL, ECE_DDA_CTRL_ECEEN, 0); in npcm_video_ece_ctrl_reset()
339 regmap_update_bits(ece, ECE_HEX_CTRL, ECE_HEX_CTRL_ENCDIS, ECE_HEX_CTRL_ENCDIS); in npcm_video_ece_ctrl_reset()
340 regmap_update_bits(ece, ECE_DDA_CTRL, ECE_DDA_CTRL_ECEEN, ECE_DDA_CTRL_ECEEN); in npcm_video_ece_ctrl_reset()
341 regmap_update_bits(ece, ECE_HEX_CTRL, ECE_HEX_CTRL_ENCDIS, 0); in npcm_video_ece_ctrl_reset()
352 reset_control_assert(video->ece.reset); in npcm_video_ece_ip_reset()
354 reset_control_deassert(video->ece.reset); in npcm_video_ece_ip_reset()
360 struct regmap *ece = video->ece.regmap; in npcm_video_ece_stop() local
362 regmap_update_bits(ece, ECE_DDA_CTRL, ECE_DDA_CTRL_ECEEN, 0); in npcm_video_ece_stop()
363 regmap_update_bits(ece, ECE_DDA_CTRL, ECE_DDA_CTRL_INTEN, 0); in npcm_video_ece_stop()
364 regmap_update_bits(ece, ECE_HEX_CTRL, ECE_HEX_CTRL_ENCDIS, ECE_HEX_CTRL_ENCDIS); in npcm_video_ece_stop()
958 if (video->ece.enable && atomic_inc_return(&video->ece.clients) == 1) { in npcm_video_start()
964 dev_dbg(video->dev, "ECE open: client %d\n", in npcm_video_start()
965 atomic_read(&video->ece.clients)); in npcm_video_start()
988 if (video->ece.enable && atomic_dec_return(&video->ece.clients) == 0) { in npcm_video_stop()
990 dev_dbg(video->dev, "ECE close: client %d\n", in npcm_video_stop()
991 atomic_read(&video->ece.clients)); in npcm_video_stop()
1148 if (fmt->fourcc == V4L2_PIX_FMT_HEXTILE && !video->ece.enable) in npcm_video_enum_format()
1164 if (!fmt || (fmt->fourcc == V4L2_PIX_FMT_HEXTILE && !video->ece.enable)) in npcm_video_try_format()
1577 if (video->ece.enable) in npcm_video_setup_video()
1658 ece_node = of_parse_phandle(video->dev->of_node, "nuvoton,ece", 0); in npcm_video_ece_init()
1660 dev_err(dev, "Failed to get ECE phandle in DTS\n"); in npcm_video_ece_init()
1664 video->ece.enable = of_device_is_available(ece_node); in npcm_video_ece_init()
1666 if (video->ece.enable) { in npcm_video_ece_init()
1671 dev_err(dev, "Failed to find ECE device\n"); in npcm_video_ece_init()
1678 dev_err(dev, "Failed to parse ECE reg in DTS\n"); in npcm_video_ece_init()
1682 video->ece.regmap = devm_regmap_init_mmio(dev, regs, in npcm_video_ece_init()
1684 if (IS_ERR(video->ece.regmap)) { in npcm_video_ece_init()
1685 dev_err(dev, "Failed to initialize ECE regmap\n"); in npcm_video_ece_init()
1686 return PTR_ERR(video->ece.regmap); in npcm_video_ece_init()
1689 video->ece.reset = devm_reset_control_get(&ece_pdev->dev, NULL); in npcm_video_ece_init()
1690 if (IS_ERR(video->ece.reset)) { in npcm_video_ece_init()
1691 dev_err(dev, "Failed to get ECE reset control in DTS\n"); in npcm_video_ece_init()
1692 return PTR_ERR(video->ece.reset); in npcm_video_ece_init()
1726 dev_err(dev, "Failed to initialize ECE\n"); in npcm_video_init()
1798 if (video->ece.enable) in npcm_video_remove()