public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2] video, ipu: make ldb clock frequenz overwriteable through board code
Date: Mon, 20 Apr 2015 07:53:48 +0200	[thread overview]
Message-ID: <1429509228-10406-1-git-send-email-hs@denx.de> (raw)

the ldb clock can be setup in board code (for example set through PLL5).
Update the ldb_clock rate also through board code.

This should be removed, if a clock framework is availiable.

Signed-off-by: Heiko Schocher <hs@denx.de>
Tested-by: Eric Nelson <eric.nelson@boundarydevices.com>

---

Changes in v2:
- add comment from Eric Nelson
  - move ipu_set_ldb_clock() from drivers/video/ipu.h to
    imx-common/video.h
  - remove g_ldb_clk with ldb_clk.rate, call ldb_clk directly,
    instead of using g_ldb_clk
 - add Tested-by from Eric Nelson

 arch/arm/include/asm/imx-common/video.h | 1 +
 drivers/video/ipu.h                     | 1 -
 drivers/video/ipu_common.c              | 8 ++++++++
 3 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/arch/arm/include/asm/imx-common/video.h b/arch/arm/include/asm/imx-common/video.h
index 1a907d4..cad5f86 100644
--- a/arch/arm/include/asm/imx-common/video.h
+++ b/arch/arm/include/asm/imx-common/video.h
@@ -26,4 +26,5 @@ extern struct display_info_t const displays[];
 extern size_t display_count;
 #endif
 
+int ipu_set_ldb_clock(int rate);
 #endif
diff --git a/drivers/video/ipu.h b/drivers/video/ipu.h
index 091b58f..348be58 100644
--- a/drivers/video/ipu.h
+++ b/drivers/video/ipu.h
@@ -265,5 +265,4 @@ int ipu_dp_init(ipu_channel_t channel, uint32_t in_pixel_fmt,
 void ipu_dp_uninit(ipu_channel_t channel);
 void ipu_dp_dc_disable(ipu_channel_t channel, unsigned char swap);
 ipu_color_space_t format_to_colorspace(uint32_t fmt);
-
 #endif
diff --git a/drivers/video/ipu_common.c b/drivers/video/ipu_common.c
index 8ebb205..c851e4f 100644
--- a/drivers/video/ipu_common.c
+++ b/drivers/video/ipu_common.c
@@ -1198,3 +1198,11 @@ ipu_color_space_t format_to_colorspace(uint32_t fmt)
 	}
 	return RGB;
 }
+
+/* should removed when clk framework is availiable */
+int ipu_set_ldb_clock(int rate)
+{
+	ldb_clk.rate = rate;
+
+	return 0;
+}
-- 
2.1.0

             reply	other threads:[~2015-04-20  5:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-20  5:53 Heiko Schocher [this message]
2015-04-20  7:39 ` [U-Boot] [PATCH v2] video, ipu: make ldb clock frequenz overwriteable through board code Anatolij Gustschin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1429509228-10406-1-git-send-email-hs@denx.de \
    --to=hs@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox