aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/spi/spi_mpc83xx.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/spi/spi_mpc83xx.c b/drivers/spi/spi_mpc83xx.c
index 6e0232e65a38..273940d3938d 100644
--- a/drivers/spi/spi_mpc83xx.c
+++ b/drivers/spi/spi_mpc83xx.c
@@ -17,6 +17,7 @@
17#include <linux/bug.h> 17#include <linux/bug.h>
18#include <linux/errno.h> 18#include <linux/errno.h>
19#include <linux/err.h> 19#include <linux/err.h>
20#include <linux/io.h>
20#include <linux/completion.h> 21#include <linux/completion.h>
21#include <linux/interrupt.h> 22#include <linux/interrupt.h>
22#include <linux/delay.h> 23#include <linux/delay.h>
@@ -34,7 +35,6 @@
34 35
35#include <sysdev/fsl_soc.h> 36#include <sysdev/fsl_soc.h>
36#include <asm/irq.h> 37#include <asm/irq.h>
37#include <asm/io.h>
38 38
39/* SPI Controller registers */ 39/* SPI Controller registers */
40struct mpc83xx_spi_reg { 40struct mpc83xx_spi_reg {
@@ -118,12 +118,12 @@ struct spi_mpc83xx_cs {
118 u32 hw_mode; /* Holds HW mode register settings */ 118 u32 hw_mode; /* Holds HW mode register settings */
119}; 119};
120 120
121static inline void mpc83xx_spi_write_reg(__be32 __iomem * reg, u32 val) 121static inline void mpc83xx_spi_write_reg(__be32 __iomem *reg, u32 val)
122{ 122{
123 out_be32(reg, val); 123 out_be32(reg, val);
124} 124}
125 125
126static inline u32 mpc83xx_spi_read_reg(__be32 __iomem * reg) 126static inline u32 mpc83xx_spi_read_reg(__be32 __iomem *reg)
127{ 127{
128 return in_be32(reg); 128 return in_be32(reg);
129} 129}
@@ -132,7 +132,7 @@ static inline u32 mpc83xx_spi_read_reg(__be32 __iomem * reg)
132static \ 132static \
133void mpc83xx_spi_rx_buf_##type(u32 data, struct mpc83xx_spi *mpc83xx_spi) \ 133void mpc83xx_spi_rx_buf_##type(u32 data, struct mpc83xx_spi *mpc83xx_spi) \
134{ \ 134{ \
135 type * rx = mpc83xx_spi->rx; \ 135 type *rx = mpc83xx_spi->rx; \
136 *rx++ = (type)(data >> mpc83xx_spi->rx_shift); \ 136 *rx++ = (type)(data >> mpc83xx_spi->rx_shift); \
137 mpc83xx_spi->rx = rx; \ 137 mpc83xx_spi->rx = rx; \
138} 138}
@@ -142,7 +142,7 @@ static \
142u32 mpc83xx_spi_tx_buf_##type(struct mpc83xx_spi *mpc83xx_spi) \ 142u32 mpc83xx_spi_tx_buf_##type(struct mpc83xx_spi *mpc83xx_spi) \
143{ \ 143{ \
144 u32 data; \ 144 u32 data; \
145 const type * tx = mpc83xx_spi->tx; \ 145 const type *tx = mpc83xx_spi->tx; \
146 if (!tx) \ 146 if (!tx) \
147 return 0; \ 147 return 0; \
148 data = *tx++ << mpc83xx_spi->tx_shift; \ 148 data = *tx++ << mpc83xx_spi->tx_shift; \
@@ -500,7 +500,7 @@ static irqreturn_t mpc83xx_spi_irq(s32 irq, void *context_data)
500 while (((event = 500 while (((event =
501 mpc83xx_spi_read_reg(&mpc83xx_spi->base->event)) & 501 mpc83xx_spi_read_reg(&mpc83xx_spi->base->event)) &
502 SPIE_NF) == 0) 502 SPIE_NF) == 0)
503 cpu_relax(); 503 cpu_relax();
504 504
505 mpc83xx_spi->count -= 1; 505 mpc83xx_spi->count -= 1;
506 if (mpc83xx_spi->count) { 506 if (mpc83xx_spi->count) {