mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Gregory CLEMENT <gregory.clement@free-electrons.com>
To: barebox <barebox@lists.infradead.org>
Subject: [PATCH 3/4] ARM STM/i.MX: Add possibility to select the data mode for stm video driver ( DCn signal is high )
Date: Tue, 04 Jan 2011 15:35:39 +0100	[thread overview]
Message-ID: <4D23303B.5040206@free-electrons.com> (raw)

At reset command mode of STM video controller is in command mode (DCn
signal is Low). This commit allow to use the data mode (DCn signal is
High). See explanations about bit 16 in HW_LCDIF_CTRL B in datasheet.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
---
 arch/arm/mach-stm/include/mach/fb.h |    1 +
 drivers/video/stm.c                 |    4 ++++
 2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-stm/include/mach/fb.h b/arch/arm/mach-stm/include/mach/fb.h
index da71f10..f899433 100644
--- a/arch/arm/mach-stm/include/mach/fb.h
+++ b/arch/arm/mach-stm/include/mach/fb.h
@@ -37,6 +37,7 @@ struct imx_fb_videomode {
 
 	unsigned dotclk_delay;	/**< refer manual HW_LCDIF_VDCTRL4 register */
 	unsigned ld_intf_width;	/**< refer STMLCDIF_* macros */
+	unsigned data_mode;
 	u32 bits_per_pixel;
 };
 
diff --git a/drivers/video/stm.c b/drivers/video/stm.c
index 5035cd0..3dc2abe 100644
--- a/drivers/video/stm.c
+++ b/drivers/video/stm.c
@@ -399,6 +399,10 @@ static int stmfb_activate_var(struct fb_info *fb_info)
 			fb_info->bits_per_pixel);
 		return -EINVAL;
 	}
+
+	if (pdata->data_mode)
+		reg |= CTRL_DATA_SELECT;
+
 	writel(reg, fbi->base + HW_LCDIF_CTRL);
 	pr_debug("Setting up CTRL to %08X\n", reg);
 
-- 
1.7.0.4




_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

                 reply	other threads:[~2011-01-04 14:35 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D23303B.5040206@free-electrons.com \
    --to=gregory.clement@free-electrons.com \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox