Skip to contentSkip to conversation

media: ccs: Fix the op_pll_multiplier address

PATCH Superseded Bernhard Wimmer 2 participants 2 messages Apr 12, 2021 – Apr 13, 2021

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 media: ccs: Fix the op_pll_multiplier address

According to the CCS spec the op_pll_multiplier address is 0x030e, not 0x031e.

---
 Documentation/driver-api/media/drivers/ccs/ccs-regs.asc | 2 +-
 Documentation/driver-api/media/drivers/ccs/mk-ccs-regs  | 5 +++--
 drivers/media/i2c/ccs/ccs-limits.c                      | 1 +
 drivers/media/i2c/ccs/ccs-limits.h                      | 1 +
 drivers/media/i2c/ccs/ccs-regs.h                        | 3 ++-
 5 files changed, 8 insertions(+), 4 deletions(-)
Documentation/driver-api/media/drivers/ccs/ccs-regs.asc +1 -1
index f2042acc8a45..bbf9213c3388 100644
@@ -210,7 +210,7 @@ pll_multiplier				0x0306	16
 op_pix_clk_div				0x0308	16
 op_sys_clk_div				0x030a	16
 op_pre_pll_clk_div			0x030c	16
-op_pll_multiplier			0x031e	16
+op_pll_multiplier			0x030e	16
 pll_mode				0x0310	8
 - f					0	0
 - e	single				0
Documentation/driver-api/media/drivers/ccs/mk-ccs-regs +3 -2
index 6668deaf2f19..807c0c14ec29 100755
@@ -72,13 +72,14 @@ $uc_header =~ s/[^A-Z0-9]/_/g;
 
 my $copyright = "/* Copyright (C) 2019--2020 Intel Corporation */\n";
 my $license = "SPDX-License-Identifier: GPL-2.0-only OR BSD-3-Clause";
+my $note = "/* Generated by $0; do not modify. */\n";
 
 for my $fh ($A, $LC) {
-	print $fh "// $license\n$copyright\n" if defined $fh;
+	print $fh "// $license\n$copyright$note\n" if defined $fh;
 }
 
 for my $fh ($H, $LH) {
-	print $fh "/* $license */\n$copyright\n";
+	print $fh "/* $license */\n$copyright$note\n";
 }
 
 sub bit_def($) {
drivers/media/i2c/ccs/ccs-limits.c +1 -0
index f5511789ac83..e4b7127b88a1 100644
@@ -1,5 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0-only OR BSD-3-Clause
 /* Copyright (C) 2019--2020 Intel Corporation */
+/* Generated by Documentation/driver-api/media/drivers/ccs/mk-ccs-regs; do not modify. */
 
 #include "ccs-limits.h"
 #include "ccs-regs.h"
drivers/media/i2c/ccs/ccs-limits.h +1 -0
index 1efa43c23a2e..40b067fc9a70 100644
@@ -1,5 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0-only OR BSD-3-Clause */
 /* Copyright (C) 2019--2020 Intel Corporation */
+/* Generated by Documentation/driver-api/media/drivers/ccs/mk-ccs-regs; do not modify. */
 
 #ifndef __CCS_LIMITS_H__
 #define __CCS_LIMITS_H__
drivers/media/i2c/ccs/ccs-regs.h +2 -1
index 4b3e5df2121f..5de330bf8a89 100644
@@ -1,5 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0-only OR BSD-3-Clause */
 /* Copyright (C) 2019--2020 Intel Corporation */
+/* Generated by Documentation/driver-api/media/drivers/ccs/mk-ccs-regs; do not modify. */
 
 #ifndef __CCS_REGS_H__
 #define __CCS_REGS_H__
@@ -202,7 +203,7 @@
 #define CCS_R_OP_PIX_CLK_DIV					(0x0308 | CCS_FL_16BIT)
 #define CCS_R_OP_SYS_CLK_DIV					(0x030a | CCS_FL_16BIT)
 #define CCS_R_OP_PRE_PLL_CLK_DIV				(0x030c | CCS_FL_16BIT)
-#define CCS_R_OP_PLL_MULTIPLIER					(0x031e | CCS_FL_16BIT)
+#define CCS_R_OP_PLL_MULTIPLIER					(0x030e | CCS_FL_16BIT)
 #define CCS_R_PLL_MODE						0x0310
 #define CCS_PLL_MODE_SHIFT					0U
 #define CCS_PLL_MODE_MASK					0x1
Signature · 1 line
2.17.1
#1 lore raw

Hi Bernhard,

Thanks for the patch.

Quoted 1 line · Bernhard Wimmer

According to the CCS spec the op_pll_multiplier address is 0x030e, not 0x031e.

Please wrap commit messages no later than at 75th column.

Quoted 15 lines
---
 Documentation/driver-api/media/drivers/ccs/ccs-regs.asc | 2 +-
 Documentation/driver-api/media/drivers/ccs/mk-ccs-regs  | 5 +++--
 drivers/media/i2c/ccs/ccs-limits.c                      | 1 +
 drivers/media/i2c/ccs/ccs-limits.h                      | 1 +
 drivers/media/i2c/ccs/ccs-regs.h                        | 3 ++-
 5 files changed, 8 insertions(+), 4 deletions(-)
Documentation/driver-api/media/drivers/ccs/ccs-regs.asc +0 -0
index f2042acc8a45..bbf9213c3388 100644

Documentation/driver-api/media/drivers/ccs/ccs-regs.asc pll_multiplier 0x0306 16 · line 213

Quoted 5 lines
Documentation/driver-api/media/drivers/ccs/ccs-regs.asc +1 -1
@@ -210,7 +210,7 @@ pll_multiplier				0x0306	16
 op_pix_clk_div				0x0308	16
 op_sys_clk_div				0x030a	16
 op_pre_pll_clk_div			0x030c	16
-op_pll_multiplier			0x031e	16
+op_pll_multiplier			0x030e	16

Good find!

Documentation/driver-api/media/drivers/ccs/mk-ccs-regs $uc_header =~ s/[^A-Z0-9]/_/g; · line 75

Quoted 12 lines
Documentation/driver-api/media/drivers/ccs/ccs-regs.asc +0 -0
 pll_mode				0x0310	8
 - f					0	0
 - e	single				0
Documentation/driver-api/media/drivers/ccs/mk-ccs-regs +1 -0
index 6668deaf2f19..807c0c14ec29 100755
@@ -72,13 +72,14 @@ $uc_header =~ s/[^A-Z0-9]/_/g;
 
 my $copyright = "/* Copyright (C) 2019--2020 Intel Corporation */\n";
 my $license = "SPDX-License-Identifier: GPL-2.0-only OR BSD-3-Clause";
+my $note = "/* Generated by $0; do not modify. */\n";

Could you make this a multi-line comment (wrap after ;) so this will stay under 80 characters per line? The path to the file is long. I.e.

/*
* Generated by ...;
* do not modify.
*/

Quoted 57 lines
Documentation/driver-api/media/drivers/ccs/mk-ccs-regs +2 -2
 for my $fh ($A, $LC) {
-	print $fh "// $license\n$copyright\n" if defined $fh;
+	print $fh "// $license\n$copyright$note\n" if defined $fh;
 }
 
 for my $fh ($H, $LH) {
-	print $fh "/* $license */\n$copyright\n";
+	print $fh "/* $license */\n$copyright$note\n";
 }
 
 sub bit_def($) {
drivers/media/i2c/ccs/ccs-limits.c +1 -0
index f5511789ac83..e4b7127b88a1 100644
@@ -1,5 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0-only OR BSD-3-Clause
 /* Copyright (C) 2019--2020 Intel Corporation */
+/* Generated by Documentation/driver-api/media/drivers/ccs/mk-ccs-regs; do not modify. */
 
 #include "ccs-limits.h"
 #include "ccs-regs.h"
drivers/media/i2c/ccs/ccs-limits.h +1 -0
index 1efa43c23a2e..40b067fc9a70 100644
@@ -1,5 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0-only OR BSD-3-Clause */
 /* Copyright (C) 2019--2020 Intel Corporation */
+/* Generated by Documentation/driver-api/media/drivers/ccs/mk-ccs-regs; do not modify. */
 
 #ifndef __CCS_LIMITS_H__
 #define __CCS_LIMITS_H__
drivers/media/i2c/ccs/ccs-regs.h +2 -1
index 4b3e5df2121f..5de330bf8a89 100644
@@ -1,5 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0-only OR BSD-3-Clause */
 /* Copyright (C) 2019--2020 Intel Corporation */
+/* Generated by Documentation/driver-api/media/drivers/ccs/mk-ccs-regs; do not modify. */
 
 #ifndef __CCS_REGS_H__
 #define __CCS_REGS_H__
@@ -202,7 +203,7 @@
 #define CCS_R_OP_PIX_CLK_DIV					(0x0308 | CCS_FL_16BIT)
 #define CCS_R_OP_SYS_CLK_DIV					(0x030a | CCS_FL_16BIT)
 #define CCS_R_OP_PRE_PLL_CLK_DIV				(0x030c | CCS_FL_16BIT)
-#define CCS_R_OP_PLL_MULTIPLIER					(0x031e | CCS_FL_16BIT)
+#define CCS_R_OP_PLL_MULTIPLIER					(0x030e | CCS_FL_16BIT)
 #define CCS_R_PLL_MODE						0x0310
 #define CCS_PLL_MODE_SHIFT					0U
 #define CCS_PLL_MODE_MASK					0x1
Signature · 1 line
2.17.1
Signature · 1 line
Sakari Ailus