public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Grazvydas Ignotas <notasas@gmail.com>
To: linux-omap@vger.kernel.org
Cc: Grazvydas Ignotas <notasas@gmail.com>
Subject: Re: omap3evm LCD red-tint workaround
Date: Sun,  2 Nov 2008 21:56:19 +0200	[thread overview]
Message-ID: <1225655779-18934-1-git-send-email-notasas@gmail.com> (raw)
In-Reply-To: <57322719-1A5A-45DC-9846-5C0A3B6EF346@student.utwente.nl>

> PS: TS is still unusable with the 16x16 pixel resolution
This is also the case for Pandora. The patch below fixes the problem,
but as I have no other boards to test this on, I haven't sent it.
See if it helps you.


>From 91f3af26bbf751b846e6265d86387e81be7c1364 Mon Sep 17 00:00:00 2001
From: Grazvydas Ignotas <notasas@gmail.com>
Date: Tue, 28 Oct 2008 22:01:42 +0200
Subject: [PATCH] OMAP3: fix McSPI transfers

Currently on OMAP3 if both write and read is set up for a transfer,
the first byte returned on read is corrupted. Work around this by
disabling channel between reads and writes, instead of transfers.
---
 drivers/spi/omap2_mcspi.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/spi/omap2_mcspi.c b/drivers/spi/omap2_mcspi.c
index 454a271..4890b6c 100644
--- a/drivers/spi/omap2_mcspi.c
+++ b/drivers/spi/omap2_mcspi.c
@@ -710,7 +710,6 @@ static void omap2_mcspi_work(struct work_struct *work)
 		spi = m->spi;
 		cs = spi->controller_state;
 
-		omap2_mcspi_set_enable(spi, 1);
 		list_for_each_entry(t, &m->transfers, transfer_list) {
 			if (t->tx_buf == NULL && t->rx_buf == NULL && t->len) {
 				status = -EINVAL;
@@ -741,6 +740,8 @@ static void omap2_mcspi_work(struct work_struct *work)
 			if (t->len) {
 				unsigned	count;
 
+				omap2_mcspi_set_enable(spi, 1);
+
 				/* RX_ONLY mode needs dummy data in TX reg */
 				if (t->tx_buf == NULL)
 					__raw_writel(0, cs->base
@@ -752,6 +753,8 @@ static void omap2_mcspi_work(struct work_struct *work)
 					count = omap2_mcspi_txrx_pio(spi, t);
 				m->actual_length += count;
 
+				omap2_mcspi_set_enable(spi, 0);
+
 				if (count != t->len) {
 					status = -EIO;
 					break;
@@ -777,8 +780,6 @@ static void omap2_mcspi_work(struct work_struct *work)
 		if (cs_active)
 			omap2_mcspi_force_cs(spi, 0);
 
-		omap2_mcspi_set_enable(spi, 0);
-
 		m->status = status;
 		m->complete(m->context);
 
-- 
1.5.4.3


  reply	other threads:[~2008-11-02 19:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-02 17:37 omap3evm LCD red-tint workaround Koen Kooi
2008-11-02 19:56 ` Grazvydas Ignotas [this message]
2008-11-02 22:00   ` Koen Kooi
2008-11-26 17:30     ` Tony Lindgren

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=1225655779-18934-1-git-send-email-notasas@gmail.com \
    --to=notasas@gmail.com \
    --cc=linux-omap@vger.kernel.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