Skip to contentSkip to conversation

video, ipu: make ldb_clock configurable

PATCH Superseded Heiko Schocher 2 participants 2 messages Apr 12, 2015 – Apr 16, 2015 Framebuffer layer

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 video, ipu: make ldb_clock configurable

make the ldb_clock configurable through the new define CONFIG_SYS_LDB_CLOCK. This is needed as the ldb clock is not always 650000000, for example on the aristainetos2 board, where the ldb clock derives from PLL5 clock.

---

 drivers/video/ipu_common.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/video/ipu_common.c +5 -1
index 5873531..1a209d4 100644
@@ -210,9 +210,13 @@ static struct clk ipu_clk = {
 	.usecount = 0,
 };
 
+#if !defined CONFIG_SYS_LDB_CLOCK
+#define CONFIG_SYS_LDB_CLOCK 650000000
+#endif
+
 static struct clk ldb_clk = {
 	.name = "ldb_clk",
-	.rate = 65000000,
+	.rate = CONFIG_SYS_LDB_CLOCK,
 	.usecount = 0,
 };
 
Signature · 1 line
2.1.0
#1 lore raw

PATCH 1/1 video, ipu: make ldb_clock configurable

Hi Heiko,

Quoted 16 lines · Heiko Schocher

make the ldb_clock configurable through the new define CONFIG_SYS_LDB_CLOCK. This is needed as the ldb clock is not always 650000000, for example on the aristainetos2 board, where the ldb clock derives from PLL5 clock.

---

 drivers/video/ipu_common.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/video/ipu_common.c +0 -0
index 5873531..1a209d4 100644

drivers/video/ipu_common.c static struct clk ipu_clk = { · line 213

Quoted 4 lines
drivers/video/ipu_common.c +1 -0
@@ -210,9 +210,13 @@ static struct clk ipu_clk = {
 	.usecount = 0,
 };
 
+#if !defined CONFIG_SYS_LDB_CLOCK

You might want to count the zeros here:

drivers/video/ipu_common.c static struct clk ipu_clk = { · line 214

Quoted 1 line
drivers/video/ipu_common.c +1 -0
+#define CONFIG_SYS_LDB_CLOCK 650000000

That big a number will break existing code.

drivers/video/ipu_common.c static struct clk ipu_clk = { · line 222

Quoted 10 lines
drivers/video/ipu_common.c +3 -1
+#endif
+
 static struct clk ldb_clk = {
 	.name = "ldb_clk",
-	.rate = 65000000,
+	.rate = CONFIG_SYS_LDB_CLOCK,
 	.usecount = 0,
 };