]> git.baikalelectronics.ru Git - kernel.git/commit
clk: imx: gate2: Check if clock is enabled against cgr_val
authorAbel Vesa <abel.vesa@nxp.com>
Wed, 28 Oct 2020 12:59:00 +0000 (14:59 +0200)
committerShawn Guo <shawnguo@kernel.org>
Mon, 2 Nov 2020 23:55:35 +0000 (07:55 +0800)
commitfded6dbb5cea3f7c33a7d6b957e69f0af77cae2b
tree916a7cbd63ba24b7bedd0c0ee44c4209fc427e01
parenta0cb1555bb86efaf44adee53454db87b0c898b5e
clk: imx: gate2: Check if clock is enabled against cgr_val

Seems the logic here was wrong all along. For example, if
the cgr_val is 2 (0b10), the clk_gate2_reg_is_enabled would
report the clock as disabled. So check against cgr_val instead.

Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
Reviewed-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
drivers/clk/imx/clk-gate2.c