From 9de4b729eb42dab9ed35ab7079d7d2a9241b0d07 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Tue, 30 Jul 2013 23:37:53 +0200 Subject: [PATCH] video: Add System-Mode configuration hook into mxsfb Add hook that allow configuring SmartLCD attached the MXS LCDIF controller operating in System-Mode. This hook can be overriden by a platform-specific SmartLCD programming routine, which writes the SmartLCD specific values into it's registers. Also, this patch makes sure the SYNC signals are off for the SmartLCD case. Signed-off-by: Marek Vasut Cc: Anatolij Gustschin Cc: Fabio Estevam Cc: Otavio Salvador Cc: Stefano Babic --- drivers/video/mxsfb.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c index 374c823d06..c55cb44ffd 100644 --- a/drivers/video/mxsfb.c +++ b/drivers/video/mxsfb.c @@ -21,6 +21,17 @@ static GraphicDevice panel; +/** + * mxsfb_system_setup() - Fine-tune LCDIF configuration + * + * This function is used to adjust the LCDIF configuration. This is usually + * needed when driving the controller in System-Mode to operate an 8080 or + * 6800 connected SmartLCD. + */ +__weak void mxsfb_system_setup(void) +{ +} + /* * DENX M28EVK: * setenv videomode @@ -75,6 +86,9 @@ static void mxs_lcd_init(GraphicDevice *panel, writel(valid_data << LCDIF_CTRL1_BYTE_PACKING_FORMAT_OFFSET, ®s->hw_lcdif_ctrl1); + + mxsfb_system_setup(); + writel((mode->yres << LCDIF_TRANSFER_COUNT_V_COUNT_OFFSET) | mode->xres, ®s->hw_lcdif_transfer_count); @@ -102,8 +116,10 @@ static void mxs_lcd_init(GraphicDevice *panel, /* Flush FIFO first */ writel(LCDIF_CTRL1_FIFO_CLEAR, ®s->hw_lcdif_ctrl1_set); +#ifndef CONFIG_VIDEO_MXS_MODE_SYSTEM /* Sync signals ON */ setbits_le32(®s->hw_lcdif_vdctrl4, LCDIF_VDCTRL4_SYNC_SIGNALS_ON); +#endif /* FIFO cleared */ writel(LCDIF_CTRL1_FIFO_CLEAR, ®s->hw_lcdif_ctrl1_clr); -- 2.39.5