diff options
author | Mark Brown <broonie@linaro.org> | 2013-10-25 04:51:21 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-10-25 04:51:21 -0400 |
commit | 2ef2e60d2f4d470b0cb591baeaf942316c0673ed (patch) | |
tree | d70316198ee16e96d84d75ddcb5e7d74124b1efd /drivers | |
parent | c55b869ac49587290f24cb5c8a4e7023c90dfb3f (diff) | |
parent | 543c954d6807ad0682c37846b7b9c423cd941415 (diff) |
Merge remote-tracking branch 'spi/topic/atmel' into spi-next
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/spi/spi-atmel.c | 50 | ||||
-rw-r--r-- | drivers/spi/spi-bfin-sport.c | 2 | ||||
-rw-r--r-- | drivers/spi/spi-bfin5xx.c | 21 | ||||
-rw-r--r-- | drivers/spi/spi-dw.c | 4 | ||||
-rw-r--r-- | drivers/spi/spi-ep93xx.c | 4 | ||||
-rw-r--r-- | drivers/spi/spi-fsl-cpm.c | 2 | ||||
-rw-r--r-- | drivers/spi/spi-fsl-espi.c | 4 | ||||
-rw-r--r-- | drivers/spi/spi-mpc52xx-psc.c | 4 | ||||
-rw-r--r-- | drivers/spi/spi-omap2-mcspi.c | 4 | ||||
-rw-r--r-- | drivers/spi/spi-pxa2xx.c | 36 | ||||
-rw-r--r-- | drivers/spi/spi-topcliff-pch.c | 13 |
11 files changed, 71 insertions, 73 deletions
diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c index d4ac60b4a56e..273db0beb2b8 100644 --- a/drivers/spi/spi-atmel.c +++ b/drivers/spi/spi-atmel.c | |||
@@ -170,18 +170,18 @@ | |||
170 | /* Bit manipulation macros */ | 170 | /* Bit manipulation macros */ |
171 | #define SPI_BIT(name) \ | 171 | #define SPI_BIT(name) \ |
172 | (1 << SPI_##name##_OFFSET) | 172 | (1 << SPI_##name##_OFFSET) |
173 | #define SPI_BF(name,value) \ | 173 | #define SPI_BF(name, value) \ |
174 | (((value) & ((1 << SPI_##name##_SIZE) - 1)) << SPI_##name##_OFFSET) | 174 | (((value) & ((1 << SPI_##name##_SIZE) - 1)) << SPI_##name##_OFFSET) |
175 | #define SPI_BFEXT(name,value) \ | 175 | #define SPI_BFEXT(name, value) \ |
176 | (((value) >> SPI_##name##_OFFSET) & ((1 << SPI_##name##_SIZE) - 1)) | 176 | (((value) >> SPI_##name##_OFFSET) & ((1 << SPI_##name##_SIZE) - 1)) |
177 | #define SPI_BFINS(name,value,old) \ | 177 | #define SPI_BFINS(name, value, old) \ |
178 | ( ((old) & ~(((1 << SPI_##name##_SIZE) - 1) << SPI_##name##_OFFSET)) \ | 178 | (((old) & ~(((1 << SPI_##name##_SIZE) - 1) << SPI_##name##_OFFSET)) \ |
179 | | SPI_BF(name,value)) | 179 | | SPI_BF(name, value)) |
180 | 180 | ||
181 | /* Register access macros */ | 181 | /* Register access macros */ |
182 | #define spi_readl(port,reg) \ | 182 | #define spi_readl(port, reg) \ |
183 | __raw_readl((port)->regs + SPI_##reg) | 183 | __raw_readl((port)->regs + SPI_##reg) |
184 | #define spi_writel(port,reg,value) \ | 184 | #define spi_writel(port, reg, value) \ |
185 | __raw_writel((value), (port)->regs + SPI_##reg) | 185 | __raw_writel((value), (port)->regs + SPI_##reg) |
186 | 186 | ||
187 | /* use PIO for small transfers, avoiding DMA setup/teardown overhead and | 187 | /* use PIO for small transfers, avoiding DMA setup/teardown overhead and |
@@ -1401,8 +1401,8 @@ static int atmel_spi_transfer(struct spi_device *spi, struct spi_message *msg) | |||
1401 | asd = spi->controller_state; | 1401 | asd = spi->controller_state; |
1402 | bits = (asd->csr >> 4) & 0xf; | 1402 | bits = (asd->csr >> 4) & 0xf; |
1403 | if (bits != xfer->bits_per_word - 8) { | 1403 | if (bits != xfer->bits_per_word - 8) { |
1404 | dev_dbg(&spi->dev, "you can't yet change " | 1404 | dev_dbg(&spi->dev, |
1405 | "bits_per_word in transfers\n"); | 1405 | "you can't yet change bits_per_word in transfers\n"); |
1406 | return -ENOPROTOOPT; | 1406 | return -ENOPROTOOPT; |
1407 | } | 1407 | } |
1408 | } | 1408 | } |
@@ -1516,7 +1516,7 @@ static int atmel_spi_probe(struct platform_device *pdev) | |||
1516 | 1516 | ||
1517 | /* setup spi core then atmel-specific driver state */ | 1517 | /* setup spi core then atmel-specific driver state */ |
1518 | ret = -ENOMEM; | 1518 | ret = -ENOMEM; |
1519 | master = spi_alloc_master(&pdev->dev, sizeof *as); | 1519 | master = spi_alloc_master(&pdev->dev, sizeof(*as)); |
1520 | if (!master) | 1520 | if (!master) |
1521 | goto out_free; | 1521 | goto out_free; |
1522 | 1522 | ||
@@ -1546,9 +1546,11 @@ static int atmel_spi_probe(struct platform_device *pdev) | |||
1546 | INIT_LIST_HEAD(&as->queue); | 1546 | INIT_LIST_HEAD(&as->queue); |
1547 | 1547 | ||
1548 | as->pdev = pdev; | 1548 | as->pdev = pdev; |
1549 | as->regs = ioremap(regs->start, resource_size(regs)); | 1549 | as->regs = devm_ioremap_resource(&pdev->dev, regs); |
1550 | if (!as->regs) | 1550 | if (IS_ERR(as->regs)) { |
1551 | ret = PTR_ERR(as->regs); | ||
1551 | goto out_free_buffer; | 1552 | goto out_free_buffer; |
1553 | } | ||
1552 | as->phybase = regs->start; | 1554 | as->phybase = regs->start; |
1553 | as->irq = irq; | 1555 | as->irq = irq; |
1554 | as->clk = clk; | 1556 | as->clk = clk; |
@@ -1617,7 +1619,6 @@ out_free_dma: | |||
1617 | out_free_irq: | 1619 | out_free_irq: |
1618 | free_irq(irq, master); | 1620 | free_irq(irq, master); |
1619 | out_unmap_regs: | 1621 | out_unmap_regs: |
1620 | iounmap(as->regs); | ||
1621 | out_free_buffer: | 1622 | out_free_buffer: |
1622 | if (!as->use_pdc) | 1623 | if (!as->use_pdc) |
1623 | tasklet_kill(&as->tasklet); | 1624 | tasklet_kill(&as->tasklet); |
@@ -1669,36 +1670,36 @@ static int atmel_spi_remove(struct platform_device *pdev) | |||
1669 | clk_disable_unprepare(as->clk); | 1670 | clk_disable_unprepare(as->clk); |
1670 | clk_put(as->clk); | 1671 | clk_put(as->clk); |
1671 | free_irq(as->irq, master); | 1672 | free_irq(as->irq, master); |
1672 | iounmap(as->regs); | ||
1673 | 1673 | ||
1674 | spi_unregister_master(master); | 1674 | spi_unregister_master(master); |
1675 | 1675 | ||
1676 | return 0; | 1676 | return 0; |
1677 | } | 1677 | } |
1678 | 1678 | ||
1679 | #ifdef CONFIG_PM | 1679 | #ifdef CONFIG_PM_SLEEP |
1680 | 1680 | static int atmel_spi_suspend(struct device *dev) | |
1681 | static int atmel_spi_suspend(struct platform_device *pdev, pm_message_t mesg) | ||
1682 | { | 1681 | { |
1683 | struct spi_master *master = platform_get_drvdata(pdev); | 1682 | struct spi_master *master = dev_get_drvdata(dev); |
1684 | struct atmel_spi *as = spi_master_get_devdata(master); | 1683 | struct atmel_spi *as = spi_master_get_devdata(master); |
1685 | 1684 | ||
1686 | clk_disable_unprepare(as->clk); | 1685 | clk_disable_unprepare(as->clk); |
1687 | return 0; | 1686 | return 0; |
1688 | } | 1687 | } |
1689 | 1688 | ||
1690 | static int atmel_spi_resume(struct platform_device *pdev) | 1689 | static int atmel_spi_resume(struct device *dev) |
1691 | { | 1690 | { |
1692 | struct spi_master *master = platform_get_drvdata(pdev); | 1691 | struct spi_master *master = dev_get_drvdata(dev); |
1693 | struct atmel_spi *as = spi_master_get_devdata(master); | 1692 | struct atmel_spi *as = spi_master_get_devdata(master); |
1694 | 1693 | ||
1695 | return clk_prepare_enable(as->clk); | 1694 | clk_prepare_enable(as->clk); |
1696 | return 0; | 1695 | return 0; |
1697 | } | 1696 | } |
1698 | 1697 | ||
1698 | static SIMPLE_DEV_PM_OPS(atmel_spi_pm_ops, atmel_spi_suspend, atmel_spi_resume); | ||
1699 | |||
1700 | #define ATMEL_SPI_PM_OPS (&atmel_spi_pm_ops) | ||
1699 | #else | 1701 | #else |
1700 | #define atmel_spi_suspend NULL | 1702 | #define ATMEL_SPI_PM_OPS NULL |
1701 | #define atmel_spi_resume NULL | ||
1702 | #endif | 1703 | #endif |
1703 | 1704 | ||
1704 | #if defined(CONFIG_OF) | 1705 | #if defined(CONFIG_OF) |
@@ -1714,10 +1715,9 @@ static struct platform_driver atmel_spi_driver = { | |||
1714 | .driver = { | 1715 | .driver = { |
1715 | .name = "atmel_spi", | 1716 | .name = "atmel_spi", |
1716 | .owner = THIS_MODULE, | 1717 | .owner = THIS_MODULE, |
1718 | .pm = ATMEL_SPI_PM_OPS, | ||
1717 | .of_match_table = of_match_ptr(atmel_spi_dt_ids), | 1719 | .of_match_table = of_match_ptr(atmel_spi_dt_ids), |
1718 | }, | 1720 | }, |
1719 | .suspend = atmel_spi_suspend, | ||
1720 | .resume = atmel_spi_resume, | ||
1721 | .probe = atmel_spi_probe, | 1721 | .probe = atmel_spi_probe, |
1722 | .remove = atmel_spi_remove, | 1722 | .remove = atmel_spi_remove, |
1723 | }; | 1723 | }; |
diff --git a/drivers/spi/spi-bfin-sport.c b/drivers/spi/spi-bfin-sport.c index 91921b5f5817..7b2cda0747d5 100644 --- a/drivers/spi/spi-bfin-sport.c +++ b/drivers/spi/spi-bfin-sport.c | |||
@@ -592,7 +592,7 @@ bfin_sport_spi_setup(struct spi_device *spi) | |||
592 | */ | 592 | */ |
593 | if (chip_info->ctl_reg || chip_info->enable_dma) { | 593 | if (chip_info->ctl_reg || chip_info->enable_dma) { |
594 | ret = -EINVAL; | 594 | ret = -EINVAL; |
595 | dev_err(&spi->dev, "don't set ctl_reg/enable_dma fields"); | 595 | dev_err(&spi->dev, "don't set ctl_reg/enable_dma fields\n"); |
596 | goto error; | 596 | goto error; |
597 | } | 597 | } |
598 | chip->cs_chg_udelay = chip_info->cs_chg_udelay; | 598 | chip->cs_chg_udelay = chip_info->cs_chg_udelay; |
diff --git a/drivers/spi/spi-bfin5xx.c b/drivers/spi/spi-bfin5xx.c index 45bdf73d6868..b70a2bd9324d 100644 --- a/drivers/spi/spi-bfin5xx.c +++ b/drivers/spi/spi-bfin5xx.c | |||
@@ -524,7 +524,7 @@ static irqreturn_t bfin_spi_dma_irq_handler(int irq, void *dev_id) | |||
524 | timeout = jiffies + HZ; | 524 | timeout = jiffies + HZ; |
525 | while (!(bfin_read(&drv_data->regs->stat) & BIT_STAT_SPIF)) | 525 | while (!(bfin_read(&drv_data->regs->stat) & BIT_STAT_SPIF)) |
526 | if (!time_before(jiffies, timeout)) { | 526 | if (!time_before(jiffies, timeout)) { |
527 | dev_warn(&drv_data->pdev->dev, "timeout waiting for SPIF"); | 527 | dev_warn(&drv_data->pdev->dev, "timeout waiting for SPIF\n"); |
528 | break; | 528 | break; |
529 | } else | 529 | } else |
530 | cpu_relax(); | 530 | cpu_relax(); |
@@ -913,8 +913,9 @@ static void bfin_spi_pump_messages(struct work_struct *work) | |||
913 | drv_data->cur_transfer = list_entry(drv_data->cur_msg->transfers.next, | 913 | drv_data->cur_transfer = list_entry(drv_data->cur_msg->transfers.next, |
914 | struct spi_transfer, transfer_list); | 914 | struct spi_transfer, transfer_list); |
915 | 915 | ||
916 | dev_dbg(&drv_data->pdev->dev, "got a message to pump, " | 916 | dev_dbg(&drv_data->pdev->dev, |
917 | "state is set to: baud %d, flag 0x%x, ctl 0x%x\n", | 917 | "got a message to pump, state is set to: baud " |
918 | "%d, flag 0x%x, ctl 0x%x\n", | ||
918 | drv_data->cur_chip->baud, drv_data->cur_chip->flag, | 919 | drv_data->cur_chip->baud, drv_data->cur_chip->flag, |
919 | drv_data->cur_chip->ctl_reg); | 920 | drv_data->cur_chip->ctl_reg); |
920 | 921 | ||
@@ -1013,8 +1014,8 @@ static int bfin_spi_setup(struct spi_device *spi) | |||
1013 | * but let's assume (for now) they do. | 1014 | * but let's assume (for now) they do. |
1014 | */ | 1015 | */ |
1015 | if (chip_info->ctl_reg & ~bfin_ctl_reg) { | 1016 | if (chip_info->ctl_reg & ~bfin_ctl_reg) { |
1016 | dev_err(&spi->dev, "do not set bits in ctl_reg " | 1017 | dev_err(&spi->dev, |
1017 | "that the SPI framework manages\n"); | 1018 | "do not set bits in ctl_reg that the SPI framework manages\n"); |
1018 | goto error; | 1019 | goto error; |
1019 | } | 1020 | } |
1020 | chip->enable_dma = chip_info->enable_dma != 0 | 1021 | chip->enable_dma = chip_info->enable_dma != 0 |
@@ -1050,17 +1051,17 @@ static int bfin_spi_setup(struct spi_device *spi) | |||
1050 | chip->chip_select_num = spi->chip_select; | 1051 | chip->chip_select_num = spi->chip_select; |
1051 | if (chip->chip_select_num < MAX_CTRL_CS) { | 1052 | if (chip->chip_select_num < MAX_CTRL_CS) { |
1052 | if (!(spi->mode & SPI_CPHA)) | 1053 | if (!(spi->mode & SPI_CPHA)) |
1053 | dev_warn(&spi->dev, "Warning: SPI CPHA not set:" | 1054 | dev_warn(&spi->dev, |
1054 | " Slave Select not under software control!\n" | 1055 | "Warning: SPI CPHA not set: Slave Select not under software control!\n" |
1055 | " See Documentation/blackfin/bfin-spi-notes.txt"); | 1056 | "See Documentation/blackfin/bfin-spi-notes.txt\n"); |
1056 | 1057 | ||
1057 | chip->flag = (1 << spi->chip_select) << 8; | 1058 | chip->flag = (1 << spi->chip_select) << 8; |
1058 | } else | 1059 | } else |
1059 | chip->cs_gpio = chip->chip_select_num - MAX_CTRL_CS; | 1060 | chip->cs_gpio = chip->chip_select_num - MAX_CTRL_CS; |
1060 | 1061 | ||
1061 | if (chip->enable_dma && chip->pio_interrupt) { | 1062 | if (chip->enable_dma && chip->pio_interrupt) { |
1062 | dev_err(&spi->dev, "enable_dma is set, " | 1063 | dev_err(&spi->dev, |
1063 | "do not set pio_interrupt\n"); | 1064 | "enable_dma is set, do not set pio_interrupt\n"); |
1064 | goto error; | 1065 | goto error; |
1065 | } | 1066 | } |
1066 | /* | 1067 | /* |
diff --git a/drivers/spi/spi-dw.c b/drivers/spi/spi-dw.c index 79c958e49f61..b897c4adb39d 100644 --- a/drivers/spi/spi-dw.c +++ b/drivers/spi/spi-dw.c | |||
@@ -870,8 +870,8 @@ void dw_spi_remove_host(struct dw_spi *dws) | |||
870 | /* Remove the queue */ | 870 | /* Remove the queue */ |
871 | status = destroy_queue(dws); | 871 | status = destroy_queue(dws); |
872 | if (status != 0) | 872 | if (status != 0) |
873 | dev_err(&dws->master->dev, "dw_spi_remove: workqueue will not " | 873 | dev_err(&dws->master->dev, |
874 | "complete, message memory not freed\n"); | 874 | "dw_spi_remove: workqueue will not complete, message memory not freed\n"); |
875 | 875 | ||
876 | if (dws->dma_ops && dws->dma_ops->dma_exit) | 876 | if (dws->dma_ops && dws->dma_ops->dma_exit) |
877 | dws->dma_ops->dma_exit(dws); | 877 | dws->dma_ops->dma_exit(dws); |
diff --git a/drivers/spi/spi-ep93xx.c b/drivers/spi/spi-ep93xx.c index d22c00a227b6..b57a341d3e1c 100644 --- a/drivers/spi/spi-ep93xx.c +++ b/drivers/spi/spi-ep93xx.c | |||
@@ -330,7 +330,7 @@ static int ep93xx_spi_chip_setup(const struct ep93xx_spi *espi, | |||
330 | 330 | ||
331 | dev_dbg(&espi->pdev->dev, "setup: mode %d, cpsr %d, scr %d, dss %d\n", | 331 | dev_dbg(&espi->pdev->dev, "setup: mode %d, cpsr %d, scr %d, dss %d\n", |
332 | chip->spi->mode, div_cpsr, div_scr, dss); | 332 | chip->spi->mode, div_cpsr, div_scr, dss); |
333 | dev_dbg(&espi->pdev->dev, "setup: cr0 %#x", cr0); | 333 | dev_dbg(&espi->pdev->dev, "setup: cr0 %#x\n", cr0); |
334 | 334 | ||
335 | ep93xx_spi_write_u8(espi, SSPCPSR, div_cpsr); | 335 | ep93xx_spi_write_u8(espi, SSPCPSR, div_cpsr); |
336 | ep93xx_spi_write_u16(espi, SSPCR0, cr0); | 336 | ep93xx_spi_write_u16(espi, SSPCR0, cr0); |
@@ -509,7 +509,7 @@ ep93xx_spi_dma_prepare(struct ep93xx_spi *espi, enum dma_transfer_direction dir) | |||
509 | } | 509 | } |
510 | 510 | ||
511 | if (WARN_ON(len)) { | 511 | if (WARN_ON(len)) { |
512 | dev_warn(&espi->pdev->dev, "len = %zu expected 0!", len); | 512 | dev_warn(&espi->pdev->dev, "len = %zu expected 0!\n", len); |
513 | return ERR_PTR(-EINVAL); | 513 | return ERR_PTR(-EINVAL); |
514 | } | 514 | } |
515 | 515 | ||
diff --git a/drivers/spi/spi-fsl-cpm.c b/drivers/spi/spi-fsl-cpm.c index 07971e3fe58b..58630edb8c21 100644 --- a/drivers/spi/spi-fsl-cpm.c +++ b/drivers/spi/spi-fsl-cpm.c | |||
@@ -299,7 +299,7 @@ int fsl_spi_cpm_init(struct mpc8xxx_spi *mspi) | |||
299 | 299 | ||
300 | switch (mspi->subblock) { | 300 | switch (mspi->subblock) { |
301 | default: | 301 | default: |
302 | dev_warn(dev, "cell-index unspecified, assuming SPI1"); | 302 | dev_warn(dev, "cell-index unspecified, assuming SPI1\n"); |
303 | /* fall through */ | 303 | /* fall through */ |
304 | case 0: | 304 | case 0: |
305 | mspi->subblock = QE_CR_SUBBLOCK_SPI1; | 305 | mspi->subblock = QE_CR_SUBBLOCK_SPI1; |
diff --git a/drivers/spi/spi-fsl-espi.c b/drivers/spi/spi-fsl-espi.c index b8f1103fe28e..43222d7532d1 100644 --- a/drivers/spi/spi-fsl-espi.c +++ b/drivers/spi/spi-fsl-espi.c | |||
@@ -289,8 +289,8 @@ static void fsl_espi_do_trans(struct spi_message *m, | |||
289 | if ((first->bits_per_word != t->bits_per_word) || | 289 | if ((first->bits_per_word != t->bits_per_word) || |
290 | (first->speed_hz != t->speed_hz)) { | 290 | (first->speed_hz != t->speed_hz)) { |
291 | espi_trans->status = -EINVAL; | 291 | espi_trans->status = -EINVAL; |
292 | dev_err(mspi->dev, "bits_per_word/speed_hz should be" | 292 | dev_err(mspi->dev, |
293 | " same for the same SPI transfer\n"); | 293 | "bits_per_word/speed_hz should be same for the same SPI transfer\n"); |
294 | return; | 294 | return; |
295 | } | 295 | } |
296 | 296 | ||
diff --git a/drivers/spi/spi-mpc52xx-psc.c b/drivers/spi/spi-mpc52xx-psc.c index 6e925dc34396..00ba910ab302 100644 --- a/drivers/spi/spi-mpc52xx-psc.c +++ b/drivers/spi/spi-mpc52xx-psc.c | |||
@@ -383,8 +383,8 @@ static int mpc52xx_psc_spi_do_probe(struct device *dev, u32 regaddr, | |||
383 | 383 | ||
384 | mps->irq = irq; | 384 | mps->irq = irq; |
385 | if (pdata == NULL) { | 385 | if (pdata == NULL) { |
386 | dev_warn(dev, "probe called without platform data, no " | 386 | dev_warn(dev, |
387 | "cs_control function will be called\n"); | 387 | "probe called without platform data, no cs_control function will be called\n"); |
388 | mps->cs_control = NULL; | 388 | mps->cs_control = NULL; |
389 | mps->sysclk = 0; | 389 | mps->sysclk = 0; |
390 | master->bus_num = bus_num; | 390 | master->bus_num = bus_num; |
diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c index 32dca0c55358..c4e4868913c7 100644 --- a/drivers/spi/spi-omap2-mcspi.c +++ b/drivers/spi/spi-omap2-mcspi.c | |||
@@ -504,7 +504,7 @@ omap2_mcspi_rx_dma(struct spi_device *spi, struct spi_transfer *xfer, | |||
504 | ((u32 *)xfer->rx_buf)[elements++] = w; | 504 | ((u32 *)xfer->rx_buf)[elements++] = w; |
505 | } else { | 505 | } else { |
506 | int bytes_per_word = mcspi_bytes_per_word(word_len); | 506 | int bytes_per_word = mcspi_bytes_per_word(word_len); |
507 | dev_err(&spi->dev, "DMA RX penultimate word empty"); | 507 | dev_err(&spi->dev, "DMA RX penultimate word empty\n"); |
508 | count -= (bytes_per_word << 1); | 508 | count -= (bytes_per_word << 1); |
509 | omap2_mcspi_set_enable(spi, 1); | 509 | omap2_mcspi_set_enable(spi, 1); |
510 | return count; | 510 | return count; |
@@ -522,7 +522,7 @@ omap2_mcspi_rx_dma(struct spi_device *spi, struct spi_transfer *xfer, | |||
522 | else /* word_len <= 32 */ | 522 | else /* word_len <= 32 */ |
523 | ((u32 *)xfer->rx_buf)[elements] = w; | 523 | ((u32 *)xfer->rx_buf)[elements] = w; |
524 | } else { | 524 | } else { |
525 | dev_err(&spi->dev, "DMA RX last word empty"); | 525 | dev_err(&spi->dev, "DMA RX last word empty\n"); |
526 | count -= mcspi_bytes_per_word(word_len); | 526 | count -= mcspi_bytes_per_word(word_len); |
527 | } | 527 | } |
528 | omap2_mcspi_set_enable(spi, 1); | 528 | omap2_mcspi_set_enable(spi, 1); |
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 | ||
diff --git a/drivers/spi/spi-topcliff-pch.c b/drivers/spi/spi-topcliff-pch.c index eaeeed51bbbf..14843efaaf3a 100644 --- a/drivers/spi/spi-topcliff-pch.c +++ b/drivers/spi/spi-topcliff-pch.c | |||
@@ -506,8 +506,8 @@ static int pch_spi_transfer(struct spi_device *pspi, struct spi_message *pmsg) | |||
506 | goto err_out; | 506 | goto err_out; |
507 | } | 507 | } |
508 | 508 | ||
509 | dev_dbg(&pspi->dev, "%s Transfer List not empty. " | 509 | dev_dbg(&pspi->dev, |
510 | "Transfer Speed is set.\n", __func__); | 510 | "%s Transfer List not empty. Transfer Speed is set.\n", __func__); |
511 | 511 | ||
512 | spin_lock_irqsave(&data->lock, flags); | 512 | spin_lock_irqsave(&data->lock, flags); |
513 | /* validate Tx/Rx buffers and Transfer length */ | 513 | /* validate Tx/Rx buffers and Transfer length */ |
@@ -526,8 +526,9 @@ static int pch_spi_transfer(struct spi_device *pspi, struct spi_message *pmsg) | |||
526 | goto err_return_spinlock; | 526 | goto err_return_spinlock; |
527 | } | 527 | } |
528 | 528 | ||
529 | dev_dbg(&pspi->dev, "%s Tx/Rx buffer valid. Transfer length" | 529 | dev_dbg(&pspi->dev, |
530 | " valid\n", __func__); | 530 | "%s Tx/Rx buffer valid. Transfer length valid\n", |
531 | __func__); | ||
531 | 532 | ||
532 | /* if baud rate has been specified validate the same */ | 533 | /* if baud rate has been specified validate the same */ |
533 | if (transfer->speed_hz > PCH_MAX_BAUDRATE) | 534 | if (transfer->speed_hz > PCH_MAX_BAUDRATE) |
@@ -1181,8 +1182,8 @@ static void pch_spi_process_messages(struct work_struct *pwork) | |||
1181 | spin_lock(&data->lock); | 1182 | spin_lock(&data->lock); |
1182 | /* check if suspend has been initiated;if yes flush queue */ | 1183 | /* check if suspend has been initiated;if yes flush queue */ |
1183 | if (data->board_dat->suspend_sts || (data->status == STATUS_EXITING)) { | 1184 | if (data->board_dat->suspend_sts || (data->status == STATUS_EXITING)) { |
1184 | dev_dbg(&data->master->dev, "%s suspend/remove initiated," | 1185 | dev_dbg(&data->master->dev, |
1185 | "flushing queue\n", __func__); | 1186 | "%s suspend/remove initiated, flushing queue\n", __func__); |
1186 | list_for_each_entry_safe(pmsg, tmp, data->queue.next, queue) { | 1187 | list_for_each_entry_safe(pmsg, tmp, data->queue.next, queue) { |
1187 | pmsg->status = -EIO; | 1188 | pmsg->status = -EIO; |
1188 | 1189 | ||