From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Nelson Date: Fri, 21 Sep 2012 14:00:25 -0700 Subject: [U-Boot] [PATCH 1/2] i.MX: mxc_ipuv3_fb: add ipuv3_fb_shutdown() routine to stop IPU before bootm In-Reply-To: <1348261019-9624-2-git-send-email-eric.nelson@boundarydevices.com> References: <1348261019-9624-1-git-send-email-eric.nelson@boundarydevices.com> <1348261019-9624-2-git-send-email-eric.nelson@boundarydevices.com> Message-ID: <505CD569.3010904@boundarydevices.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 09/21/2012 01:56 PM, Eric Nelson wrote: > Signed-off-by: Eric Nelson > --- > 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 Sorry. This is a duplicate of a prior e-mail.