Skip to content

Commit

Permalink
fix cpp clk timeout
Browse files Browse the repository at this point in the history
Change-Id: I4686adc39ea1b5c1c8fe5be691ca40f8c6e19280
  • Loading branch information
lizhirong authored and kevin-zhm committed Dec 7, 2024
1 parent d6a606d commit ee8d944
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions drivers/media/platform/spacemit/camera/cam_cpp/k1x_cpp.c
Original file line number Diff line number Diff line change
Expand Up @@ -888,12 +888,12 @@ static int cpp_update_clock_rate(struct cpp_device *cpp_dev,
cam_err("fnc clk round rate failed: %ld", clk_val);
return -EINVAL;
}

ret = clk_set_rate(cpp_dev->fnc_clk, clk_val);
if (ret < 0) {
cam_err("fnc clk set rate failed: %d", ret);
return ret;
}

}

if (bus_rate > 0) {
Expand All @@ -902,7 +902,6 @@ static int cpp_update_clock_rate(struct cpp_device *cpp_dev,
cam_err("bus clk round rate failed: %ld", clk_val);
return -EINVAL;
}

ret = clk_set_rate(cpp_dev->bus_clk, clk_val);
if (ret < 0) {
cam_err("bus clk set rate failed: %d", ret);
Expand Down Expand Up @@ -988,14 +987,15 @@ static int cpp_init_hardware(struct cpp_device *cpp_dev)
return ret;
}

ret = cpp_update_clock_rate(cpp_dev, CPP_FNC_DEFAULT_FREQ,
ISP_BUS_DEFAULT_FREQ);

ret = cpp_enable_clocks(cpp_dev);
if (ret) {
pm_runtime_put_sync(&cpp_dev->pdev->dev);
return ret;
}

ret = cpp_enable_clocks(cpp_dev);
ret = cpp_update_clock_rate(cpp_dev, CPP_FNC_DEFAULT_FREQ,
ISP_BUS_DEFAULT_FREQ);
if (ret) {
pm_runtime_put_sync(&cpp_dev->pdev->dev);
return ret;
Expand Down

0 comments on commit ee8d944

Please sign in to comment.