summaryrefslogtreecommitdiff
path: root/drivers/video/mxsfb.c
diff options
context:
space:
mode:
authorYe.Li <B37916@freescale.com>2014-06-12 19:47:27 +0800
committerPeng Fan <Peng.Fan@freescale.com>2015-04-29 14:43:24 +0800
commita31dcdafb0963381e7213c59f79a340ef27ec2e2 (patch)
tree1432885a159c451c092d2360a551a16d7b738e68 /drivers/video/mxsfb.c
parent92295fafcdbaa3a3fe0a63ede15f896dfc9ce0b0 (diff)
downloadu-boot-imx-a31dcdafb0963381e7213c59f79a340ef27ec2e2.zip
u-boot-imx-a31dcdafb0963381e7213c59f79a340ef27ec2e2.tar.gz
u-boot-imx-a31dcdafb0963381e7213c59f79a340ef27ec2e2.tar.bz2
ENGR00315894-81 gis: Add gis module
Add gis module, current gis is support vadc input. Add power down function to lcdif driver. Signed-off-by: Sandor Yu <R01008@freescale.com> Signed-off-by: Ye.Li <B37916@freescale.com> (cherry picked from commit a007b00dd8ef9f773dfdebef0b1deb0990281793) Conflicts: drivers/video/Makefile
Diffstat (limited to 'drivers/video/mxsfb.c')
-rw-r--r--drivers/video/mxsfb.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c
index e9978c2..571b6f0 100644
--- a/drivers/video/mxsfb.c
+++ b/drivers/video/mxsfb.c
@@ -21,7 +21,11 @@
#include <linux/string.h>
#include <linux/list.h>
#include <linux/fb.h>
+#include <mxsfb.h>
+#ifdef CONFIG_VIDEO_GIS
+#include <gis.h>
+#endif
#define PS2KHZ(ps) (1000000000UL / (ps))
@@ -55,6 +59,15 @@ int mxs_lcd_panel_setup(struct fb_videomode mode, int bpp,
return 0;
}
+void mxs_lcd_get_panel(struct display_panel *dispanel)
+{
+ dispanel->width = fbmode.xres;
+ dispanel->height = fbmode.yres;
+ dispanel->reg_base = panel.isaBase;
+ dispanel->gdfindex = panel.gdfIndex;
+ dispanel->gdfbytespp = panel.gdfBytesPP;
+}
+
/*
* DENX M28EVK:
* setenv videomode
@@ -151,6 +164,19 @@ static void mxs_lcd_init(GraphicDevice *panel,
writel(LCDIF_CTRL_RUN, &regs->hw_lcdif_ctrl_set);
}
+void lcdif_power_down()
+{
+ u32 val;
+ struct mxs_lcdif_regs *regs = (struct mxs_lcdif_regs *)(panel.isaBase);
+
+ writel(panel.frameAdrs, &regs->hw_lcdif_cur_buf);
+ writel(panel.frameAdrs, &regs->hw_lcdif_next_buf);
+
+ /* Stop lcdif */
+ val = LCDIF_CTRL_SFTRST | LCDIF_CTRL_CLKGATE;
+ writel(val, &regs->hw_lcdif_ctrl);
+}
+
void *video_hw_init(void)
{
int bpp = -1;
@@ -259,5 +285,10 @@ void *video_hw_init(void)
mxs_dma_circ_start(MXS_DMA_CHANNEL_AHB_APBH_LCDIF, &desc);
#endif
+#ifdef CONFIG_VIDEO_GIS
+ /* Entry for GIS */
+ mxc_enable_gis();
+#endif
+
return (void *)&panel;
}