media: tsmux: control the TSP continuity counter by sfr
authorSeungpyo Hong <sp.hong@samsung.com>
Thu, 17 May 2018 05:10:26 +0000 (14:10 +0900)
committerJanghyuck Kim <janghyuck.kim@samsung.com>
Mon, 23 Jul 2018 05:39:12 +0000 (14:39 +0900)
Change-Id: I50f1761d53fa3860c43ed0cf259f75bcf78f8ca6
Signed-off-by: Seungpyo Hong <sp.hong@samsung.com>
drivers/media/platform/exynos/tsmux/tsmux_reg.c

index 0444cd91bef21c07fa274d033c89e0fce3a82e39..398dcaa76fc66d9a264d4cb39bc3ed19b2e29cf6 100644 (file)
@@ -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);