diff options
author | Álvaro Fernández Rojas <noltari@gmail.com> | 2021-08-21 10:54:34 +0200 |
---|---|---|
committer | Álvaro Fernández Rojas <noltari@gmail.com> | 2021-08-21 19:07:07 +0200 |
commit | 8299d1f057439f94c6a4412e2e5c5082b82a30c9 (patch) | |
tree | 1bf678d61f11f7394493be464c7876e496f7faed /target/linux/bcm27xx/patches-5.10/950-0540-bcm2835-unicam-Switch-to-new-clock-api.patch | |
parent | 33b6885975ce376ff075362b7f0890326043111b (diff) | |
download | upstream-8299d1f057439f94c6a4412e2e5c5082b82a30c9.tar.gz upstream-8299d1f057439f94c6a4412e2e5c5082b82a30c9.tar.bz2 upstream-8299d1f057439f94c6a4412e2e5c5082b82a30c9.zip |
bcm27xx: add kernel 5.10 support
Rebased RPi foundation patches on linux 5.10.59, removed applied and reverted
patches, wireless patches and defconfig patches.
bcm2708: boot tested on RPi B+ v1.2
bcm2709: boot tested on RPi 4B v1.1 4G
bcm2711: boot tested on RPi 4B v1.1 4G
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/bcm27xx/patches-5.10/950-0540-bcm2835-unicam-Switch-to-new-clock-api.patch')
-rw-r--r-- | target/linux/bcm27xx/patches-5.10/950-0540-bcm2835-unicam-Switch-to-new-clock-api.patch | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/target/linux/bcm27xx/patches-5.10/950-0540-bcm2835-unicam-Switch-to-new-clock-api.patch b/target/linux/bcm27xx/patches-5.10/950-0540-bcm2835-unicam-Switch-to-new-clock-api.patch new file mode 100644 index 0000000000..1c8eead29b --- /dev/null +++ b/target/linux/bcm27xx/patches-5.10/950-0540-bcm2835-unicam-Switch-to-new-clock-api.patch @@ -0,0 +1,53 @@ +From 20d6f2f3e034889bcadb960e6ee4d6822d9dbcd7 Mon Sep 17 00:00:00 2001 +From: Dom Cobley <popcornmix@gmail.com> +Date: Tue, 13 Apr 2021 16:48:35 +0100 +Subject: [PATCH] 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(-) + +--- a/drivers/media/platform/bcm2835/bcm2835-unicam.c ++++ b/drivers/media/platform/bcm2835/bcm2835-unicam.c +@@ -426,6 +426,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 */ +@@ -1691,8 +1693,8 @@ static int unicam_start_streaming(struct + 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; + } +@@ -1748,8 +1750,7 @@ err_disable_unicam: + 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); +@@ -1779,9 +1780,7 @@ static void unicam_stop_streaming(struct + 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; |