aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/sh_mipi_dsi.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2011-11-08 20:34:43 -0800
committerFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>2011-11-21 23:43:21 +0000
commit26c3d7ac219e74ab3939048a32d6bd3b4a16798a (patch)
treebc545725a8974969f56e9e159542a8a1129cd185 /drivers/video/sh_mipi_dsi.c
parentfbdev: sh_mipi_dsi: add SH_MIPI_DSI_BL2E flag (diff)
downloadlinux-dev-26c3d7ac219e74ab3939048a32d6bd3b4a16798a.tar.xz
linux-dev-26c3d7ac219e74ab3939048a32d6bd3b4a16798a.zip
fbdev: sh_mipi_dsi: add lane control support
SH MIPI DSI can use 0-4 lane Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Magnus Damm <damm@opensource.se> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Diffstat (limited to 'drivers/video/sh_mipi_dsi.c')
-rw-r--r--drivers/video/sh_mipi_dsi.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/video/sh_mipi_dsi.c b/drivers/video/sh_mipi_dsi.c
index dfd51541e24c..af6bec24effb 100644
--- a/drivers/video/sh_mipi_dsi.c
+++ b/drivers/video/sh_mipi_dsi.c
@@ -8,6 +8,7 @@
* published by the Free Software Foundation.
*/
+#include <linux/bitmap.h>
#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/init.h>
@@ -153,6 +154,7 @@ static int __init sh_mipi_setup(struct sh_mipi *mipi,
struct sh_mobile_lcdc_chan_cfg *ch = pdata->lcd_chan;
u32 pctype, datatype, pixfmt, linelength, vmctr2 = 0x00e00000;
bool yuv;
+ u32 tmp;
/*
* Select data format. MIPI DSI is not hot-pluggable, so, we just use
@@ -253,6 +255,9 @@ static int __init sh_mipi_setup(struct sh_mipi *mipi,
(!yuv && ch->interface_type != RGB24))
return -EINVAL;
+ if (!pdata->lane)
+ return -EINVAL;
+
/* reset DSI link */
iowrite32(0x00000001, base + SYSCTRL);
/* Hold reset for 100 cycles of the slowest of bus, HS byte and LP clock */
@@ -269,7 +274,10 @@ static int __init sh_mipi_setup(struct sh_mipi *mipi,
* ECC check enable
* additionally enable first two lanes
*/
- iowrite32(0x00003703, base + SYSCONF);
+ bitmap_fill((unsigned long *)&tmp, pdata->lane);
+ tmp |= 0x00003700;
+ iowrite32(tmp, base + SYSCONF);
+
/*
* T_wakeup = 0x7000
* T_hs-trail = 3