浏览代码

Merge branch 'clk-fixes' into clk-next

* clk-fixes:
  clk: versatile: mask VCO bits before writing
Stephen Boyd 9 年之前
父节点
当前提交
58bb621536
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      drivers/clk/versatile/clk-icst.c

+ 3 - 0
drivers/clk/versatile/clk-icst.c

@@ -78,6 +78,9 @@ static int vco_set(struct clk_icst *icst, struct icst_vco vco)
 	ret = regmap_read(icst->map, icst->vcoreg_off, &val);
 	if (ret)
 		return ret;
+
+	/* Mask the 18 bits used by the VCO */
+	val &= ~0x7ffff;
 	val |= vco.v | (vco.r << 9) | (vco.s << 16);
 
 	/* This magic unlocks the VCO so it can be controlled */