From 75779179af64e392bdb711ebe064aa7002c701c6 Mon Sep 17 00:00:00 2001 From: Seungpyo Hong Date: Thu, 17 May 2018 14:10:26 +0900 Subject: [PATCH] media: tsmux: control the TSP continuity counter by sfr Change-Id: I50f1761d53fa3860c43ed0cf259f75bcf78f8ca6 Signed-off-by: Seungpyo Hong --- drivers/media/platform/exynos/tsmux/tsmux_reg.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/media/platform/exynos/tsmux/tsmux_reg.c b/drivers/media/platform/exynos/tsmux/tsmux_reg.c index 0444cd91bef2..398dcaa76fc6 100644 --- a/drivers/media/platform/exynos/tsmux/tsmux_reg.c +++ b/drivers/media/platform/exynos/tsmux/tsmux_reg.c @@ -28,6 +28,8 @@ #define TSMUX_PKT_CTRL_SW_RESET_MASK (0x80000000) #define TSMUX_PKT_CTRL_PSI_EN_SHIFT (28) #define TSMUX_PKT_CTRL_PSI_EN_MASK (0x10000000) +#define TSMUX_PKT_CTRL_TSP_CONTINUITY_CNT_INIT_SHIFT (27) +#define TSMUX_PKT_CTRL_TSP_CONTINUITY_CNT_INIT_MASK (0x8000000) #define TSMUX_PKT_CTRL_RTP_SIZE_SHIFT (11) #define TSMUX_PKT_CTRL_RTP_SIZE_MASK (0x07FFF800) #define TSMUX_PKT_CTRL_RTP_SEQ_OVER_SHIFT (10) @@ -376,6 +378,7 @@ void tsmux_set_pkt_ctrl(struct tsmux_device *tsmux_dev, struct tsmux_pkt_ctrl *pkt_ctrl) { u32 pkt_ctrl_reg; + int32_t tsp_continuity_cnt_init = 1; print_tsmux(TSMUX_SFR, "%s++\n", __func__); @@ -392,6 +395,12 @@ void tsmux_set_pkt_ctrl(struct tsmux_device *tsmux_dev, print_tsmux(TSMUX_SFR, "PKT_CTRL_PSI_EN %d\n", pkt_ctrl->psi_en); print_tsmux(TSMUX_SFR, "pkt_ctrl_reg 0x%x\n", pkt_ctrl_reg); + pkt_ctrl_reg &= ~(TSMUX_PKT_CTRL_TSP_CONTINUITY_CNT_INIT_MASK); + pkt_ctrl_reg |= TSMUX_PKT_CTRL_TSP_CONTINUITY_CNT_INIT_MASK & + (tsp_continuity_cnt_init << TSMUX_PKT_CTRL_TSP_CONTINUITY_CNT_INIT_SHIFT); + print_tsmux(TSMUX_SFR, "PKT_CTRL_TSP_CONTINUITY_CNT_INIT %d\n", tsp_continuity_cnt_init); + print_tsmux(TSMUX_SFR, "pkt_ctrl_reg 0x%x\n", pkt_ctrl_reg); + pkt_ctrl_reg &= ~(TSMUX_PKT_CTRL_RTP_SIZE_MASK); pkt_ctrl_reg |= TSMUX_PKT_CTRL_RTP_SIZE_MASK & (pkt_ctrl->rtp_size << TSMUX_PKT_CTRL_RTP_SIZE_SHIFT); -- 2.20.1