[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20210127180143.43437-1-lkundrak@v3.sk>
Date: Wed, 27 Jan 2021 19:01:43 +0100
From: Lubomir Rintel <lkundrak@...sk>
To: Mauro Carvalho Chehab <mchehab@...nel.org>
Cc: Sakari Ailus <sakari.ailus@...ux.intel.com>,
linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
Lubomir Rintel <lkundrak@...sk>, stable@...r.kernel.org
Subject: [PATCH] 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@...r.kernel.org # 5.10+
Signed-off-by: Lubomir Rintel <lkundrak@...sk>
---
drivers/media/platform/marvell-ccic/mcam-core.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/media/platform/marvell-ccic/mcam-core.c b/drivers/media/platform/marvell-ccic/mcam-core.c
index c012fd2e1d291..34266fba824f2 100644
--- a/drivers/media/platform/marvell-ccic/mcam-core.c
+++ b/drivers/media/platform/marvell-ccic/mcam-core.c
@@ -931,6 +931,7 @@ static int mclk_enable(struct clk_hw *hw)
mclk_div = 2;
}
+ pm_runtime_get_sync(cam->dev);
clk_enable(cam->clk[0]);
mcam_reg_write(cam, REG_CLKCTRL, (mclk_src << 29) | mclk_div);
mcam_ctlr_power_up(cam);
@@ -944,6 +945,7 @@ static void mclk_disable(struct clk_hw *hw)
mcam_ctlr_power_down(cam);
clk_disable(cam->clk[0]);
+ pm_runtime_put(cam->dev);
}
static unsigned long mclk_recalc_rate(struct clk_hw *hw,
--
2.29.2
Powered by blists - more mailing lists