diff options
author | Daniel Mierswa <d.mierswa@phytec.de> | 2013-01-17 07:32:57 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2013-01-17 19:02:42 +0100 |
commit | 0f7bff88f023aeeae6ded9c351600d7ced46103c (patch) | |
tree | 02312814e1958f52c5d2ccab170ce217bb0c3d99 /drivers/video | |
parent | 1d37166cb2d4d11ea08a3566c6ceb6585c276f96 (diff) | |
download | barebox-0f7bff88f023aeeae6ded9c351600d7ced46103c.tar.gz barebox-0f7bff88f023aeeae6ded9c351600d7ced46103c.tar.xz |
i.MX21/27: don't enable lcd bus clocks too early
On the MX27 based board phycard-i.MX27 the display won't properly
come up.
Before removing imx-regs.h and the code that sets the register
in the i.MX video driver, the PCCR registers were set _after_
the screen start (LSSAR) was set.
This restores that old behaviour and makes the display come up
properly again.
I did not have a chance to test this on any other i.MX27 or i.MX21
hardware though I assume that the "old" order is required there
too.
Signed-off-by: Daniel Mierswa <d.mierswa@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/imx.c | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/drivers/video/imx.c b/drivers/video/imx.c index 39ecf6ae9f..a1ccf0aec8 100644 --- a/drivers/video/imx.c +++ b/drivers/video/imx.c @@ -138,7 +138,10 @@ struct imxfb_rgb { struct imxfb_info { void __iomem *regs; - struct clk *clk; + + struct clk *ahb_clk; + struct clk *ipg_clk; + struct clk *per_clk; u_int pcr; u_int pwmr; @@ -252,7 +255,9 @@ static void imxfb_enable_controller(struct fb_info *info) writel(RMCR_LCDC_EN, fbi->regs + LCDC_RMCR); - clk_enable(fbi->clk); + clk_enable(fbi->ahb_clk); + clk_enable(fbi->ipg_clk); + clk_enable(fbi->per_clk); if (fbi->enable) fbi->enable(1); @@ -267,7 +272,9 @@ static void imxfb_disable_controller(struct fb_info *info) writel(0, fbi->regs + LCDC_RMCR); - clk_disable(fbi->clk); + clk_disable(fbi->per_clk); + clk_disable(fbi->ipg_clk); + clk_disable(fbi->ahb_clk); } /* @@ -321,7 +328,7 @@ static int imxfb_activate_var(struct fb_info *info) writel(readl(fbi->regs + LCDC_CPOS) & ~(CPOS_CC0 | CPOS_CC1), fbi->regs + LCDC_CPOS); - lcd_clk = clk_get_rate(fbi->clk); + lcd_clk = clk_get_rate(fbi->per_clk); tmp = mode->pixclock * (unsigned long long)lcd_clk; @@ -531,9 +538,17 @@ static int imxfb_probe(struct device_d *dev) fbi = xzalloc(sizeof(*fbi)); info = &fbi->info; - fbi->clk = clk_get(dev, NULL); - if (IS_ERR(fbi->clk)) - return PTR_ERR(fbi->clk); + fbi->per_clk = clk_get(dev, NULL); + if (IS_ERR(fbi->per_clk)) + return PTR_ERR(fbi->per_clk); + + fbi->ahb_clk = clk_get(dev, "ahb"); + if (IS_ERR(fbi->ahb_clk)) + return PTR_ERR(fbi->ahb_clk); + + fbi->ipg_clk = clk_get(dev, "ipg"); + if (IS_ERR(fbi->ipg_clk)) + return PTR_ERR(fbi->ipg_clk); fbi->mode = pdata->mode; fbi->regs = dev_request_mem_region(dev, 0); |