bcm27xx: update 6.1 patches to latest version
[openwrt/staging/dangole.git] / target / linux / bcm27xx / patches-6.1 / 950-1003-media-rp1-Add-back-reg-write-debug-prints.patch
1 From 8240f1328ead0152f116b385b3169f8f010a7869 Mon Sep 17 00:00:00 2001
2 From: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
3 Date: Fri, 22 Sep 2023 12:39:33 +0300
4 Subject: [PATCH] media: rp1: Add back reg write debug prints
5
6 Add back debug prints in csi2 and pisp_fe reg_write() functions, but use
7 the 'irq' variants to avoid spamming in normal situation.
8
9 Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
10 ---
11 drivers/media/platform/raspberrypi/rp1_cfe/csi2.c | 1 +
12 drivers/media/platform/raspberrypi/rp1_cfe/pisp_fe.c | 2 ++
13 2 files changed, 3 insertions(+)
14
15 --- a/drivers/media/platform/raspberrypi/rp1_cfe/csi2.c
16 +++ b/drivers/media/platform/raspberrypi/rp1_cfe/csi2.c
17 @@ -92,6 +92,7 @@ static inline u32 csi2_reg_read(struct c
18 static inline void csi2_reg_write(struct csi2_device *csi2, u32 offset, u32 val)
19 {
20 writel(val, csi2->base + offset);
21 + csi2_dbg_verbose("csi2: write 0x%04x -> 0x%03x\n", val, offset);
22 }
23
24 static inline void set_field(u32 *valp, u32 field, u32 mask)
25 --- a/drivers/media/platform/raspberrypi/rp1_cfe/pisp_fe.c
26 +++ b/drivers/media/platform/raspberrypi/rp1_cfe/pisp_fe.c
27 @@ -132,12 +132,14 @@ static inline void pisp_fe_reg_write(str
28 u32 val)
29 {
30 writel(val, fe->base + offset);
31 + pisp_fe_dbg_verbose("fe: write 0x%04x -> 0x%03x\n", val, offset);
32 }
33
34 static inline void pisp_fe_reg_write_relaxed(struct pisp_fe_device *fe, u32 offset,
35 u32 val)
36 {
37 writel_relaxed(val, fe->base + offset);
38 + pisp_fe_dbg_verbose("fe: write 0x%04x -> 0x%03x\n", val, offset);
39 }
40
41 static int pisp_regs_show(struct seq_file *s, void *data)