Lines Matching refs:csid
170 static void csid_configure_stream(struct csid_device *csid, u8 enable) in csid_configure_stream() argument
172 struct csid_testgen_config *tg = &csid->testgen; in csid_configure_stream()
186 input_format = &csid->fmt[MSM_CSID_PAD_SRC]; in csid_configure_stream()
187 format = csid_get_fmt_entry(csid->formats, csid->nformats, in csid_configure_stream()
196 writel_relaxed(val, csid->base + CAMSS_CSID_TG_VC_CFG); in csid_configure_stream()
201 writel_relaxed(val, csid->base + CAMSS_CSID_TG_DT_n_CGG_0(0)); in csid_configure_stream()
205 writel_relaxed(val, csid->base + CAMSS_CSID_TG_DT_n_CGG_1(0)); in csid_configure_stream()
209 writel_relaxed(val, csid->base + CAMSS_CSID_TG_DT_n_CGG_2(0)); in csid_configure_stream()
211 struct csid_phy_config *phy = &csid->phy; in csid_configure_stream()
213 input_format = &csid->fmt[MSM_CSID_PAD_SINK]; in csid_configure_stream()
214 format = csid_get_fmt_entry(csid->formats, csid->nformats, in csid_configure_stream()
220 writel_relaxed(val, csid->base + CAMSS_CSID_CORE_CTRL_0); in csid_configure_stream()
225 writel_relaxed(val, csid->base + CAMSS_CSID_CORE_CTRL_1); in csid_configure_stream()
231 val = readl_relaxed(csid->base + CAMSS_CSID_CID_LUT_VC_n(vc)); in csid_configure_stream()
234 writel_relaxed(val, csid->base + CAMSS_CSID_CID_LUT_VC_n(vc)); in csid_configure_stream()
240 writel_relaxed(val, csid->base + CAMSS_CSID_CID_n_CFG(cid)); in csid_configure_stream()
244 writel_relaxed(val, csid->base + CAMSS_CSID_TG_CTRL); in csid_configure_stream()
249 writel_relaxed(val, csid->base + CAMSS_CSID_TG_CTRL); in csid_configure_stream()
254 static int csid_configure_testgen_pattern(struct csid_device *csid, s32 val) in csid_configure_testgen_pattern() argument
256 if (val > 0 && val <= csid->testgen.nmodes) in csid_configure_testgen_pattern()
257 csid->testgen.mode = val; in csid_configure_testgen_pattern()
262 static u32 csid_hw_version(struct csid_device *csid) in csid_hw_version() argument
264 u32 hw_version = readl_relaxed(csid->base + CAMSS_CSID_HW_VERSION); in csid_hw_version()
266 dev_dbg(csid->camss->dev, "CSID HW Version = 0x%08x\n", hw_version); in csid_hw_version()
273 struct csid_device *csid = dev; in csid_isr() local
276 value = readl_relaxed(csid->base + CAMSS_CSID_IRQ_STATUS); in csid_isr()
277 writel_relaxed(value, csid->base + CAMSS_CSID_IRQ_CLEAR_CMD); in csid_isr()
280 complete(&csid->reset_complete); in csid_isr()
285 static int csid_reset(struct csid_device *csid) in csid_reset() argument
289 reinit_completion(&csid->reset_complete); in csid_reset()
291 writel_relaxed(0x7fff, csid->base + CAMSS_CSID_RST_CMD); in csid_reset()
293 time = wait_for_completion_timeout(&csid->reset_complete, in csid_reset()
296 dev_err(csid->camss->dev, "CSID reset timeout\n"); in csid_reset()
303 static u32 csid_src_pad_code(struct csid_device *csid, u32 sink_code, in csid_src_pad_code() argument
312 static void csid_subdev_init(struct csid_device *csid) in csid_subdev_init() argument
314 csid->formats = csid_formats; in csid_subdev_init()
315 csid->nformats = ARRAY_SIZE(csid_formats); in csid_subdev_init()
316 csid->testgen.modes = csid_testgen_modes; in csid_subdev_init()
317 csid->testgen.nmodes = CSID_PAYLOAD_MODE_NUM_SUPPORTED_GEN1; in csid_subdev_init()