summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorWu, Josh <Josh.wu@atmel.com>2014-05-19 19:51:27 +0800
committerAndreas Bießmann <andreas.devel@googlemail.com>2014-06-14 18:07:02 +0200
commitb137bd8c8d75062719c2fe2880205f8b707a89a8 (patch)
tree540a04b9550554e99cd3aee75d32cd7a74fe5663 /drivers
parent5ae0e38278ad3becfc9a0a6bfc5ab8c531ccd621 (diff)
downloadu-boot-imx-b137bd8c8d75062719c2fe2880205f8b707a89a8.zip
u-boot-imx-b137bd8c8d75062719c2fe2880205f8b707a89a8.tar.gz
u-boot-imx-b137bd8c8d75062719c2fe2880205f8b707a89a8.tar.bz2
video: atmel_hlcdfb: enable dcache support
To support dcache, we need flush DMA descriptor buffer before enable lcd DMA. Also we need call lcd_set_flush_dcache(1) to make lcd driver flush the lcd buffer if there is any change. Cc: Anatolij Gustschin <agust@denx.de> Signed-off-by: Josh Wu <josh.wu@atmel.com> Acked-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/atmel_hlcdfb.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/video/atmel_hlcdfb.c b/drivers/video/atmel_hlcdfb.c
index bb4d7d8..935ae42 100644
--- a/drivers/video/atmel_hlcdfb.c
+++ b/drivers/video/atmel_hlcdfb.c
@@ -171,6 +171,9 @@ void lcd_ctrl_init(void *lcdbase)
| LCDC_BASECTRL_DMAIEN | LCDC_BASECTRL_DFETCH;
desc->next = (u32)desc;
+ /* Flush the DMA descriptor if we enabled dcache */
+ flush_dcache_range((u32)desc, (u32)desc + sizeof(*desc));
+
lcdc_writel(&regs->lcdc_baseaddr, desc->address);
lcdc_writel(&regs->lcdc_basectrl, desc->control);
lcdc_writel(&regs->lcdc_basenext, desc->next);
@@ -194,4 +197,7 @@ void lcd_ctrl_init(void *lcdbase)
lcdc_writel(&regs->lcdc_lcden, value | LCDC_LCDEN_PWMEN);
while (!(lcdc_readl(&regs->lcdc_lcdsr) & LCDC_LCDSR_PWMSTS))
udelay(1);
+
+ /* Enable flushing if we enabled dcache */
+ lcd_set_flush_dcache(1);
}