Skip to content
Snippets Groups Projects
Commit 9de4b729 authored by Marek Vasut's avatar Marek Vasut Committed by Anatolij Gustschin
Browse files

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: default avatarMarek Vasut <marex@denx.de>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Stefano Babic <sbabic@denx.de>
parent e57baf5d
No related branches found
No related tags found
No related merge requests found
...@@ -21,6 +21,17 @@ ...@@ -21,6 +21,17 @@
static GraphicDevice panel; 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: * DENX M28EVK:
* setenv videomode * setenv videomode
...@@ -75,6 +86,9 @@ static void mxs_lcd_init(GraphicDevice *panel, ...@@ -75,6 +86,9 @@ static void mxs_lcd_init(GraphicDevice *panel,
writel(valid_data << LCDIF_CTRL1_BYTE_PACKING_FORMAT_OFFSET, writel(valid_data << LCDIF_CTRL1_BYTE_PACKING_FORMAT_OFFSET,
&regs->hw_lcdif_ctrl1); &regs->hw_lcdif_ctrl1);
mxsfb_system_setup();
writel((mode->yres << LCDIF_TRANSFER_COUNT_V_COUNT_OFFSET) | mode->xres, writel((mode->yres << LCDIF_TRANSFER_COUNT_V_COUNT_OFFSET) | mode->xres,
&regs->hw_lcdif_transfer_count); &regs->hw_lcdif_transfer_count);
...@@ -102,8 +116,10 @@ static void mxs_lcd_init(GraphicDevice *panel, ...@@ -102,8 +116,10 @@ static void mxs_lcd_init(GraphicDevice *panel,
/* Flush FIFO first */ /* Flush FIFO first */
writel(LCDIF_CTRL1_FIFO_CLEAR, &regs->hw_lcdif_ctrl1_set); writel(LCDIF_CTRL1_FIFO_CLEAR, &regs->hw_lcdif_ctrl1_set);
#ifndef CONFIG_VIDEO_MXS_MODE_SYSTEM
/* Sync signals ON */ /* Sync signals ON */
setbits_le32(&regs->hw_lcdif_vdctrl4, LCDIF_VDCTRL4_SYNC_SIGNALS_ON); setbits_le32(&regs->hw_lcdif_vdctrl4, LCDIF_VDCTRL4_SYNC_SIGNALS_ON);
#endif
/* FIFO cleared */ /* FIFO cleared */
writel(LCDIF_CTRL1_FIFO_CLEAR, &regs->hw_lcdif_ctrl1_clr); writel(LCDIF_CTRL1_FIFO_CLEAR, &regs->hw_lcdif_ctrl1_clr);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment