Messages in this thread Patch in this message | | | From | Lubomir Rintel <> | Subject | [PATCH v6 3/7] [media] marvell-ccic/mmp: enable clock before accessing registers | Date | Tue, 28 May 2019 11:07:27 +0200 |
| |
The access to REG_CLKCTRL or REG_CTRL1 without the clock enabled hangs the machine. Enable the clock first.
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Acked-by: Pavel Machek <pavel@ucw.cz> --- drivers/media/platform/marvell-ccic/mmp-driver.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/media/platform/marvell-ccic/mmp-driver.c b/drivers/media/platform/marvell-ccic/mmp-driver.c index a1b1d66e34cd..352e67fc1062 100644 --- a/drivers/media/platform/marvell-ccic/mmp-driver.c +++ b/drivers/media/platform/marvell-ccic/mmp-driver.c @@ -144,6 +144,7 @@ static int mmpcam_power_up(struct mcam_camera *mcam) * Turn on power and clocks to the controller. */ mmpcam_power_up_ctlr(cam); + mcam_clk_enable(mcam); /* * Provide power to the sensor. */ @@ -157,8 +158,6 @@ static int mmpcam_power_up(struct mcam_camera *mcam) gpio_set_value(pdata->sensor_reset_gpio, 1); /* reset is active low */ mdelay(5); - mcam_clk_enable(mcam); - return 0; } -- 2.21.0
| |