mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 11/14] video: i.MX IPUv3: Implement i.MX5 IPU reset support
Date: Wed,  7 May 2014 10:04:41 +0200	[thread overview]
Message-ID: <1399449884-19089-11-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1399449884-19089-1-git-send-email-s.hauer@pengutronix.de>

Needed to make the IPU driver work on i.MX5

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 drivers/video/imx-ipu-v3/ipu-common.c | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/drivers/video/imx-ipu-v3/ipu-common.c b/drivers/video/imx-ipu-v3/ipu-common.c
index 5f3b0bb..c602363 100644
--- a/drivers/video/imx-ipu-v3/ipu-common.c
+++ b/drivers/video/imx-ipu-v3/ipu-common.c
@@ -22,6 +22,8 @@
 #include <asm/mmu.h>
 #include <mach/generic.h>
 #include <mach/imx6-regs.h>
+#include <mach/imx53-regs.h>
+#include <mach/imx51-regs.h>
 
 #include "imx-ipu-v3.h"
 #include "ipu-prv.h"
@@ -529,6 +531,31 @@ static int imx6_ipu_reset(struct ipu_soc *ipu)
 
 }
 
+static int imx5_ipu_reset(void __iomem *src_base)
+{
+	uint32_t val;
+	int ret;
+
+	val = ipureadl(src_base);
+	val |= (1 << 3);
+	ipuwritel("reset", val, src_base);
+
+	ret = wait_on_timeout(100 * MSECOND, !(readl(src_base) & (1 << 3)));
+
+	return ret;
+
+}
+
+static int imx51_ipu_reset(struct ipu_soc *ipu)
+{
+	return imx5_ipu_reset((void *)MX51_SRC_BASE_ADDR);
+}
+
+static int imx53_ipu_reset(struct ipu_soc *ipu)
+{
+	return imx5_ipu_reset((void *)MX53_SRC_BASE_ADDR);
+}
+
 struct ipu_devtype {
 	const char *name;
 	unsigned long cm_ofs;
@@ -554,6 +581,7 @@ static struct ipu_devtype ipu_type_imx51 = {
 	.dc_tmpl_ofs = 0x1f080000,
 	.vdi_ofs = 0x1e068000,
 	.type = IPUV3EX,
+	.reset = imx51_ipu_reset,
 };
 
 static struct ipu_devtype ipu_type_imx53 = {
@@ -567,6 +595,7 @@ static struct ipu_devtype ipu_type_imx53 = {
 	.dc_tmpl_ofs = 0x07080000,
 	.vdi_ofs = 0x06068000,
 	.type = IPUV3M,
+	.reset = imx53_ipu_reset,
 };
 
 static struct ipu_devtype ipu_type_imx6q = {
-- 
2.0.0.rc0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2014-05-07  8:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-07  8:04 [PATCH 01/14] pinctrl: i.MX iomux-v3: Print more context in error message Sascha Hauer
2014-05-07  8:04 ` [PATCH 02/14] ARM: i.MX: bbu: remove dcd arguments from bbu registration Sascha Hauer
2014-05-07  8:04 ` [PATCH 03/14] ARM: tqma53: Add barebox_update support Sascha Hauer
2014-05-07  8:04 ` [PATCH 04/14] ARM: i.MX53: Use clock number defines from dt-bindings Sascha Hauer
2014-05-07  8:04 ` [PATCH 05/14] ARM: tqma53: Add phy_type property to usb ports Sascha Hauer
2014-05-07  8:04 ` [PATCH 06/14] ARM: i.MX53: Add pwm support Sascha Hauer
2014-05-07  8:04 ` [PATCH 07/14] ARM: i.MX53 tqma53: Set model from devicetree Sascha Hauer
2014-05-07  8:04 ` [PATCH 08/14] ARM: i.MX: implement pllv2 set/round_rate support Sascha Hauer
2014-05-07  8:04 ` [PATCH 09/14] video: i.MX IPUv3: remove debug leftover Sascha Hauer
2014-05-07  8:04 ` [PATCH 10/14] video: i.MX IPUv3: Print error as string Sascha Hauer
2014-05-07  8:04 ` Sascha Hauer [this message]
2014-05-07  8:04 ` [PATCH 12/14] video: i.MX IPUv3 ldb: implement i.MX53 support Sascha Hauer
2014-05-07  8:04 ` [PATCH 13/14] ARM: i.MX5: Add IPU clocks Sascha Hauer
2014-05-07  8:04 ` [PATCH 14/14] ARM: dts: i.MX53: Add ipu alias Sascha Hauer

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=1399449884-19089-11-git-send-email-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /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