All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Nelson <eric.nelson@boundarydevices.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/2] i.MX: mxc_ipuv3_fb: add ipuv3_fb_shutdown() routine to stop IPU before bootm
Date: Fri, 21 Sep 2012 13:36:34 -0700	[thread overview]
Message-ID: <1348259795-9314-2-git-send-email-eric.nelson@boundarydevices.com> (raw)
In-Reply-To: <1348259795-9314-1-git-send-email-eric.nelson@boundarydevices.com>

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
---
 drivers/video/mxc_ipuv3_fb.c |   20 ++++++++++++++++++++
 include/ipu_pixfmt.h         |    1 +
 2 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/drivers/video/mxc_ipuv3_fb.c b/drivers/video/mxc_ipuv3_fb.c
index c38e22d..47b336e 100644
--- a/drivers/video/mxc_ipuv3_fb.c
+++ b/drivers/video/mxc_ipuv3_fb.c
@@ -38,6 +38,7 @@
 #include "videomodes.h"
 #include "ipu.h"
 #include "mxcfb.h"
+#include "ipu_regs.h"
 
 static int mxcfb_map_video_memory(struct fb_info *fbi);
 static int mxcfb_unmap_video_memory(struct fb_info *fbi);
@@ -576,6 +577,25 @@ err0:
 	return ret;
 }
 
+void ipuv3_fb_shutdown(void)
+{
+	int i;
+	struct ipu_stat *stat = (struct ipu_stat *)IPU_STAT;
+
+	for (i = 0; i < ARRAY_SIZE(mxcfb_info); i++) {
+		struct fb_info *fbi = mxcfb_info[i];
+		if (fbi) {
+			struct mxcfb_info *mxc_fbi = fbi->par;
+			ipu_disable_channel(mxc_fbi->ipu_ch);
+			ipu_uninit_channel(mxc_fbi->ipu_ch);
+		}
+	}
+	for (i = 0; i < ARRAY_SIZE(stat->int_stat); i++) {
+		__raw_writel(__raw_readl(&stat->int_stat[i]),
+			     &stat->int_stat[i]);
+	}
+}
+
 void *video_hw_init(void)
 {
 	int ret;
diff --git a/include/ipu_pixfmt.h b/include/ipu_pixfmt.h
index 0019898..4baa711 100644
--- a/include/ipu_pixfmt.h
+++ b/include/ipu_pixfmt.h
@@ -77,5 +77,6 @@
 #define IPU_PIX_FMT_YUV422P fourcc('4', '2', '2', 'P')	/*< 16 YUV 4:2:2 */
 
 int ipuv3_fb_init(struct fb_videomode *mode, uint8_t disp, uint32_t pixfmt);
+void ipuv3_fb_shutdown(void);
 
 #endif
-- 
1.7.9

  reply	other threads:[~2012-09-21 20:36 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-21 16:38 [U-Boot] Disabling video in bootm (cleanup_before_linux) Eric Nelson
2012-09-21 17:22 ` Anatolij Gustschin
2012-09-21 17:44   ` Eric Nelson
2012-09-22 13:35     ` Otavio Salvador
2012-09-22 15:35       ` Eric Nelson
2012-09-22 15:37         ` Otavio Salvador
2012-09-21 20:36   ` [U-Boot] [PATCH 0/2] i.MX: ipufb: shut down IPU frame buffer before booting O/S Eric Nelson
2012-09-21 20:36     ` Eric Nelson [this message]
2012-09-22 13:42       ` [U-Boot] [PATCH 1/2] i.MX: mxc_ipuv3_fb: add ipuv3_fb_shutdown() routine to stop IPU before bootm Otavio Salvador
2012-09-22 14:37         ` Fabio Estevam
2012-09-22 14:39           ` Otavio Salvador
2012-09-23 15:56           ` Stefano Babic
2012-09-23 16:32             ` Dirk Behme
2012-09-23 16:46             ` Eric Nelson
2012-09-23 16:59               ` Fabio Estevam
2012-09-23 17:27               ` Stefano Babic
2012-09-23 18:13                 ` [U-Boot] Displays on i.MX (was Re: [PATCH 1/2]) Eric Nelson
2012-09-23 20:12                   ` [U-Boot] [PATCH] i2c_probe: update for use in scripting Eric Nelson
2012-10-16  3:58                     ` Heiko Schocher
2012-09-23 23:02                   ` [U-Boot] [PATCH 0/3] i.MX6: implement hdmidet command Eric Nelson
2012-09-23 23:02                     ` [U-Boot] [PATCH 1/3] i.MX6: add HDMI transmitter register declarations from kernel WIP Eric Nelson
2012-09-23 23:02                     ` [U-Boot] [PATCH 2/3] i.MX6: Add hdmidet command to detect attached HDMI monitor Eric Nelson
2012-09-23 23:02                     ` [U-Boot] [PATCH 3/3] i.MX6: mx6qsabrelite: Include hdmidet command Eric Nelson
2012-10-02  8:28                     ` [U-Boot] [PATCH 0/3] i.MX6: implement " Stefano Babic
2012-09-23 18:15                 ` [U-Boot] [PATCH 1/2] i.MX: mxc_ipuv3_fb: add ipuv3_fb_shutdown() routine to stop IPU before bootm Sascha Hauer
2012-09-23 17:30               ` [U-Boot] [PATCH V2 0/2] i.MX: ipufb: shut down IPU frame buffer before booting Eric Nelson
2012-09-23 17:30                 ` [U-Boot] [PATCH V2 1/2] i.MX: mxc_ipuv3_fb: add ipuv3_fb_shutdown() routine to stop IPU frame buffer Eric Nelson
2012-09-24  8:50                   ` Stefano Babic
2012-09-23 17:30                 ` [U-Boot] [PATCH V2 2/2] i.MX: shut down video before launch of O/S Eric Nelson
2012-09-24  8:50                   ` Stefano Babic
2012-09-21 20:36     ` [U-Boot] [PATCH " Eric Nelson
2012-09-21 22:41       ` Fabio Estevam
2012-09-21 23:02         ` Eric Nelson
  -- strict thread matches above, loose matches on Subject: below --
2012-09-21 20:56 [U-Boot] [PATCH] i.MX6: set drive strength for parallel RGB pads Eric Nelson
2012-09-21 20:56 ` [U-Boot] [PATCH 1/2] i.MX: mxc_ipuv3_fb: add ipuv3_fb_shutdown() routine to stop IPU before bootm Eric Nelson
2012-09-21 21:00   ` Eric Nelson

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=1348259795-9314-2-git-send-email-eric.nelson@boundarydevices.com \
    --to=eric.nelson@boundarydevices.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.