rockchip:iommu:update function rockchip_vcodec_select
authorxxm <xxm@rock-chips.com>
Mon, 21 Jul 2014 10:49:52 +0000 (18:49 +0800)
committerxxm <xxm@rock-chips.com>
Mon, 21 Jul 2014 10:49:52 +0000 (18:49 +0800)
drivers/iommu/rockchip-iommu.c

index 412438c6275aa00dc182bf752ba857d443152de4..6fe2224e8a63e15769c0a4ca4db363cae3e18f7f 100755 (executable)
@@ -162,14 +162,14 @@ static void rockchip_vcodec_select(const char *string)
        if(strstr(string,"hevc"))
        {
                writel_relaxed(readl_relaxed(RK_GRF_VIRT + RK3036_GRF_SOC_CON1) |
-              (BIT_VCODEC_SEL) | (BIT_VCODEC_SEL << 16),
-              RK_GRF_VIRT + RK3036_GRF_SOC_CON1);
+                             (BIT_VCODEC_SEL) | (BIT_VCODEC_SEL << 16),
+                             RK_GRF_VIRT + RK3036_GRF_SOC_CON1);
        }
        else if(strstr(string,"vpu"))
        {
-               writel_relaxed(readl_relaxed(RK_GRF_VIRT + RK3036_GRF_SOC_CON1) |
-             (BIT_VCODEC_SEL << 16),
-              RK_GRF_VIRT + RK3036_GRF_SOC_CON1);
+               writel_relaxed((readl_relaxed(RK_GRF_VIRT + RK3036_GRF_SOC_CON1) &
+                              (~BIT_VCODEC_SEL)) | (BIT_VCODEC_SEL << 16),
+                              RK_GRF_VIRT + RK3036_GRF_SOC_CON1);
        }
 }
 static unsigned long *section_entry(unsigned long *pgtable, unsigned long iova)