aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2011-05-20 02:43:00 -0400
committerGrant Likely <grant.likely@secretlab.ca>2011-05-20 02:43:00 -0400
commit78fab4c04c76b8c9327541bd270f82b85b42bbf7 (patch)
treeb43006348a1ac15c28e6791d08646809761a2a4a /drivers/spi
parent3b8a4dd3ebfcc647260ad5c39ef4f73eb3a6b155 (diff)
parent61c4f2c81c61f73549928dfd9f3e8f26aa36a8cf (diff)
Merge commit 'v2.6.39' into spi/next
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/amba-pl022.c18
-rw-r--r--drivers/spi/au1550_spi.c2
-rw-r--r--drivers/spi/dw_spi.c4
-rw-r--r--drivers/spi/dw_spi.h2
-rw-r--r--drivers/spi/ep93xx_spi.c2
-rw-r--r--drivers/spi/pxa2xx_spi.c6
-rw-r--r--drivers/spi/spi.c2
-rw-r--r--drivers/spi/spi_bfin5xx.c4
-rw-r--r--drivers/spi/spi_fsl_espi.c2
9 files changed, 21 insertions, 21 deletions
diff --git a/drivers/spi/amba-pl022.c b/drivers/spi/amba-pl022.c
index 5a4e0afb9ad6..08de58e7f59f 100644
--- a/drivers/spi/amba-pl022.c
+++ b/drivers/spi/amba-pl022.c
@@ -661,7 +661,7 @@ static void readwriter(struct pl022 *pl022)
661{ 661{
662 662
663 /* 663 /*
664 * The FIFO depth is different inbetween primecell variants. 664 * The FIFO depth is different between primecell variants.
665 * I believe filling in too much in the FIFO might cause 665 * I believe filling in too much in the FIFO might cause
666 * errons in 8bit wide transfers on ARM variants (just 8 words 666 * errons in 8bit wide transfers on ARM variants (just 8 words
667 * FIFO, means only 8x8 = 64 bits in FIFO) at least. 667 * FIFO, means only 8x8 = 64 bits in FIFO) at least.
@@ -722,7 +722,7 @@ static void readwriter(struct pl022 *pl022)
722 * This inner reader takes care of things appearing in the RX 722 * This inner reader takes care of things appearing in the RX
723 * FIFO as we're transmitting. This will happen a lot since the 723 * FIFO as we're transmitting. This will happen a lot since the
724 * clock starts running when you put things into the TX FIFO, 724 * clock starts running when you put things into the TX FIFO,
725 * and then things are continously clocked into the RX FIFO. 725 * and then things are continuously clocked into the RX FIFO.
726 */ 726 */
727 while ((readw(SSP_SR(pl022->virtbase)) & SSP_SR_MASK_RNE) 727 while ((readw(SSP_SR(pl022->virtbase)) & SSP_SR_MASK_RNE)
728 && (pl022->rx < pl022->rx_end)) { 728 && (pl022->rx < pl022->rx_end)) {
@@ -842,7 +842,7 @@ static void dma_callback(void *data)
842 842
843 unmap_free_dma_scatter(pl022); 843 unmap_free_dma_scatter(pl022);
844 844
845 /* Update total bytes transfered */ 845 /* Update total bytes transferred */
846 msg->actual_length += pl022->cur_transfer->len; 846 msg->actual_length += pl022->cur_transfer->len;
847 if (pl022->cur_transfer->cs_change) 847 if (pl022->cur_transfer->cs_change)
848 pl022->cur_chip-> 848 pl022->cur_chip->
@@ -1224,7 +1224,7 @@ static irqreturn_t pl022_interrupt_handler(int irq, void *dev_id)
1224 "number of bytes on a 16bit bus?)\n", 1224 "number of bytes on a 16bit bus?)\n",
1225 (u32) (pl022->rx - pl022->rx_end)); 1225 (u32) (pl022->rx - pl022->rx_end));
1226 } 1226 }
1227 /* Update total bytes transfered */ 1227 /* Update total bytes transferred */
1228 msg->actual_length += pl022->cur_transfer->len; 1228 msg->actual_length += pl022->cur_transfer->len;
1229 if (pl022->cur_transfer->cs_change) 1229 if (pl022->cur_transfer->cs_change)
1230 pl022->cur_chip-> 1230 pl022->cur_chip->
@@ -1415,11 +1415,11 @@ static void do_polling_transfer(struct pl022 *pl022)
1415 SSP_CR1(pl022->virtbase)); 1415 SSP_CR1(pl022->virtbase));
1416 1416
1417 dev_dbg(&pl022->adev->dev, "polling transfer ongoing ...\n"); 1417 dev_dbg(&pl022->adev->dev, "polling transfer ongoing ...\n");
1418 /* FIXME: insert a timeout so we don't hang here indefinately */ 1418 /* FIXME: insert a timeout so we don't hang here indefinitely */
1419 while (pl022->tx < pl022->tx_end || pl022->rx < pl022->rx_end) 1419 while (pl022->tx < pl022->tx_end || pl022->rx < pl022->rx_end)
1420 readwriter(pl022); 1420 readwriter(pl022);
1421 1421
1422 /* Update total byte transfered */ 1422 /* Update total byte transferred */
1423 message->actual_length += pl022->cur_transfer->len; 1423 message->actual_length += pl022->cur_transfer->len;
1424 if (pl022->cur_transfer->cs_change) 1424 if (pl022->cur_transfer->cs_change)
1425 pl022->cur_chip->cs_control(SSP_CHIP_DESELECT); 1425 pl022->cur_chip->cs_control(SSP_CHIP_DESELECT);
@@ -1555,7 +1555,7 @@ static int stop_queue(struct pl022 *pl022)
1555 * A wait_queue on the pl022->busy could be used, but then the common 1555 * A wait_queue on the pl022->busy could be used, but then the common
1556 * execution path (pump_messages) would be required to call wake_up or 1556 * execution path (pump_messages) would be required to call wake_up or
1557 * friends on every SPI message. Do this instead */ 1557 * friends on every SPI message. Do this instead */
1558 while (!list_empty(&pl022->queue) && pl022->busy && limit--) { 1558 while ((!list_empty(&pl022->queue) || pl022->busy) && limit--) {
1559 spin_unlock_irqrestore(&pl022->queue_lock, flags); 1559 spin_unlock_irqrestore(&pl022->queue_lock, flags);
1560 msleep(10); 1560 msleep(10);
1561 spin_lock_irqsave(&pl022->queue_lock, flags); 1561 spin_lock_irqsave(&pl022->queue_lock, flags);
@@ -2129,7 +2129,7 @@ pl022_probe(struct amba_device *adev, const struct amba_id *id)
2129 "probe - problem registering spi master\n"); 2129 "probe - problem registering spi master\n");
2130 goto err_spi_register; 2130 goto err_spi_register;
2131 } 2131 }
2132 dev_dbg(dev, "probe succeded\n"); 2132 dev_dbg(dev, "probe succeeded\n");
2133 /* 2133 /*
2134 * Disable the silicon block pclk and any voltage domain and just 2134 * Disable the silicon block pclk and any voltage domain and just
2135 * power it up and clock it when it's needed 2135 * power it up and clock it when it's needed
@@ -2184,7 +2184,7 @@ pl022_remove(struct amba_device *adev)
2184 spi_unregister_master(pl022->master); 2184 spi_unregister_master(pl022->master);
2185 spi_master_put(pl022->master); 2185 spi_master_put(pl022->master);
2186 amba_set_drvdata(adev, NULL); 2186 amba_set_drvdata(adev, NULL);
2187 dev_dbg(&adev->dev, "remove succeded\n"); 2187 dev_dbg(&adev->dev, "remove succeeded\n");
2188 return 0; 2188 return 0;
2189} 2189}
2190 2190
diff --git a/drivers/spi/au1550_spi.c b/drivers/spi/au1550_spi.c
index 3c9ade69643f..b50563d320e1 100644
--- a/drivers/spi/au1550_spi.c
+++ b/drivers/spi/au1550_spi.c
@@ -480,7 +480,7 @@ static irqreturn_t au1550_spi_dma_irq_callback(struct au1550_spi *hw)
480 au1xxx_dbdma_stop(hw->dma_rx_ch); 480 au1xxx_dbdma_stop(hw->dma_rx_ch);
481 au1xxx_dbdma_stop(hw->dma_tx_ch); 481 au1xxx_dbdma_stop(hw->dma_tx_ch);
482 482
483 /* get number of transfered bytes */ 483 /* get number of transferred bytes */
484 hw->rx_count = hw->len - au1xxx_get_dma_residue(hw->dma_rx_ch); 484 hw->rx_count = hw->len - au1xxx_get_dma_residue(hw->dma_rx_ch);
485 hw->tx_count = hw->len - au1xxx_get_dma_residue(hw->dma_tx_ch); 485 hw->tx_count = hw->len - au1xxx_get_dma_residue(hw->dma_tx_ch);
486 486
diff --git a/drivers/spi/dw_spi.c b/drivers/spi/dw_spi.c
index 855ac4ae0f22..919fa9d9e16b 100644
--- a/drivers/spi/dw_spi.c
+++ b/drivers/spi/dw_spi.c
@@ -305,7 +305,7 @@ static void int_error_stop(struct dw_spi *dws, const char *msg)
305 305
306void dw_spi_xfer_done(struct dw_spi *dws) 306void dw_spi_xfer_done(struct dw_spi *dws)
307{ 307{
308 /* Update total byte transfered return count actual bytes read */ 308 /* Update total byte transferred return count actual bytes read */
309 dws->cur_msg->actual_length += dws->len; 309 dws->cur_msg->actual_length += dws->len;
310 310
311 /* Move to next transfer */ 311 /* Move to next transfer */
@@ -752,7 +752,7 @@ static int stop_queue(struct dw_spi *dws)
752 752
753 spin_lock_irqsave(&dws->lock, flags); 753 spin_lock_irqsave(&dws->lock, flags);
754 dws->run = QUEUE_STOPPED; 754 dws->run = QUEUE_STOPPED;
755 while (!list_empty(&dws->queue) && dws->busy && limit--) { 755 while ((!list_empty(&dws->queue) || dws->busy) && limit--) {
756 spin_unlock_irqrestore(&dws->lock, flags); 756 spin_unlock_irqrestore(&dws->lock, flags);
757 msleep(10); 757 msleep(10);
758 spin_lock_irqsave(&dws->lock, flags); 758 spin_lock_irqsave(&dws->lock, flags);
diff --git a/drivers/spi/dw_spi.h b/drivers/spi/dw_spi.h
index d8aac1f4c546..7a5e78d2a5cb 100644
--- a/drivers/spi/dw_spi.h
+++ b/drivers/spi/dw_spi.h
@@ -46,7 +46,7 @@
46#define SPI_INT_RXFI (1 << 4) 46#define SPI_INT_RXFI (1 << 4)
47#define SPI_INT_MSTI (1 << 5) 47#define SPI_INT_MSTI (1 << 5)
48 48
49/* TX RX interrupt level threshhold, max can be 256 */ 49/* TX RX interrupt level threshold, max can be 256 */
50#define SPI_INT_THRESHOLD 32 50#define SPI_INT_THRESHOLD 32
51 51
52enum dw_ssi_type { 52enum dw_ssi_type {
diff --git a/drivers/spi/ep93xx_spi.c b/drivers/spi/ep93xx_spi.c
index 0ba35df9a6df..d3570071e98f 100644
--- a/drivers/spi/ep93xx_spi.c
+++ b/drivers/spi/ep93xx_spi.c
@@ -512,7 +512,7 @@ static int ep93xx_spi_read_write(struct ep93xx_spi *espi)
512 * 512 *
513 * This function processes one SPI transfer given in @t. Function waits until 513 * This function processes one SPI transfer given in @t. Function waits until
514 * transfer is complete (may sleep) and updates @msg->status based on whether 514 * transfer is complete (may sleep) and updates @msg->status based on whether
515 * transfer was succesfully processed or not. 515 * transfer was successfully processed or not.
516 */ 516 */
517static void ep93xx_spi_process_transfer(struct ep93xx_spi *espi, 517static void ep93xx_spi_process_transfer(struct ep93xx_spi *espi,
518 struct spi_message *msg, 518 struct spi_message *msg,
diff --git a/drivers/spi/pxa2xx_spi.c b/drivers/spi/pxa2xx_spi.c
index a429b01d0285..dc25bee8d33f 100644
--- a/drivers/spi/pxa2xx_spi.c
+++ b/drivers/spi/pxa2xx_spi.c
@@ -700,7 +700,7 @@ static void int_transfer_complete(struct driver_data *drv_data)
700 if (!pxa25x_ssp_comp(drv_data)) 700 if (!pxa25x_ssp_comp(drv_data))
701 write_SSTO(0, reg); 701 write_SSTO(0, reg);
702 702
703 /* Update total byte transfered return count actual bytes read */ 703 /* Update total byte transferred return count actual bytes read */
704 drv_data->cur_msg->actual_length += drv_data->len - 704 drv_data->cur_msg->actual_length += drv_data->len -
705 (drv_data->rx_end - drv_data->rx); 705 (drv_data->rx_end - drv_data->rx);
706 706
@@ -759,7 +759,7 @@ static irqreturn_t interrupt_transfer(struct driver_data *drv_data)
759 759
760 /* 760 /*
761 * PXA25x_SSP has no timeout, set up rx threshould for the 761 * PXA25x_SSP has no timeout, set up rx threshould for the
762 * remaing RX bytes. 762 * remaining RX bytes.
763 */ 763 */
764 if (pxa25x_ssp_comp(drv_data)) { 764 if (pxa25x_ssp_comp(drv_data)) {
765 765
@@ -1493,7 +1493,7 @@ static int stop_queue(struct driver_data *drv_data)
1493 * execution path (pump_messages) would be required to call wake_up or 1493 * execution path (pump_messages) would be required to call wake_up or
1494 * friends on every SPI message. Do this instead */ 1494 * friends on every SPI message. Do this instead */
1495 drv_data->run = QUEUE_STOPPED; 1495 drv_data->run = QUEUE_STOPPED;
1496 while (!list_empty(&drv_data->queue) && drv_data->busy && limit--) { 1496 while ((!list_empty(&drv_data->queue) || drv_data->busy) && limit--) {
1497 spin_unlock_irqrestore(&drv_data->lock, flags); 1497 spin_unlock_irqrestore(&drv_data->lock, flags);
1498 msleep(10); 1498 msleep(10);
1499 spin_lock_irqsave(&drv_data->lock, flags); 1499 spin_lock_irqsave(&drv_data->lock, flags);
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 34bb17f03019..82b9a428c323 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -957,7 +957,7 @@ EXPORT_SYMBOL_GPL(spi_sync);
957 * drivers may DMA directly into and out of the message buffers. 957 * drivers may DMA directly into and out of the message buffers.
958 * 958 *
959 * This call should be used by drivers that require exclusive access to the 959 * This call should be used by drivers that require exclusive access to the
960 * SPI bus. It has to be preceeded by a spi_bus_lock call. The SPI bus must 960 * SPI bus. It has to be preceded by a spi_bus_lock call. The SPI bus must
961 * be released by a spi_bus_unlock call when the exclusive access is over. 961 * be released by a spi_bus_unlock call when the exclusive access is over.
962 * 962 *
963 * It returns zero on success, else a negative error code. 963 * It returns zero on success, else a negative error code.
diff --git a/drivers/spi/spi_bfin5xx.c b/drivers/spi/spi_bfin5xx.c
index a28462486df8..f706dba165cf 100644
--- a/drivers/spi/spi_bfin5xx.c
+++ b/drivers/spi/spi_bfin5xx.c
@@ -905,7 +905,7 @@ static void bfin_spi_pump_transfers(unsigned long data)
905 "IO write error!\n"); 905 "IO write error!\n");
906 message->state = ERROR_STATE; 906 message->state = ERROR_STATE;
907 } else { 907 } else {
908 /* Update total byte transfered */ 908 /* Update total byte transferred */
909 message->actual_length += drv_data->len_in_bytes; 909 message->actual_length += drv_data->len_in_bytes;
910 /* Move to next transfer of this msg */ 910 /* Move to next transfer of this msg */
911 message->state = bfin_spi_next_transfer(drv_data); 911 message->state = bfin_spi_next_transfer(drv_data);
@@ -1284,7 +1284,7 @@ static inline int bfin_spi_stop_queue(struct bfin_spi_master_data *drv_data)
1284 * friends on every SPI message. Do this instead 1284 * friends on every SPI message. Do this instead
1285 */ 1285 */
1286 drv_data->running = false; 1286 drv_data->running = false;
1287 while (!list_empty(&drv_data->queue) && drv_data->busy && limit--) { 1287 while ((!list_empty(&drv_data->queue) || drv_data->busy) && limit--) {
1288 spin_unlock_irqrestore(&drv_data->lock, flags); 1288 spin_unlock_irqrestore(&drv_data->lock, flags);
1289 msleep(10); 1289 msleep(10);
1290 spin_lock_irqsave(&drv_data->lock, flags); 1290 spin_lock_irqsave(&drv_data->lock, flags);
diff --git a/drivers/spi/spi_fsl_espi.c b/drivers/spi/spi_fsl_espi.c
index 900e921ab80e..496f895a0024 100644
--- a/drivers/spi/spi_fsl_espi.c
+++ b/drivers/spi/spi_fsl_espi.c
@@ -474,7 +474,7 @@ static int fsl_espi_setup(struct spi_device *spi)
474 mpc8xxx_spi = spi_master_get_devdata(spi->master); 474 mpc8xxx_spi = spi_master_get_devdata(spi->master);
475 reg_base = mpc8xxx_spi->reg_base; 475 reg_base = mpc8xxx_spi->reg_base;
476 476
477 hw_mode = cs->hw_mode; /* Save orginal settings */ 477 hw_mode = cs->hw_mode; /* Save original settings */
478 cs->hw_mode = mpc8xxx_spi_read_reg( 478 cs->hw_mode = mpc8xxx_spi_read_reg(
479 &reg_base->csmode[spi->chip_select]); 479 &reg_base->csmode[spi->chip_select]);
480 /* mask out bits we are going to set */ 480 /* mask out bits we are going to set */