Message ID | 1313117333-26763-1-git-send-email-sonic.adi@gmail.com (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show |
Hi Grant, Any comments? Sonic Zhang On Fri, Aug 12, 2011 at 10:48 AM, Sonic Zhang <sonic.adi@gmail.com> wrote: > 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 > > > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ > ------------------------------------------------------------------------------ Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
2011/8/12 Sonic Zhang <sonic.adi@gmail.com>: > 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> Acked-by: Barry Song <21cnbao@gmail.com> it is actually making sure the last message is finished. > --- > 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 > > > _______________________________________________ > Uclinux-dist-devel mailing list > Uclinux-dist-devel@blackfin.uclinux.org > https://blackfin.uclinux.org/mailman/listinfo/uclinux-dist-devel ------------------------------------------------------------------------------ Special Offer -- Download ArcSight Logger for FREE! Finally, a world-class log management solution at an even better price-free! And you'll get a free "Love Thy Logs" t-shirt when you download Logger. Secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsisghtdev2dev
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 */