aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2009-03-08 14:20:15 +0000
committerFlorian Fainelli <florian@openwrt.org>2009-03-08 14:20:15 +0000
commit59da47705d6f8281bf84d11e9a0a4717135ebf3c (patch)
treeb159cec9be3614ea5b89b4be2b7a6dd86ea2b2b2
parent4d877724976710902207109dbfc6d622812d900d (diff)
downloadupstream-59da47705d6f8281bf84d11e9a0a4717135ebf3c.tar.gz
upstream-59da47705d6f8281bf84d11e9a0a4717135ebf3c.tar.bz2
upstream-59da47705d6f8281bf84d11e9a0a4717135ebf3c.zip
[brcm63xx] fix SPI accessors
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@14792 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--target/linux/brcm63xx/files/include/asm-mips/mach-bcm63xx/bcm63xx_io.h24
1 files changed, 14 insertions, 10 deletions
diff --git a/target/linux/brcm63xx/files/include/asm-mips/mach-bcm63xx/bcm63xx_io.h b/target/linux/brcm63xx/files/include/asm-mips/mach-bcm63xx/bcm63xx_io.h
index af98611152..5331c25f7b 100644
--- a/target/linux/brcm63xx/files/include/asm-mips/mach-bcm63xx/bcm63xx_io.h
+++ b/target/linux/brcm63xx/files/include/asm-mips/mach-bcm63xx/bcm63xx_io.h
@@ -65,12 +65,6 @@
bcm63xx_regset_address(s) + (o))
#define bcm_rset_writel(s,v,o) bcm_writel((v), \
bcm63xx_regset_address(s) + (o))
-#define bcm_reg_spi_readb(s,o) bcm_readb(bcm63xx_spireg(s) + (o))
-#define bcm_reg_spi_readw(s,o) bcm_readw(bcm63xx_spireg(s) + (o))
-#define bcm_reg_spi_writeb(s,v,o) bcm_writeb((v), \
- bcm63xx_spireg(s) + (o))
-#define bcm_reg_spi_writew(s,v,o) bcm_writew((v), \
- bcm63xx_spireg(s) + (o))
/*
* helpers for frequently used register sets
@@ -95,9 +89,19 @@
#define bcm_memc_writel(v,o) bcm_rset_writel(RSET_MEMC, (v), (o))
#define bcm_ddr_readl(o) bcm_rset_readl(RSET_DDR, (o))
#define bcm_ddr_writel(v,o) bcm_rset_writel(RSET_DDR, (v), (o))
-#define bcm_spi_readb(o) bcm_reg_spi_readb(RSET_SPI, (o))
-#define bcm_spi_readw(o) bcm_reg_spi_readw(RSET_SPI, (o))
-#define bcm_spi_writeb(v,o) bcm_reg_spi_writeb(RSET_SPI, (v), (o))
-#define bcm_spi_writew(v,o) bcm_reg_spi_writew(RSET_SPI, (v), (o))
+
+/*
+ * helpers for the SPI register sets
+ */
+#define bcm_spi_readb(o) bcm_readb(bcm63xx_regset_address(RSET_SPI) + \
+ bcm63xx_spireg(o))
+#define bcm_spi_readw(o) bcm_readw(bcm63xx_regset_address(RSET_SPI) + \
+ bcm63xx_spireg(o))
+#define bcm_spi_writeb(v,o) bcm_writeb((v), \
+ bcm63xx_regset_address(RSET_SPI) + \
+ bcm63xx_spireg(o))
+#define bcm_spi_writew(v,o) bcm_writew((v), \
+ bcm63xx_regset_address(RSET_SPI) + \
+ bcm63xx_spireg(o))
#endif /* ! BCM63XX_IO_H_ */