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)
commita5a627c676590aaf381f38279ffdfacc963f18f4
treebb7509698434e652eaa78a2ab0190e10b71c853a
parent53dd5c709b335545eec76e3a401ad82764d42b6a
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: 9fcb6be3b6c9 ("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