lkml.org 
[lkml]   [2021]   [Mar]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.10 565/663] media: marvell-ccic: power up the device on mclk enable
    Date
    From: Lubomir Rintel <lkundrak@v3.sk>

    commit 655ae29da72a693cf294bba3c3322e662ff75bd3 upstream.

    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: Lubomir Rintel <lkundrak@v3.sk>
    Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    ---
    drivers/media/platform/marvell-ccic/mcam-core.c | 2 ++
    1 file changed, 2 insertions(+)

    --- 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 *

    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,

    \
     
     \ /
      Last update: 2021-03-02 02:10    [W:5.201 / U:0.032 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site