aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-pxa2xx.c
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-10-25 04:51:21 -0400
committerMark Brown <broonie@linaro.org>2013-10-25 04:51:21 -0400
commit2ef2e60d2f4d470b0cb591baeaf942316c0673ed (patch)
treed70316198ee16e96d84d75ddcb5e7d74124b1efd /drivers/spi/spi-pxa2xx.c
parentc55b869ac49587290f24cb5c8a4e7023c90dfb3f (diff)
parent543c954d6807ad0682c37846b7b9c423cd941415 (diff)
Merge remote-tracking branch 'spi/topic/atmel' into spi-next
Diffstat (limited to 'drivers/spi/spi-pxa2xx.c')
-rw-r--r--drivers/spi/spi-pxa2xx.c36
1 files changed, 16 insertions, 20 deletions
diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c
index c1a50674c1e3..64e1682c39b1 100644
--- a/drivers/spi/spi-pxa2xx.c
+++ b/drivers/spi/spi-pxa2xx.c
@@ -573,8 +573,8 @@ static irqreturn_t ssp_int(int irq, void *dev_id)
573 write_SSTO(0, reg); 573 write_SSTO(0, reg);
574 write_SSSR_CS(drv_data, drv_data->clear_sr); 574 write_SSSR_CS(drv_data, drv_data->clear_sr);
575 575
576 dev_err(&drv_data->pdev->dev, "bad message state " 576 dev_err(&drv_data->pdev->dev,
577 "in interrupt handler\n"); 577 "bad message state in interrupt handler\n");
578 578
579 /* Never fail */ 579 /* Never fail */
580 return IRQ_HANDLED; 580 return IRQ_HANDLED;
@@ -651,8 +651,8 @@ static void pump_transfers(unsigned long data)
651 if (message->is_dma_mapped 651 if (message->is_dma_mapped
652 || transfer->rx_dma || transfer->tx_dma) { 652 || transfer->rx_dma || transfer->tx_dma) {
653 dev_err(&drv_data->pdev->dev, 653 dev_err(&drv_data->pdev->dev,
654 "pump_transfers: mapped transfer length " 654 "pump_transfers: mapped transfer length of "
655 "of %u is greater than %d\n", 655 "%u is greater than %d\n",
656 transfer->len, MAX_DMA_LEN); 656 transfer->len, MAX_DMA_LEN);
657 message->status = -EINVAL; 657 message->status = -EINVAL;
658 giveback(drv_data); 658 giveback(drv_data);
@@ -660,11 +660,10 @@ static void pump_transfers(unsigned long data)
660 } 660 }
661 661
662 /* warn ... we force this to PIO mode */ 662 /* warn ... we force this to PIO mode */
663 if (printk_ratelimit()) 663 dev_warn_ratelimited(&message->spi->dev,
664 dev_warn(&message->spi->dev, "pump_transfers: " 664 "pump_transfers: DMA disabled for transfer length %ld "
665 "DMA disabled for transfer length %ld " 665 "greater than %d\n",
666 "greater than %d\n", 666 (long)drv_data->len, MAX_DMA_LEN);
667 (long)drv_data->len, MAX_DMA_LEN);
668 } 667 }
669 668
670 /* Setup the transfer state based on the type of transfer */ 669 /* Setup the transfer state based on the type of transfer */
@@ -726,11 +725,8 @@ static void pump_transfers(unsigned long data)
726 message->spi, 725 message->spi,
727 bits, &dma_burst, 726 bits, &dma_burst,
728 &dma_thresh)) 727 &dma_thresh))
729 if (printk_ratelimit()) 728 dev_warn_ratelimited(&message->spi->dev,
730 dev_warn(&message->spi->dev, 729 "pump_transfers: DMA burst size reduced to match bits_per_word\n");
731 "pump_transfers: "
732 "DMA burst size reduced to "
733 "match bits_per_word\n");
734 } 730 }
735 731
736 cr0 = clk_div 732 cr0 = clk_div
@@ -854,8 +850,8 @@ static int setup_cs(struct spi_device *spi, struct chip_data *chip,
854 if (gpio_is_valid(chip_info->gpio_cs)) { 850 if (gpio_is_valid(chip_info->gpio_cs)) {
855 err = gpio_request(chip_info->gpio_cs, "SPI_CS"); 851 err = gpio_request(chip_info->gpio_cs, "SPI_CS");
856 if (err) { 852 if (err) {
857 dev_err(&spi->dev, "failed to request chip select " 853 dev_err(&spi->dev, "failed to request chip select GPIO%d\n",
858 "GPIO%d\n", chip_info->gpio_cs); 854 chip_info->gpio_cs);
859 return err; 855 return err;
860 } 856 }
861 857
@@ -899,8 +895,8 @@ static int setup(struct spi_device *spi)
899 895
900 if (drv_data->ssp_type == CE4100_SSP) { 896 if (drv_data->ssp_type == CE4100_SSP) {
901 if (spi->chip_select > 4) { 897 if (spi->chip_select > 4) {
902 dev_err(&spi->dev, "failed setup: " 898 dev_err(&spi->dev,
903 "cs number must not be > 4.\n"); 899 "failed setup: cs number must not be > 4.\n");
904 kfree(chip); 900 kfree(chip);
905 return -EINVAL; 901 return -EINVAL;
906 } 902 }
@@ -956,8 +952,8 @@ static int setup(struct spi_device *spi)
956 spi->bits_per_word, 952 spi->bits_per_word,
957 &chip->dma_burst_size, 953 &chip->dma_burst_size,
958 &chip->dma_threshold)) { 954 &chip->dma_threshold)) {
959 dev_warn(&spi->dev, "in setup: DMA burst size reduced " 955 dev_warn(&spi->dev,
960 "to match bits_per_word\n"); 956 "in setup: DMA burst size reduced to match bits_per_word\n");
961 } 957 }
962 } 958 }
963 959