media: rockchip: rkisp1: carry ip version information

A patch from »rkisp1 support for px30 - including uapi questions for 5.11« in state Mainline for linux-kernel

From: Heiko Stuebner <heiko.stuebner@...> Date: Wed, 6 Jan 2021 23:00:53 +0100

Commit-Message

The IP block evolved from its rk3288/rk3399 base and the vendor designates them with a numerical version. rk3399 for example is designated V10 probably meaning V1.0. There doesn't seem to be an actual version register we could read that information from, so allow the match_data to carry that information for future differentiation. Signed-off-by: Heiko Stuebner <heiko.stuebner@...>

Patch-Comment

drivers/media/platform/rockchip/rkisp1/rkisp1-common.h | 5 +++++ drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-)

Statistics

  • 10 lines added
  • 2 lines removed

Changes

------------ drivers/media/platform/rockchip/rkisp1/rkisp1-common.h ------------
index 44f333bf5d6a..7678eabc9ffc 100644
@@ -59,6 +59,10 @@
RKISP1_CIF_ISP_EXP_END | \
RKISP1_CIF_ISP_HIST_MEASURE_RDY)
+enum rkisp1_isp_ver {
+ RKISP1_V10 = 0,
+};
+
/* enum for the resizer pads */
enum rkisp1_rsz_pad {
RKISP1_RSZ_PAD_SINK,
@@ -355,6 +359,7 @@ struct rkisp1_device {
void __iomem *base_addr;
int irq;
struct device *dev;
+ enum rkisp1_isp_ver isp_ver;
unsigned int clk_size;
struct clk_bulk_data clks[RKISP1_MAX_BUS_CLK];
struct v4l2_device v4l2_dev;
------------- drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c --------------
index 96afc1d1a914..0a01ffbc2cae 100644
@@ -104,6 +104,7 @@
struct rkisp1_match_data {
const char * const *clks;
unsigned int size;
+ enum rkisp1_isp_ver isp_ver;
};
/* ----------------------------------------------------------------------------
@@ -408,15 +409,16 @@ static const char * const rk3399_isp_clks[] = {
"hclk",
};
-static const struct rkisp1_match_data rk3399_isp_clk_data = {
+static const struct rkisp1_match_data rk3399_isp_match_data = {
.clks = rk3399_isp_clks,
.size = ARRAY_SIZE(rk3399_isp_clks),
+ .isp_ver = RKISP1_V10,
};
static const struct of_device_id rkisp1_of_match[] = {
{
.compatible = "rockchip,rk3399-cif-isp",
- .data = &rk3399_isp_clk_data,
+ .data = &rk3399_isp_match_data,
},
{},
};
@@ -532,6 +534,7 @@ static int rkisp1_probe(struct platform_device *pdev)
if (ret)
return ret;
rkisp1->clk_size = clk_data->size;
+ rkisp1->isp_ver = clk_data->isp_ver;
pm_runtime_enable(&pdev->dev);
 
 

Recent Patches

About Us

Sed lacus. Donec lectus. Nullam pretium nibh ut turpis. Nam bibendum. In nulla tortor, elementum vel, tempor at, varius non, purus. Mauris vitae nisl nec metus placerat consectetuer.

Read More...