9
0
Fork 0

imxfb: Add board specific hook to enable display

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Sascha Hauer 2010-06-16 14:49:33 +02:00
parent 6c5f1c0fdf
commit 695a4247aa
2 changed files with 9 additions and 0 deletions

View File

@ -74,6 +74,8 @@ struct imx_fb_platform_data {
void *framebuffer;
/** force a memory area to be used, else NULL for dynamic allocation */
void *framebuffer_ovl;
/** hook to enable backlight and stuff */
void (*enable)(int enable);
};
void set_imx_fb_info(struct imx_fb_platform_data *);

View File

@ -152,6 +152,7 @@ struct imxfb_info {
struct fb_info info;
struct device_d *dev;
void (*enable)(int enable);
struct fb_info overlay;
};
@ -262,12 +263,17 @@ static void imxfb_enable_controller(struct fb_info *info)
writel(readl(IMX_CCM_BASE + CCM_CGCR1) | (1 << 29),
IMX_CCM_BASE + CCM_CGCR1);
#endif
if (fbi->enable)
fbi->enable(1);
}
static void imxfb_disable_controller(struct fb_info *info)
{
struct imxfb_info *fbi = info->priv;
if (fbi->enable)
fbi->enable(0);
writel(0, fbi->regs + LCDC_RMCR);
#ifdef CONFIG_ARCH_IMX21
PCCR0 &= ~(PCCR0_PERCLK3_EN | PCCR0_HCLK_LCDC_EN);
@ -546,6 +552,7 @@ static int imxfb_probe(struct device_d *dev)
fbi->pwmr = pdata->pwmr;
fbi->lscr1 = pdata->lscr1;
fbi->dmacr = pdata->dmacr;
fbi->enable = pdata->enable;
fbi->dev = dev;
info->priv = fbi;
info->mode = &pdata->mode->mode;