]> git.baikalelectronics.ru Git - kernel.git/commit
clk: imx: correct pfdv2 gate_bit/vld_bit operations
authorAnson Huang <anson.huang@nxp.com>
Fri, 26 Apr 2019 06:53:14 +0000 (06:53 +0000)
committerStephen Boyd <sboyd@kernel.org>
Fri, 3 May 2019 16:31:54 +0000 (09:31 -0700)
commitbca08a36f7a4b53cf698c967b3a9b92a4a1ccff1
treebb7509698434e652eaa78a2ab0190e10b71c853a
parent4f869bceaaad9437ddfcd948f01aa8160beb53cd
clk: imx: correct pfdv2 gate_bit/vld_bit operations

The operations of pfdv2 gate_bit/valid_bit are incorrect,
they are defined as u8 for bit offset, but gate_bit is
actually assigned as mask which could be 32 bit long and
it causes overflow, and vld_bit is assigned as bit offset
based on incorrect gate_bit value, it causes incorrect
pfd clock gate status in clock tree, this patch fixes the
issue by assigning them as correct bit offset.

Fixes: 8ac007ac929e ("clk: imx: add pfdv2 support")
Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/imx/clk-pfdv2.c