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 v2] spi:spi_bfin5xx: SPI SSEL deasserted too early in soft irq mode.
Date: Fri, 12 Aug 2011 10:48:53 +0800 [thread overview]
Message-ID: <1313117333-26763-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 | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/drivers/spi/spi-bfin5xx.c b/drivers/spi/spi-bfin5xx.c
index b8d25f2..7e03e7d 100644
--- a/drivers/spi/spi-bfin5xx.c
+++ b/drivers/spi/spi-bfin5xx.c
@@ -587,6 +587,7 @@ static void bfin_spi_pump_transfers(unsigned long data)
if (message->state == DONE_STATE) {
dev_dbg(&drv_data->pdev->dev, "transfer: all done!\n");
message->status = 0;
+ bfin_spi_flush(drv_data);
bfin_spi_giveback(drv_data);
return;
}
@@ -870,8 +871,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
next reply other threads:[~2011-08-12 2:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-12 2:48 Sonic Zhang [this message]
2011-08-23 8:16 ` [PATCH v2] spi:spi_bfin5xx: SPI SSEL deasserted too early in soft irq mode Sonic Zhang
[not found] ` <1313117333-26763-1-git-send-email-sonic.adi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2011-09-01 12:52 ` [uclinux-dist-devel] " Barry Song
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=1313117333-26763-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).