From: Sonic Zhang <sonic.adi@gmail.com>
To: Grant Likely <grant.likely@secretlab.ca>
Cc: <spi-devel-general@lists.sourceforge.net>,
LKML <linux-kernel@vger.kernel.org>,
<uclinux-dist-devel@blackfin.uclinux.org>,
Sonic Zhang <sonic.zhang@analog.com>
Subject: [PATCH] spi:spi_bfin5xx: SPI SSEL deasserted too early in soft irq mode.
Date: Thu, 11 Aug 2011 18:49:21 +0800 [thread overview]
Message-ID: <1313059761-24703-1-git-send-email-sonic.adi@gmail.com> (raw)
From: Sonic Zhang <sonic.zhang@analog.com>
Poll the FIFO till it is empty before deassert SSEL in pump_transfers in
soft irq mode. No polling is necessary in interrupt mode and error handling.
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
---
drivers/spi/spi-bfin5xx.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/spi/spi-bfin5xx.c b/drivers/spi/spi-bfin5xx.c
index b8d25f2..b9e7e4d 100644
--- a/drivers/spi/spi-bfin5xx.c
+++ b/drivers/spi/spi-bfin5xx.c
@@ -870,8 +870,10 @@ static void bfin_spi_pump_transfers(unsigned long data)
message->actual_length += drv_data->len_in_bytes;
/* Move to next transfer of this msg */
message->state = bfin_spi_next_transfer(drv_data);
- if (drv_data->cs_change)
+ if (drv_data->cs_change) {
+ bfin_spi_flush(drv_data);
bfin_spi_cs_deactive(drv_data, chip);
+ }
}
/* Schedule next transfer tasklet */
--
1.7.0.4
reply other threads:[~2011-08-11 10:49 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=1313059761-24703-1-git-send-email-sonic.adi@gmail.com \
--to=sonic.adi@gmail.com \
--cc=grant.likely@secretlab.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=sonic.zhang@analog.com \
--cc=spi-devel-general@lists.sourceforge.net \
--cc=uclinux-dist-devel@blackfin.uclinux.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;
as well as URLs for NNTP newsgroup(s).