aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-s3c64xx.c
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2014-02-07 07:39:22 -0500
committerMark Brown <broonie@linaro.org>2014-02-07 08:27:58 -0500
commit1b5e1b694919ee13b9ae6e5c6727363103e6f7f2 (patch)
treecd0c99ba4b6d479b810e809d71c21221f6fc0449 /drivers/spi/spi-s3c64xx.c
parent90e73973d3e48b3f6b37ea944fdef8e1543d36fc (diff)
spi/s3c64xx: Remove code no longer needed as a result of S3C_DMA removal
Remove functions that only had an effect when using S3C_DMA and inline dmaengine_terminate_all() since it's pointless to have a function which expands to a single function call. Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/spi/spi-s3c64xx.c')
-rw-r--r--drivers/spi/spi-s3c64xx.c39
1 files changed, 2 insertions, 37 deletions
diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
index 18ec7e65a319..9ad5e3e76b96 100644
--- a/drivers/spi/spi-s3c64xx.c
+++ b/drivers/spi/spi-s3c64xx.c
@@ -277,17 +277,6 @@ static void s3c64xx_spi_dmacb(void *data)
277 spin_unlock_irqrestore(&sdd->lock, flags); 277 spin_unlock_irqrestore(&sdd->lock, flags);
278} 278}
279 279
280static int s3c64xx_spi_map_mssg(struct s3c64xx_spi_driver_data *sdd,
281 struct spi_message *msg)
282{
283 return 0;
284}
285
286static void s3c64xx_spi_unmap_mssg(struct s3c64xx_spi_driver_data *sdd,
287 struct spi_message *msg)
288{
289}
290
291static void prepare_dma(struct s3c64xx_spi_dma_data *dma, 280static void prepare_dma(struct s3c64xx_spi_dma_data *dma,
292 struct sg_table *sgt) 281 struct sg_table *sgt)
293{ 282{
@@ -387,12 +376,6 @@ static int s3c64xx_spi_unprepare_transfer(struct spi_master *spi)
387 return 0; 376 return 0;
388} 377}
389 378
390static void s3c64xx_spi_dma_stop(struct s3c64xx_spi_driver_data *sdd,
391 struct s3c64xx_spi_dma_data *dma)
392{
393 dmaengine_terminate_all(dma->ch);
394}
395
396static bool s3c64xx_spi_can_dma(struct spi_master *master, 379static bool s3c64xx_spi_can_dma(struct spi_master *master,
397 struct spi_device *spi, 380 struct spi_device *spi,
398 struct spi_transfer *xfer) 381 struct spi_transfer *xfer)
@@ -691,13 +674,6 @@ static int s3c64xx_spi_prepare_message(struct spi_master *master,
691 s3c64xx_spi_config(sdd); 674 s3c64xx_spi_config(sdd);
692 } 675 }
693 676
694 /* Map all the transfers if needed */
695 if (s3c64xx_spi_map_mssg(sdd, msg)) {
696 dev_err(&spi->dev,
697 "Xfer: Unable to map message buffers!\n");
698 return -ENOMEM;
699 }
700
701 /* Configure feedback delay */ 677 /* Configure feedback delay */
702 writel(cs->fb_delay & 0x3, sdd->regs + S3C64XX_SPI_FB_CLK); 678 writel(cs->fb_delay & 0x3, sdd->regs + S3C64XX_SPI_FB_CLK);
703 679
@@ -769,10 +745,10 @@ static int s3c64xx_spi_transfer_one(struct spi_master *master,
769 if (use_dma) { 745 if (use_dma) {
770 if (xfer->tx_buf != NULL 746 if (xfer->tx_buf != NULL
771 && (sdd->state & TXBUSY)) 747 && (sdd->state & TXBUSY))
772 s3c64xx_spi_dma_stop(sdd, &sdd->tx_dma); 748 dmaengine_terminate_all(sdd->tx_dma.ch);
773 if (xfer->rx_buf != NULL 749 if (xfer->rx_buf != NULL
774 && (sdd->state & RXBUSY)) 750 && (sdd->state & RXBUSY))
775 s3c64xx_spi_dma_stop(sdd, &sdd->rx_dma); 751 dmaengine_terminate_all(sdd->rx_dma.ch);
776 } 752 }
777 } else { 753 } else {
778 flush_fifo(sdd); 754 flush_fifo(sdd);
@@ -781,16 +757,6 @@ static int s3c64xx_spi_transfer_one(struct spi_master *master,
781 return status; 757 return status;
782} 758}
783 759
784static int s3c64xx_spi_unprepare_message(struct spi_master *master,
785 struct spi_message *msg)
786{
787 struct s3c64xx_spi_driver_data *sdd = spi_master_get_devdata(master);
788
789 s3c64xx_spi_unmap_mssg(sdd, msg);
790
791 return 0;
792}
793
794static struct s3c64xx_spi_csinfo *s3c64xx_get_slave_ctrldata( 760static struct s3c64xx_spi_csinfo *s3c64xx_get_slave_ctrldata(
795 struct spi_device *spi) 761 struct spi_device *spi)
796{ 762{
@@ -1164,7 +1130,6 @@ static int s3c64xx_spi_probe(struct platform_device *pdev)
1164 master->prepare_transfer_hardware = s3c64xx_spi_prepare_transfer; 1130 master->prepare_transfer_hardware = s3c64xx_spi_prepare_transfer;
1165 master->prepare_message = s3c64xx_spi_prepare_message; 1131 master->prepare_message = s3c64xx_spi_prepare_message;
1166 master->transfer_one = s3c64xx_spi_transfer_one; 1132 master->transfer_one = s3c64xx_spi_transfer_one;
1167 master->unprepare_message = s3c64xx_spi_unprepare_message;
1168 master->unprepare_transfer_hardware = s3c64xx_spi_unprepare_transfer; 1133 master->unprepare_transfer_hardware = s3c64xx_spi_unprepare_transfer;
1169 master->num_chipselect = sci->num_cs; 1134 master->num_chipselect = sci->num_cs;
1170 master->dma_alignment = 8; 1135 master->dma_alignment = 8;