summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorYe.Li <B37916@freescale.com>2015-03-26 15:41:52 +0800
committerPeng Fan <Peng.Fan@freescale.com>2015-04-29 15:04:25 +0800
commitd6d1666c68edd93c1c1bc9b738850f6eeba01bdb (patch)
treedb9b535384673caef2f35829fd62457177243566 /drivers
parente99a85de7370f0630ce507ea4399fdcde42da146 (diff)
downloadu-boot-imx-d6d1666c68edd93c1c1bc9b738850f6eeba01bdb.zip
u-boot-imx-d6d1666c68edd93c1c1bc9b738850f6eeba01bdb.tar.gz
u-boot-imx-d6d1666c68edd93c1c1bc9b738850f6eeba01bdb.tar.bz2
MLK-10478 mx6: EPDC: Improve EPDC usage and configuration
Change to load EPDC waveform from FAT partition and allocate waveform buffer, framebuffer and working buffer in dynamic manner not static. So many EPDC configurations are removed. To enable the EPDC feature, must define CONFIG_MXC_EPDC and CONFIG_SPLASH_SCREEN. Signed-off-by: Ye.Li <B37916@freescale.com> (cherry picked from commit 4d55a4124be3a3a6288c3c845d17fd9d4f2b8b43) Conflicts: include/configs/mx6slevk.h
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/mxc_epdc_fb.c24
1 files changed, 21 insertions, 3 deletions
diff --git a/drivers/video/mxc_epdc_fb.c b/drivers/video/mxc_epdc_fb.c
index 5a400e1..cd18058 100644
--- a/drivers/video/mxc_epdc_fb.c
+++ b/drivers/video/mxc_epdc_fb.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2014 Freescale Semiconductor, Inc. All Rights Reserved.
+ * Copyright (C) 2010-2015 Freescale Semiconductor, Inc. All Rights Reserved.
*
* SPDX-License-Identifier: GPL-2.0+
*/
@@ -13,6 +13,7 @@
#include <linux/list.h>
#include <linux/err.h>
#include <linux/types.h>
+#include <malloc.h>
#include <mxc_epdc_fb.h>
@@ -353,7 +354,6 @@ void lcd_enable(void)
epdc_power_on();
- lcd_base = (void *)CONFIG_FB_BASE;
/* Draw black border around framebuffer*/
memset(lcd_base, 0xFF, panel_info.vl_col * panel_info.vl_row);
memset(lcd_base, 0x0, 24 * panel_info.vl_col);
@@ -397,6 +397,22 @@ void lcd_ctrl_init(void *lcdbase)
if (!lcdbase)
return;
+ panel_info.epdc_data.working_buf_addr = (u_long)memalign(ARCH_DMA_MINALIGN,
+ panel_info.vl_col * panel_info.vl_row * 2);
+
+ if (!panel_info.epdc_data.working_buf_addr) {
+ printf("EPDC: Error allocating working buffer!\n");
+ return;
+ }
+
+ panel_info.epdc_data.waveform_buf_addr = (u_long)memalign(ARCH_DMA_MINALIGN,
+ CONFIG_WAVEFORM_BUF_SIZE);
+
+ if (!panel_info.epdc_data.waveform_buf_addr) {
+ printf("EPDC: Error allocating waveform buffer!\n");
+ return;
+ }
+
lcd_color_fg = 0xFF;
lcd_color_bg = 0xFF;
@@ -431,7 +447,7 @@ void lcd_ctrl_init(void *lcdbase)
REG_WR(EPDC_BASE, EPDC_WB_ADDR_TCE, panel_info.epdc_data.working_buf_addr);
/* Get waveform data address and offset */
- if (setup_waveform_file()) {
+ if (setup_waveform_file(panel_info.epdc_data.waveform_buf_addr)) {
printf("Can't load waveform data!\n");
return;
}
@@ -443,6 +459,8 @@ void lcd_ctrl_init(void *lcdbase)
/* Initialize EPDC, passing pointer to EPDC registers */
epdc_init_settings();
+ lcd_base = lcdbase;
+
return;
}