summaryrefslogtreecommitdiff
path: root/drivers/video/mxsfb.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2015-11-16 08:35:38 -0500
committerTom Rini <trini@konsulko.com>2015-11-16 08:35:38 -0500
commit98e73c834467ef6f1d3e9a8102745e16b3128ac1 (patch)
treea73931f3865dea561750d6a738dbd1738ba8c666 /drivers/video/mxsfb.c
parent618a51e9aefe1e03f498ea48bfab70a0b2c9be39 (diff)
parentec26c1eef735befb7011c24e08e6310ab6dc9be6 (diff)
Merge branch 'master' of git://www.denx.de/git/u-boot-imx
Diffstat (limited to 'drivers/video/mxsfb.c')
-rw-r--r--drivers/video/mxsfb.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c
index 03b0f88acf..ddbb118d70 100644
--- a/drivers/video/mxsfb.c
+++ b/drivers/video/mxsfb.c
@@ -55,7 +55,7 @@ static void mxs_lcd_init(GraphicDevice *panel,
uint8_t valid_data = 0;
/* Kick in the LCDIF clock */
- mxs_set_lcdclk(PS2KHZ(mode->pixclock));
+ mxs_set_lcdclk(MXS_LCDIF_BASE, PS2KHZ(mode->pixclock));
/* Restart the LCDIF block */
mxs_reset_block(&regs->hw_lcdif_ctrl_reg);
@@ -131,6 +131,23 @@ static void mxs_lcd_init(GraphicDevice *panel,
writel(LCDIF_CTRL_RUN, &regs->hw_lcdif_ctrl_set);
}
+void lcdif_power_down(void)
+{
+ struct mxs_lcdif_regs *regs = (struct mxs_lcdif_regs *)MXS_LCDIF_BASE;
+ int timeout = 1000000;
+
+ writel(panel.frameAdrs, &regs->hw_lcdif_cur_buf_reg);
+ writel(panel.frameAdrs, &regs->hw_lcdif_next_buf_reg);
+ writel(LCDIF_CTRL1_VSYNC_EDGE_IRQ, &regs->hw_lcdif_ctrl1_clr);
+ while (--timeout) {
+ if (readl(&regs->hw_lcdif_ctrl1_reg) &
+ LCDIF_CTRL1_VSYNC_EDGE_IRQ)
+ break;
+ udelay(1);
+ }
+ mxs_reset_block((struct mxs_register_32 *)&regs->hw_lcdif_ctrl_reg);
+}
+
void *video_hw_init(void)
{
int bpp = -1;