diff options
| author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-07-19 01:36:23 -0400 |
|---|---|---|
| committer | Kukjin Kim <kgene.kim@samsung.com> | 2012-07-19 01:36:23 -0400 |
| commit | 5fc3e8311ccc87e9d9c9ce2aa36d0e5069e0807c (patch) | |
| tree | 36cf6ecf6a3525dec0e0583f9961755c65fc2f6d | |
| parent | b1ec43084d9b53dadae64da00532e1c02444ef2c (diff) | |
spi/s3c64xx: Expand S3C64XX_SPI_{DE,}ACT macros at call sites
They have very few users and they're both just doing a single register
write so the advantage of having the macro is a bit limited. An inline
function might make sense but it's as easy to just do the writes directly.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
| -rw-r--r-- | drivers/spi/spi-s3c64xx.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index 04f947d8d3c7..646a7657fe62 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c | |||
| @@ -79,11 +79,6 @@ | |||
| 79 | #define S3C64XX_SPI_SLAVE_AUTO (1<<1) | 79 | #define S3C64XX_SPI_SLAVE_AUTO (1<<1) |
| 80 | #define S3C64XX_SPI_SLAVE_SIG_INACT (1<<0) | 80 | #define S3C64XX_SPI_SLAVE_SIG_INACT (1<<0) |
| 81 | 81 | ||
| 82 | #define S3C64XX_SPI_ACT(c) writel(0, (c)->regs + S3C64XX_SPI_SLAVE_SEL) | ||
| 83 | |||
| 84 | #define S3C64XX_SPI_DEACT(c) writel(S3C64XX_SPI_SLAVE_SIG_INACT, \ | ||
| 85 | (c)->regs + S3C64XX_SPI_SLAVE_SEL) | ||
| 86 | |||
| 87 | #define S3C64XX_SPI_INT_TRAILING_EN (1<<6) | 82 | #define S3C64XX_SPI_INT_TRAILING_EN (1<<6) |
| 88 | #define S3C64XX_SPI_INT_RX_OVERRUN_EN (1<<5) | 83 | #define S3C64XX_SPI_INT_RX_OVERRUN_EN (1<<5) |
| 89 | #define S3C64XX_SPI_INT_RX_UNDERRUN_EN (1<<4) | 84 | #define S3C64XX_SPI_INT_RX_UNDERRUN_EN (1<<4) |
| @@ -737,14 +732,15 @@ static int s3c64xx_spi_transfer_one_message(struct spi_master *master, | |||
| 737 | enable_cs(sdd, spi); | 732 | enable_cs(sdd, spi); |
| 738 | 733 | ||
| 739 | /* Start the signals */ | 734 | /* Start the signals */ |
| 740 | S3C64XX_SPI_ACT(sdd); | 735 | writel(0, sdd->regs + S3C64XX_SPI_SLAVE_SEL); |
| 741 | 736 | ||
| 742 | spin_unlock_irqrestore(&sdd->lock, flags); | 737 | spin_unlock_irqrestore(&sdd->lock, flags); |
| 743 | 738 | ||
| 744 | status = wait_for_xfer(sdd, xfer, use_dma); | 739 | status = wait_for_xfer(sdd, xfer, use_dma); |
| 745 | 740 | ||
| 746 | /* Quiese the signals */ | 741 | /* Quiese the signals */ |
| 747 | S3C64XX_SPI_DEACT(sdd); | 742 | writel(S3C64XX_SPI_SLAVE_SIG_INACT, |
| 743 | sdd->regs + S3C64XX_SPI_SLAVE_SEL); | ||
| 748 | 744 | ||
| 749 | if (status) { | 745 | if (status) { |
| 750 | dev_err(&spi->dev, "I/O Error: " | 746 | dev_err(&spi->dev, "I/O Error: " |
| @@ -1032,7 +1028,7 @@ static void s3c64xx_spi_hwinit(struct s3c64xx_spi_driver_data *sdd, int channel) | |||
| 1032 | 1028 | ||
| 1033 | sdd->cur_speed = 0; | 1029 | sdd->cur_speed = 0; |
| 1034 | 1030 | ||
| 1035 | S3C64XX_SPI_DEACT(sdd); | 1031 | writel(S3C64XX_SPI_SLAVE_SIG_INACT, sdd->regs + S3C64XX_SPI_SLAVE_SEL); |
| 1036 | 1032 | ||
| 1037 | /* Disable Interrupts - we use Polling if not DMA mode */ | 1033 | /* Disable Interrupts - we use Polling if not DMA mode */ |
| 1038 | writel(0, regs + S3C64XX_SPI_INT_EN); | 1034 | writel(0, regs + S3C64XX_SPI_INT_EN); |
