summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-bcm63xx.c
diff options
context:
space:
mode:
authorJonas Gorski <jogo@openwrt.org>2015-10-12 13:24:21 +0300
committerMark Brown <broonie@kernel.org>2015-10-12 19:24:32 +0300
commit682b5280bf00c0618606ecb26cf4a9342d5e282e (patch)
treed6ead94da96677292a7e535efc6f450aea5e02a2 /drivers/spi/spi-bcm63xx.c
parent158fcc4e050a75b609bbef1007cf7bf2a01ca043 (diff)
downloadlinux-682b5280bf00c0618606ecb26cf4a9342d5e282e.tar.xz
spi/bcm63xx: fix standard accessors and compile guard
Use the correct guard CONFIG_CPU_BIG_ENDIAN and the *be accessors to follow native endianness on big endian systems. Signed-off-by: Jonas Gorski <jogo@openwrt.org> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-bcm63xx.c')
-rw-r--r--drivers/spi/spi-bcm63xx.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/spi/spi-bcm63xx.c b/drivers/spi/spi-bcm63xx.c
index ef05387c1341..461891fbc198 100644
--- a/drivers/spi/spi-bcm63xx.c
+++ b/drivers/spi/spi-bcm63xx.c
@@ -62,8 +62,8 @@ static inline u8 bcm_spi_readb(struct bcm63xx_spi *bs,
static inline u16 bcm_spi_readw(struct bcm63xx_spi *bs,
unsigned int offset)
{
-#ifdef CONFIG_BIG_ENDIAN
- return ioread16(bs->regs + bcm63xx_spireg(offset));
+#ifdef CONFIG_CPU_BIG_ENDIAN
+ return ioread16be(bs->regs + bcm63xx_spireg(offset));
#else
return readw(bs->regs + bcm63xx_spireg(offset));
#endif
@@ -78,8 +78,8 @@ static inline void bcm_spi_writeb(struct bcm63xx_spi *bs,
static inline void bcm_spi_writew(struct bcm63xx_spi *bs,
u16 value, unsigned int offset)
{
-#ifdef CONFIG_BIG_ENDIAN
- iowrite16(value, bs->regs + bcm63xx_spireg(offset));
+#ifdef CONFIG_CPU_BIG_ENDIAN
+ iowrite16be(value, bs->regs + bcm63xx_spireg(offset));
#else
writew(value, bs->regs + bcm63xx_spireg(offset));
#endif