From: Wooki Min Date: Fri, 1 Jun 2018 08:39:50 +0000 (+0900) Subject: [COMMON] fimc-is2: add function of pattern generator disable X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=76b6eaf7ce1d8862a48b3654c6bcfd15b5a68588;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [COMMON] fimc-is2: add function of pattern generator disable Change-Id: I70f34de56de6767db930709b4f81e8323d5c985a Signed-off-by: Wooki Min --- diff --git a/drivers/media/platform/exynos/fimc-is2/include/fimc-is-hw.h b/drivers/media/platform/exynos/fimc-is2/include/fimc-is-hw.h index 834ebf1b7d8a..657f47bedd80 100644 --- a/drivers/media/platform/exynos/fimc-is2/include/fimc-is-hw.h +++ b/drivers/media/platform/exynos/fimc-is2/include/fimc-is-hw.h @@ -268,7 +268,8 @@ int csi_hw_dma_common_reset(void); int csi_hw_s_dma_common_dynamic(u32 __iomem *base_reg, size_t size, u32 dma_ch); int csi_hw_s_dma_common(u32 __iomem *base_reg); #endif -int csi_hw_s_dma_common_pattern(u32 __iomem *base_reg, u32 width, u32 height, u32 fps, u32 clk); +int csi_hw_s_dma_common_pattern_enable(u32 __iomem *base_reg, u32 width, u32 height, u32 fps, u32 clk); +void csi_hw_s_dma_common_pattern_disable(u32 __iomem *base_reg); int csi_hw_s_dma_irq_msk(u32 __iomem *base_reg, bool on); int csi_hw_g_dma_irq_src(u32 __iomem *base_reg, struct csis_irq_src *src, bool clear); diff --git a/drivers/media/platform/exynos/fimc-is2/sensor/csi2/fimc-is-hw-csi-v5_1.c b/drivers/media/platform/exynos/fimc-is2/sensor/csi2/fimc-is-hw-csi-v5_1.c index 3787371e896e..6d8953314f9e 100644 --- a/drivers/media/platform/exynos/fimc-is2/sensor/csi2/fimc-is-hw-csi-v5_1.c +++ b/drivers/media/platform/exynos/fimc-is2/sensor/csi2/fimc-is-hw-csi-v5_1.c @@ -781,7 +781,7 @@ int csi_hw_s_dma_common(u32 __iomem *base_reg) int csi_hw_s_dma_common(u32 __iomem *base_reg) { return 0; } #endif -int csi_hw_s_dma_common_pattern(u32 __iomem *base_reg, +int csi_hw_s_dma_common_pattern_enable(u32 __iomem *base_reg, u32 width, u32 height, u32 fps, u32 clk) { u32 val; @@ -845,6 +845,12 @@ int csi_hw_s_dma_common_pattern(u32 __iomem *base_reg, return 0; } +void csi_hw_s_dma_common_pattern_disable(u32 __iomem *base_reg) +{ + fimc_is_hw_set_field(base_reg, &csi_dma_regs[CSIS_DMA_R_TEST_PATTERN_ENABLE], + &csi_dma_fields[CSIS_DMA_F_TESTPATTERN], 0); +} + int csi_hw_enable(u32 __iomem *base_reg) { /* update shadow */ diff --git a/drivers/media/platform/exynos/fimc-is2/sensor/csi2/fimc-is-hw-csi-v5_2.c b/drivers/media/platform/exynos/fimc-is2/sensor/csi2/fimc-is-hw-csi-v5_2.c index aa08e417e96f..8b517a479f21 100644 --- a/drivers/media/platform/exynos/fimc-is2/sensor/csi2/fimc-is-hw-csi-v5_2.c +++ b/drivers/media/platform/exynos/fimc-is2/sensor/csi2/fimc-is-hw-csi-v5_2.c @@ -661,7 +661,7 @@ int csi_hw_s_dma_common(u32 __iomem *base_reg) return 0; } -int csi_hw_s_dma_common_pattern(u32 __iomem *base_reg, +int csi_hw_s_dma_common_pattern_enable(u32 __iomem *base_reg, u32 width, u32 height, u32 fps, u32 clk) { u32 val; @@ -725,6 +725,12 @@ int csi_hw_s_dma_common_pattern(u32 __iomem *base_reg, return 0; } +void csi_hw_s_dma_common_pattern_disable(u32 __iomem *base_reg) +{ + fimc_is_hw_set_field(base_reg, &csi_dma_regs[CSIS_DMA_R_TEST_PATTERN_ENABLE], + &csi_dma_fields[CSIS_DMA_F_TESTPATTERN], 0); +} + int csi_hw_enable(u32 __iomem *base_reg) { /* update shadow */