Commit 655ae29d authored by Lubomir Rintel's avatar Lubomir Rintel Committed by Mauro Carvalho Chehab

media: marvell-ccic: power up the device on mclk enable

Writing to REG_CLKCTRL with the power off causes a hang. Enable the
device first.

Cc: stable@vger.kernel.org # 5.10+
Signed-off-by: default avatarLubomir Rintel <lkundrak@v3.sk>
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 918b866e
...@@ -931,6 +931,7 @@ static int mclk_enable(struct clk_hw *hw) ...@@ -931,6 +931,7 @@ static int mclk_enable(struct clk_hw *hw)
mclk_div = 2; mclk_div = 2;
} }
pm_runtime_get_sync(cam->dev);
clk_enable(cam->clk[0]); clk_enable(cam->clk[0]);
mcam_reg_write(cam, REG_CLKCTRL, (mclk_src << 29) | mclk_div); mcam_reg_write(cam, REG_CLKCTRL, (mclk_src << 29) | mclk_div);
mcam_ctlr_power_up(cam); mcam_ctlr_power_up(cam);
...@@ -944,6 +945,7 @@ static void mclk_disable(struct clk_hw *hw) ...@@ -944,6 +945,7 @@ static void mclk_disable(struct clk_hw *hw)
mcam_ctlr_power_down(cam); mcam_ctlr_power_down(cam);
clk_disable(cam->clk[0]); clk_disable(cam->clk[0]);
pm_runtime_put(cam->dev);
} }
static unsigned long mclk_recalc_rate(struct clk_hw *hw, static unsigned long mclk_recalc_rate(struct clk_hw *hw,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment