mirror of
https://github.com/Ysurac/openmptcprouter.git
synced 2025-03-09 15:40:20 +00:00
Add kernel 5.15 for RPI4 support
This commit is contained in:
parent
e961d478cd
commit
df88a19bbd
638 changed files with 239907 additions and 0 deletions
|
@ -0,0 +1,58 @@
|
|||
From 3499aef8047bc1dab76ea05cf6ce2367f100ad31 Mon Sep 17 00:00:00 2001
|
||||
From: Dom Cobley <popcornmix@gmail.com>
|
||||
Date: Tue, 13 Apr 2021 16:48:35 +0100
|
||||
Subject: [PATCH 396/634] bcm2835-unicam: Switch to new clock api
|
||||
|
||||
Signed-off-by: Dom Cobley <popcornmix@gmail.com>
|
||||
---
|
||||
drivers/media/platform/bcm2835/bcm2835-unicam.c | 13 ++++++-------
|
||||
1 file changed, 6 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/drivers/media/platform/bcm2835/bcm2835-unicam.c b/drivers/media/platform/bcm2835/bcm2835-unicam.c
|
||||
index db99d1562904..a603891986b9 100644
|
||||
--- a/drivers/media/platform/bcm2835/bcm2835-unicam.c
|
||||
+++ b/drivers/media/platform/bcm2835/bcm2835-unicam.c
|
||||
@@ -429,6 +429,8 @@ struct unicam_device {
|
||||
struct clk *clock;
|
||||
/* vpu clock handle */
|
||||
struct clk *vpu_clock;
|
||||
+ /* vpu clock request */
|
||||
+ struct clk_request *vpu_req;
|
||||
/* clock status for error handling */
|
||||
bool clocks_enabled;
|
||||
/* V4l2 device */
|
||||
@@ -1694,8 +1696,8 @@ static int unicam_start_streaming(struct vb2_queue *vq, unsigned int count)
|
||||
unicam_dbg(1, dev, "Running with %u data lanes\n",
|
||||
dev->active_data_lanes);
|
||||
|
||||
- ret = clk_set_min_rate(dev->vpu_clock, MIN_VPU_CLOCK_RATE);
|
||||
- if (ret) {
|
||||
+ dev->vpu_req = clk_request_start(dev->vpu_clock, MIN_VPU_CLOCK_RATE);
|
||||
+ if (!dev->vpu_req) {
|
||||
unicam_err(dev, "failed to set up VPU clock\n");
|
||||
goto err_pm_put;
|
||||
}
|
||||
@@ -1751,8 +1753,7 @@ static int unicam_start_streaming(struct vb2_queue *vq, unsigned int count)
|
||||
unicam_disable(dev);
|
||||
clk_disable_unprepare(dev->clock);
|
||||
err_vpu_clock:
|
||||
- if (clk_set_min_rate(dev->vpu_clock, 0))
|
||||
- unicam_err(dev, "failed to reset the VPU clock\n");
|
||||
+ clk_request_done(dev->vpu_req);
|
||||
clk_disable_unprepare(dev->vpu_clock);
|
||||
err_pm_put:
|
||||
unicam_runtime_put(dev);
|
||||
@@ -1782,9 +1783,7 @@ static void unicam_stop_streaming(struct vb2_queue *vq)
|
||||
unicam_disable(dev);
|
||||
|
||||
if (dev->clocks_enabled) {
|
||||
- if (clk_set_min_rate(dev->vpu_clock, 0))
|
||||
- unicam_err(dev, "failed to reset the min VPU clock\n");
|
||||
-
|
||||
+ clk_request_done(dev->vpu_req);
|
||||
clk_disable_unprepare(dev->vpu_clock);
|
||||
clk_disable_unprepare(dev->clock);
|
||||
dev->clocks_enabled = false;
|
||||
--
|
||||
2.33.1
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue