forked from openwrt/openwrt
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
To allow for scaling and other video processing onboard, include kmod-video-pxp in the image, and backport relevant device tree nodes to expose PXP to the system. Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
- Loading branch information
Showing
7 changed files
with
471 additions
and
0 deletions.
There are no files selected for viewing
58 changes: 58 additions & 0 deletions
58
target/linux/generic/backport-6.1/900-v6.3-media-imx-pxp-detect-pxp-version.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
From a4a69d1386765102640a45002bff6f7db704486d Mon Sep 17 00:00:00 2001 | ||
From: Michael Tretter <m.tretter@pengutronix.de> | ||
Date: Fri, 13 Jan 2023 10:54:08 +0100 | ||
Subject: [PATCH] media: imx-pxp: detect PXP version | ||
|
||
Different versions of the Pixel Pipeline have different blocks and their | ||
routing may be different. Read the PXP_HW_VERSION register to determine | ||
the version of the PXP and print it to the log for debugging purposes. | ||
|
||
Signed-off-by: Michael Tretter <m.tretter@pengutronix.de> | ||
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> | ||
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> | ||
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org> | ||
--- | ||
drivers/media/platform/nxp/imx-pxp.c | 11 +++++++++++ | ||
1 file changed, 11 insertions(+) | ||
|
||
--- a/drivers/media/platform/nxp/imx-pxp.c | ||
+++ b/drivers/media/platform/nxp/imx-pxp.c | ||
@@ -10,6 +10,7 @@ | ||
* Pawel Osciak, <pawel@osciak.com> | ||
* Marek Szyprowski, <m.szyprowski@samsung.com> | ||
*/ | ||
+#include <linux/bitfield.h> | ||
#include <linux/clk.h> | ||
#include <linux/delay.h> | ||
#include <linux/dma-mapping.h> | ||
@@ -52,6 +53,11 @@ MODULE_PARM_DESC(debug, "activates debug | ||
#define MEM2MEM_HFLIP (1 << 0) | ||
#define MEM2MEM_VFLIP (1 << 1) | ||
|
||
+#define PXP_VERSION_MAJOR(version) \ | ||
+ FIELD_GET(BM_PXP_VERSION_MAJOR, version) | ||
+#define PXP_VERSION_MINOR(version) \ | ||
+ FIELD_GET(BM_PXP_VERSION_MINOR, version) | ||
+ | ||
#define dprintk(dev, fmt, arg...) \ | ||
v4l2_dbg(1, debug, &dev->v4l2_dev, "%s: " fmt, __func__, ## arg) | ||
|
||
@@ -1664,6 +1670,7 @@ static int pxp_probe(struct platform_dev | ||
{ | ||
struct pxp_dev *dev; | ||
struct video_device *vfd; | ||
+ u32 hw_version; | ||
int irq; | ||
int ret; | ||
|
||
@@ -1705,6 +1712,10 @@ static int pxp_probe(struct platform_dev | ||
goto err_clk; | ||
} | ||
|
||
+ hw_version = readl(dev->mmio + HW_PXP_VERSION); | ||
+ dev_dbg(&pdev->dev, "PXP Version %u.%u\n", | ||
+ PXP_VERSION_MAJOR(hw_version), PXP_VERSION_MINOR(hw_version)); | ||
+ | ||
ret = v4l2_device_register(&pdev->dev, &dev->v4l2_dev); | ||
if (ret) | ||
goto err_clk; |
97 changes: 97 additions & 0 deletions
97
...neric/backport-6.1/901-v6.3-media-imx-pxp-extract-helper-function-to-setup-datapath.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
From 9fb41a05837583e28a9e8d7d7e4802626dcbc32a Mon Sep 17 00:00:00 2001 | ||
From: Michael Tretter <m.tretter@pengutronix.de> | ||
Date: Fri, 13 Jan 2023 10:54:09 +0100 | ||
Subject: [PATCH] media: imx-pxp: extract helper function to setup data path | ||
|
||
The driver must configure the data path through the Pixel Pipeline. | ||
|
||
Currently, the driver is using a fixed setup, but once there are | ||
different pipeline configurations, it is helpful to have a dedicated | ||
function for determining the register value for the data path. | ||
|
||
Signed-off-by: Michael Tretter <m.tretter@pengutronix.de> | ||
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> | ||
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> | ||
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org> | ||
--- | ||
drivers/media/platform/nxp/imx-pxp.c | 62 +++++++++++++++++++--------- | ||
1 file changed, 42 insertions(+), 20 deletions(-) | ||
|
||
--- a/drivers/media/platform/nxp/imx-pxp.c | ||
+++ b/drivers/media/platform/nxp/imx-pxp.c | ||
@@ -724,6 +724,47 @@ static void pxp_setup_csc(struct pxp_ctx | ||
} | ||
} | ||
|
||
+static u32 pxp_data_path_ctrl0(struct pxp_ctx *ctx) | ||
+{ | ||
+ u32 ctrl0; | ||
+ | ||
+ ctrl0 = 0; | ||
+ ctrl0 |= BF_PXP_DATA_PATH_CTRL0_MUX15_SEL(0); | ||
+ ctrl0 |= BF_PXP_DATA_PATH_CTRL0_MUX14_SEL(1); | ||
+ ctrl0 |= BF_PXP_DATA_PATH_CTRL0_MUX13_SEL(0); | ||
+ ctrl0 |= BF_PXP_DATA_PATH_CTRL0_MUX12_SEL(0); | ||
+ ctrl0 |= BF_PXP_DATA_PATH_CTRL0_MUX11_SEL(0); | ||
+ ctrl0 |= BF_PXP_DATA_PATH_CTRL0_MUX10_SEL(0); | ||
+ ctrl0 |= BF_PXP_DATA_PATH_CTRL0_MUX9_SEL(1); | ||
+ ctrl0 |= BF_PXP_DATA_PATH_CTRL0_MUX8_SEL(0); | ||
+ ctrl0 |= BF_PXP_DATA_PATH_CTRL0_MUX7_SEL(0); | ||
+ ctrl0 |= BF_PXP_DATA_PATH_CTRL0_MUX6_SEL(0); | ||
+ ctrl0 |= BF_PXP_DATA_PATH_CTRL0_MUX5_SEL(0); | ||
+ ctrl0 |= BF_PXP_DATA_PATH_CTRL0_MUX4_SEL(0); | ||
+ ctrl0 |= BF_PXP_DATA_PATH_CTRL0_MUX3_SEL(0); | ||
+ ctrl0 |= BF_PXP_DATA_PATH_CTRL0_MUX2_SEL(0); | ||
+ ctrl0 |= BF_PXP_DATA_PATH_CTRL0_MUX1_SEL(0); | ||
+ ctrl0 |= BF_PXP_DATA_PATH_CTRL0_MUX0_SEL(0); | ||
+ | ||
+ return ctrl0; | ||
+} | ||
+ | ||
+static void pxp_set_data_path(struct pxp_ctx *ctx) | ||
+{ | ||
+ struct pxp_dev *dev = ctx->dev; | ||
+ u32 ctrl0; | ||
+ u32 ctrl1; | ||
+ | ||
+ ctrl0 = pxp_data_path_ctrl0(ctx); | ||
+ | ||
+ ctrl1 = 0; | ||
+ ctrl1 |= BF_PXP_DATA_PATH_CTRL1_MUX17_SEL(1); | ||
+ ctrl1 |= BF_PXP_DATA_PATH_CTRL1_MUX16_SEL(1); | ||
+ | ||
+ writel(ctrl0, dev->mmio + HW_PXP_DATA_PATH_CTRL0); | ||
+ writel(ctrl1, dev->mmio + HW_PXP_DATA_PATH_CTRL1); | ||
+} | ||
+ | ||
static int pxp_start(struct pxp_ctx *ctx, struct vb2_v4l2_buffer *in_vb, | ||
struct vb2_v4l2_buffer *out_vb) | ||
{ | ||
@@ -910,26 +951,7 @@ static int pxp_start(struct pxp_ctx *ctx | ||
/* bypass LUT */ | ||
writel(BM_PXP_LUT_CTRL_BYPASS, dev->mmio + HW_PXP_LUT_CTRL); | ||
|
||
- writel(BF_PXP_DATA_PATH_CTRL0_MUX15_SEL(0)| | ||
- BF_PXP_DATA_PATH_CTRL0_MUX14_SEL(1)| | ||
- BF_PXP_DATA_PATH_CTRL0_MUX13_SEL(0)| | ||
- BF_PXP_DATA_PATH_CTRL0_MUX12_SEL(0)| | ||
- BF_PXP_DATA_PATH_CTRL0_MUX11_SEL(0)| | ||
- BF_PXP_DATA_PATH_CTRL0_MUX10_SEL(0)| | ||
- BF_PXP_DATA_PATH_CTRL0_MUX9_SEL(1)| | ||
- BF_PXP_DATA_PATH_CTRL0_MUX8_SEL(0)| | ||
- BF_PXP_DATA_PATH_CTRL0_MUX7_SEL(0)| | ||
- BF_PXP_DATA_PATH_CTRL0_MUX6_SEL(0)| | ||
- BF_PXP_DATA_PATH_CTRL0_MUX5_SEL(0)| | ||
- BF_PXP_DATA_PATH_CTRL0_MUX4_SEL(0)| | ||
- BF_PXP_DATA_PATH_CTRL0_MUX3_SEL(0)| | ||
- BF_PXP_DATA_PATH_CTRL0_MUX2_SEL(0)| | ||
- BF_PXP_DATA_PATH_CTRL0_MUX1_SEL(0)| | ||
- BF_PXP_DATA_PATH_CTRL0_MUX0_SEL(0), | ||
- dev->mmio + HW_PXP_DATA_PATH_CTRL0); | ||
- writel(BF_PXP_DATA_PATH_CTRL1_MUX17_SEL(1) | | ||
- BF_PXP_DATA_PATH_CTRL1_MUX16_SEL(1), | ||
- dev->mmio + HW_PXP_DATA_PATH_CTRL1); | ||
+ pxp_set_data_path(ctx); | ||
|
||
writel(0xffff, dev->mmio + HW_PXP_IRQ_MASK); | ||
|
75 changes: 75 additions & 0 deletions
75
.../linux/generic/backport-6.1/902-v6.3-media-imx-pxp-explicitly-disable-unused-blocks.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
From 47956c921d6a3f6b07007374b6ca96b1675f6114 Mon Sep 17 00:00:00 2001 | ||
From: Michael Tretter <m.tretter@pengutronix.de> | ||
Date: Fri, 13 Jan 2023 10:54:10 +0100 | ||
Subject: [PATCH] media: imx-pxp: explicitly disable unused blocks | ||
|
||
Various multiplexers in the pipeline are not used with the currently | ||
configured data path. Disable all unused multiplexers by selecting the | ||
"no output" (3) option. | ||
|
||
The datasheet doesn't explicitly require this, but the PXP has been seen | ||
to hang after processing a few hundreds of frames otherwise. | ||
|
||
As at it, add documentation for the multiplexers that are actually | ||
relevant for the data path. | ||
|
||
Signed-off-by: Michael Tretter <m.tretter@pengutronix.de> | ||
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> | ||
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> | ||
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org> | ||
--- | ||
drivers/media/platform/nxp/imx-pxp.c | 30 +++++++++++++++++----------- | ||
1 file changed, 18 insertions(+), 12 deletions(-) | ||
|
||
--- a/drivers/media/platform/nxp/imx-pxp.c | ||
+++ b/drivers/media/platform/nxp/imx-pxp.c | ||
@@ -729,22 +729,28 @@ static u32 pxp_data_path_ctrl0(struct px | ||
u32 ctrl0; | ||
|
||
ctrl0 = 0; | ||
- ctrl0 |= BF_PXP_DATA_PATH_CTRL0_MUX15_SEL(0); | ||
+ ctrl0 |= BF_PXP_DATA_PATH_CTRL0_MUX15_SEL(3); | ||
+ /* Bypass Dithering x3CH */ | ||
ctrl0 |= BF_PXP_DATA_PATH_CTRL0_MUX14_SEL(1); | ||
- ctrl0 |= BF_PXP_DATA_PATH_CTRL0_MUX13_SEL(0); | ||
+ ctrl0 |= BF_PXP_DATA_PATH_CTRL0_MUX13_SEL(3); | ||
+ /* Select Rotation */ | ||
ctrl0 |= BF_PXP_DATA_PATH_CTRL0_MUX12_SEL(0); | ||
+ /* Select LUT */ | ||
ctrl0 |= BF_PXP_DATA_PATH_CTRL0_MUX11_SEL(0); | ||
- ctrl0 |= BF_PXP_DATA_PATH_CTRL0_MUX10_SEL(0); | ||
+ ctrl0 |= BF_PXP_DATA_PATH_CTRL0_MUX10_SEL(3); | ||
+ /* Select MUX8 for LUT */ | ||
ctrl0 |= BF_PXP_DATA_PATH_CTRL0_MUX9_SEL(1); | ||
+ /* Select CSC 2 */ | ||
ctrl0 |= BF_PXP_DATA_PATH_CTRL0_MUX8_SEL(0); | ||
- ctrl0 |= BF_PXP_DATA_PATH_CTRL0_MUX7_SEL(0); | ||
- ctrl0 |= BF_PXP_DATA_PATH_CTRL0_MUX6_SEL(0); | ||
- ctrl0 |= BF_PXP_DATA_PATH_CTRL0_MUX5_SEL(0); | ||
- ctrl0 |= BF_PXP_DATA_PATH_CTRL0_MUX4_SEL(0); | ||
+ ctrl0 |= BF_PXP_DATA_PATH_CTRL0_MUX7_SEL(3); | ||
+ ctrl0 |= BF_PXP_DATA_PATH_CTRL0_MUX6_SEL(3); | ||
+ ctrl0 |= BF_PXP_DATA_PATH_CTRL0_MUX5_SEL(3); | ||
+ ctrl0 |= BF_PXP_DATA_PATH_CTRL0_MUX4_SEL(3); | ||
+ /* Bypass Rotation 2 */ | ||
ctrl0 |= BF_PXP_DATA_PATH_CTRL0_MUX3_SEL(0); | ||
- ctrl0 |= BF_PXP_DATA_PATH_CTRL0_MUX2_SEL(0); | ||
- ctrl0 |= BF_PXP_DATA_PATH_CTRL0_MUX1_SEL(0); | ||
- ctrl0 |= BF_PXP_DATA_PATH_CTRL0_MUX0_SEL(0); | ||
+ ctrl0 |= BF_PXP_DATA_PATH_CTRL0_MUX2_SEL(3); | ||
+ ctrl0 |= BF_PXP_DATA_PATH_CTRL0_MUX1_SEL(3); | ||
+ ctrl0 |= BF_PXP_DATA_PATH_CTRL0_MUX0_SEL(3); | ||
|
||
return ctrl0; | ||
} | ||
@@ -758,8 +764,8 @@ static void pxp_set_data_path(struct pxp | ||
ctrl0 = pxp_data_path_ctrl0(ctx); | ||
|
||
ctrl1 = 0; | ||
- ctrl1 |= BF_PXP_DATA_PATH_CTRL1_MUX17_SEL(1); | ||
- ctrl1 |= BF_PXP_DATA_PATH_CTRL1_MUX16_SEL(1); | ||
+ ctrl1 |= BF_PXP_DATA_PATH_CTRL1_MUX17_SEL(3); | ||
+ ctrl1 |= BF_PXP_DATA_PATH_CTRL1_MUX16_SEL(3); | ||
|
||
writel(ctrl0, dev->mmio + HW_PXP_DATA_PATH_CTRL0); | ||
writel(ctrl1, dev->mmio + HW_PXP_DATA_PATH_CTRL1); |
44 changes: 44 additions & 0 deletions
44
target/linux/generic/backport-6.1/903-v6.3-media-imx-pxp-disable-LUT-block.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
From fb2e9aa84243db9f2707e4cf257d95a13f9fce23 Mon Sep 17 00:00:00 2001 | ||
From: Michael Tretter <m.tretter@pengutronix.de> | ||
Date: Fri, 13 Jan 2023 10:54:11 +0100 | ||
Subject: [PATCH] media: imx-pxp: disable LUT block | ||
|
||
The LUT block is always configured in bypass mode. | ||
|
||
Take it entirely out of the pipeline by disabling it and routing the | ||
data path around the LUT. | ||
|
||
Signed-off-by: Michael Tretter <m.tretter@pengutronix.de> | ||
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> | ||
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> | ||
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org> | ||
--- | ||
drivers/media/platform/nxp/imx-pxp.c | 9 ++++----- | ||
1 file changed, 4 insertions(+), 5 deletions(-) | ||
|
||
--- a/drivers/media/platform/nxp/imx-pxp.c | ||
+++ b/drivers/media/platform/nxp/imx-pxp.c | ||
@@ -735,11 +735,10 @@ static u32 pxp_data_path_ctrl0(struct px | ||
ctrl0 |= BF_PXP_DATA_PATH_CTRL0_MUX13_SEL(3); | ||
/* Select Rotation */ | ||
ctrl0 |= BF_PXP_DATA_PATH_CTRL0_MUX12_SEL(0); | ||
- /* Select LUT */ | ||
- ctrl0 |= BF_PXP_DATA_PATH_CTRL0_MUX11_SEL(0); | ||
+ /* Bypass LUT */ | ||
+ ctrl0 |= BF_PXP_DATA_PATH_CTRL0_MUX11_SEL(1); | ||
ctrl0 |= BF_PXP_DATA_PATH_CTRL0_MUX10_SEL(3); | ||
- /* Select MUX8 for LUT */ | ||
- ctrl0 |= BF_PXP_DATA_PATH_CTRL0_MUX9_SEL(1); | ||
+ ctrl0 |= BF_PXP_DATA_PATH_CTRL0_MUX9_SEL(3); | ||
/* Select CSC 2 */ | ||
ctrl0 |= BF_PXP_DATA_PATH_CTRL0_MUX8_SEL(0); | ||
ctrl0 |= BF_PXP_DATA_PATH_CTRL0_MUX7_SEL(3); | ||
@@ -964,7 +963,7 @@ static int pxp_start(struct pxp_ctx *ctx | ||
/* ungate, enable PS/AS/OUT and PXP operation */ | ||
writel(BM_PXP_CTRL_IRQ_ENABLE, dev->mmio + HW_PXP_CTRL_SET); | ||
writel(BM_PXP_CTRL_ENABLE | BM_PXP_CTRL_ENABLE_CSC2 | | ||
- BM_PXP_CTRL_ENABLE_LUT | BM_PXP_CTRL_ENABLE_ROTATE0 | | ||
+ BM_PXP_CTRL_ENABLE_ROTATE0 | | ||
BM_PXP_CTRL_ENABLE_PS_AS_OUT, dev->mmio + HW_PXP_CTRL_SET); | ||
|
||
return 0; |
93 changes: 93 additions & 0 deletions
93
...generic/backport-6.1/904-v6.3-media-imx-pxp-make-data-path-ctrl0-platform-dependent.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
From 76985f4e8d34e0c20f2cde6017914ab9ce49aa17 Mon Sep 17 00:00:00 2001 | ||
From: Michael Tretter <m.tretter@pengutronix.de> | ||
Date: Fri, 13 Jan 2023 10:54:12 +0100 | ||
Subject: [PATCH] media: imx-pxp: make data_path_ctrl0 platform dependent | ||
|
||
Unfortunately, the PXP_HW_VERSION register reports the PXP on the i.MX7D | ||
and on the i.MX6ULL as version 3.0, although the PXP versions on these | ||
SoCs have significant differences. | ||
|
||
Use the compatible to configure the ctrl0 register as required dependent | ||
on the platform. | ||
|
||
Signed-off-by: Michael Tretter <m.tretter@pengutronix.de> | ||
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> | ||
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> | ||
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org> | ||
--- | ||
drivers/media/platform/nxp/imx-pxp.c | 21 ++++++++++++++++++--- | ||
1 file changed, 18 insertions(+), 3 deletions(-) | ||
|
||
--- a/drivers/media/platform/nxp/imx-pxp.c | ||
+++ b/drivers/media/platform/nxp/imx-pxp.c | ||
@@ -19,6 +19,7 @@ | ||
#include <linux/iopoll.h> | ||
#include <linux/module.h> | ||
#include <linux/of.h> | ||
+#include <linux/of_device.h> | ||
#include <linux/sched.h> | ||
#include <linux/slab.h> | ||
|
||
@@ -191,6 +192,12 @@ static struct pxp_fmt *find_format(struc | ||
return &formats[k]; | ||
} | ||
|
||
+struct pxp_ctx; | ||
+ | ||
+struct pxp_pdata { | ||
+ u32 (*data_path_ctrl0)(struct pxp_ctx *ctx); | ||
+}; | ||
+ | ||
struct pxp_dev { | ||
struct v4l2_device v4l2_dev; | ||
struct video_device vfd; | ||
@@ -198,6 +205,8 @@ struct pxp_dev { | ||
struct clk *clk; | ||
void __iomem *mmio; | ||
|
||
+ const struct pxp_pdata *pdata; | ||
+ | ||
atomic_t num_inst; | ||
struct mutex dev_mutex; | ||
spinlock_t irqlock; | ||
@@ -724,7 +733,7 @@ static void pxp_setup_csc(struct pxp_ctx | ||
} | ||
} | ||
|
||
-static u32 pxp_data_path_ctrl0(struct pxp_ctx *ctx) | ||
+static u32 pxp_imx6ull_data_path_ctrl0(struct pxp_ctx *ctx) | ||
{ | ||
u32 ctrl0; | ||
|
||
@@ -760,7 +769,7 @@ static void pxp_set_data_path(struct pxp | ||
u32 ctrl0; | ||
u32 ctrl1; | ||
|
||
- ctrl0 = pxp_data_path_ctrl0(ctx); | ||
+ ctrl0 = dev->pdata->data_path_ctrl0(ctx); | ||
|
||
ctrl1 = 0; | ||
ctrl1 |= BF_PXP_DATA_PATH_CTRL1_MUX17_SEL(3); | ||
@@ -1705,6 +1714,8 @@ static int pxp_probe(struct platform_dev | ||
if (!dev) | ||
return -ENOMEM; | ||
|
||
+ dev->pdata = of_device_get_match_data(&pdev->dev); | ||
+ | ||
dev->clk = devm_clk_get(&pdev->dev, "axi"); | ||
if (IS_ERR(dev->clk)) { | ||
ret = PTR_ERR(dev->clk); | ||
@@ -1804,8 +1815,12 @@ static int pxp_remove(struct platform_de | ||
return 0; | ||
} | ||
|
||
+static const struct pxp_pdata pxp_imx6ull_pdata = { | ||
+ .data_path_ctrl0 = pxp_imx6ull_data_path_ctrl0, | ||
+}; | ||
+ | ||
static const struct of_device_id pxp_dt_ids[] = { | ||
- { .compatible = "fsl,imx6ull-pxp", .data = NULL }, | ||
+ { .compatible = "fsl,imx6ull-pxp", .data = &pxp_imx6ull_pdata }, | ||
{ }, | ||
}; | ||
MODULE_DEVICE_TABLE(of, pxp_dt_ids); |
Oops, something went wrong.