aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH Hartley Sweeten <hartleys@visionengravers.com>2013-07-02 13:06:26 -0400
committerMark Brown <broonie@linaro.org>2013-07-15 06:37:13 -0400
commit8d7586bda032748ceec44416fa32a711a62e4954 (patch)
tree664a39fba96238b2a58ed54bf17a9f39f30fce60
parent4870c2170d91f33a1a90bd5b1d7c5534332f30f2 (diff)
spi: spi-ep93xx: use read,write instead of __raw_* variants
The memory resource used by this driver is ioremap()'d and the normal read,write calls can be used instead of the __raw_* variants. Also, remove the inline tag on the helper functions and let the compiler decide if they are inlined. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Acked-by: Mika Westerberg <mika.westerberg@iki.fi> Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r--drivers/spi/spi-ep93xx.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/drivers/spi/spi-ep93xx.c b/drivers/spi/spi-ep93xx.c
index 11e2b999cce2..d7eccfc40ac9 100644
--- a/drivers/spi/spi-ep93xx.c
+++ b/drivers/spi/spi-ep93xx.c
@@ -158,28 +158,26 @@ struct ep93xx_spi_chip {
158/* converts bits per word to CR0.DSS value */ 158/* converts bits per word to CR0.DSS value */
159#define bits_per_word_to_dss(bpw) ((bpw) - 1) 159#define bits_per_word_to_dss(bpw) ((bpw) - 1)
160 160
161static inline void 161static void ep93xx_spi_write_u8(const struct ep93xx_spi *espi,
162ep93xx_spi_write_u8(const struct ep93xx_spi *espi, u16 reg, u8 value) 162 u16 reg, u8 value)
163{ 163{
164 __raw_writeb(value, espi->regs_base + reg); 164 writeb(value, espi->regs_base + reg);
165} 165}
166 166
167static inline u8 167static u8 ep93xx_spi_read_u8(const struct ep93xx_spi *spi, u16 reg)
168ep93xx_spi_read_u8(const struct ep93xx_spi *spi, u16 reg)
169{ 168{
170 return __raw_readb(spi->regs_base + reg); 169 return readb(spi->regs_base + reg);
171} 170}
172 171
173static inline void 172static void ep93xx_spi_write_u16(const struct ep93xx_spi *espi,
174ep93xx_spi_write_u16(const struct ep93xx_spi *espi, u16 reg, u16 value) 173 u16 reg, u16 value)
175{ 174{
176 __raw_writew(value, espi->regs_base + reg); 175 writew(value, espi->regs_base + reg);
177} 176}
178 177
179static inline u16 178static u16 ep93xx_spi_read_u16(const struct ep93xx_spi *spi, u16 reg)
180ep93xx_spi_read_u16(const struct ep93xx_spi *spi, u16 reg)
181{ 179{
182 return __raw_readw(spi->regs_base + reg); 180 return readw(spi->regs_base + reg);
183} 181}
184 182
185static int ep93xx_spi_enable(const struct ep93xx_spi *espi) 183static int ep93xx_spi_enable(const struct ep93xx_spi *espi)