X-Git-Url: http://git.rohieb.name/openwrt.git/blobdiff_plain/8bd259b28182af357371fd6048fa7198ad4b7a25..07537ed74301efdc7c26faf1acb4aa175c463696:/target/linux/brcm63xx/files/include/asm-mips/mach-bcm63xx/bcm63xx_io.h 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 af9861115..31e950e11 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(b,o) bcm_readb((b) + \ + bcm63xx_spireg(o)) +#define bcm_spi_readw(b,o) bcm_readw((b) + \ + bcm63xx_spireg(o)) +#define bcm_spi_writeb(v,b,o) bcm_writeb((v), \ + (b) + \ + bcm63xx_spireg(o)) +#define bcm_spi_writew(v,b,o) bcm_writew((v), \ + (b) + \ + bcm63xx_spireg(o)) #endif /* ! BCM63XX_IO_H_ */