#ifdef BRCM_FULLMAC
#include <bcmsdh.h>
#endif
-#define OSL_WRITE_REG(r, v) \
- (bcmsdh_reg_write(NULL, (unsigned long)(r), sizeof(*(r)), (v)))
-#define OSL_READ_REG(r) \
- (bcmsdh_reg_read(NULL, (unsigned long)(r), sizeof(*(r))))
#endif
#if defined(BCMSDIO)
SELECT_BUS_READ(sizeof(*(r)) == sizeof(u8) ? \
readb((volatile u8*)(r)) : \
sizeof(*(r)) == sizeof(u16) ? readw((volatile u16*)(r)) : \
- readl((volatile u32*)(r)), OSL_READ_REG(r)) \
+ readl((volatile u32*)(r)), bcmsdh_reg_read(NULL, (unsigned long)r, sizeof(*r))) \
)
#else /* __mips__ */
#define R_REG(r) (\
({ \
__typeof(*(r)) __osl_v; \
__asm__ __volatile__("sync"); \
- __osl_v = OSL_READ_REG(r); \
+ __osl_v = bcmsdh_reg_read(NULL, (unsigned long)r, sizeof(*r)); \
__asm__ __volatile__("sync"); \
__osl_v; \
})) \
case sizeof(u32): \
writel((u32)(v), (volatile u32*)(r)); break; \
}, \
- (OSL_WRITE_REG(r, v))); \
+ bcmsdh_reg_write(NULL, (unsigned long)r, sizeof(*r), (v))); \
} while (0)
#else /* __BIG_ENDIAN */
#define R_REG(r) (\
} \
__osl_v; \
}), \
- OSL_READ_REG(r)) \
+ bcmsdh_reg_read(NULL, (unsigned long)r, sizeof(*r))) \
)
#define W_REG(r, v) do { \
SELECT_BUS_WRITE( \
writel((u32)(v), \
(volatile u32*)(r)); break; \
}, \
- (OSL_WRITE_REG(r, v))); \
+ bcmsdh_reg_write(NULL, (unsigned long)r, sizeof(*r), v)); \
} while (0)
#endif /* __BIG_ENDIAN */