diff options
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_def.h')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_def.h | 53 |
1 files changed, 44 insertions, 9 deletions
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h index 5ca46b15ca3c..4b02b48af85d 100644 --- a/drivers/scsi/qla2xxx/qla_def.h +++ b/drivers/scsi/qla2xxx/qla_def.h @@ -128,15 +128,50 @@ static inline uint32_t make_handle(uint16_t x, uint16_t y) * I/O register */ -#define RD_REG_BYTE(addr) readb(addr) -#define RD_REG_WORD(addr) readw(addr) -#define RD_REG_DWORD(addr) readl(addr) -#define RD_REG_BYTE_RELAXED(addr) readb_relaxed(addr) -#define RD_REG_WORD_RELAXED(addr) readw_relaxed(addr) -#define RD_REG_DWORD_RELAXED(addr) readl_relaxed(addr) -#define WRT_REG_BYTE(addr, data) writeb(data, addr) -#define WRT_REG_WORD(addr, data) writew(data, addr) -#define WRT_REG_DWORD(addr, data) writel(data, addr) +static inline u8 RD_REG_BYTE(const volatile u8 __iomem *addr) +{ + return readb(addr); +} + +static inline u16 RD_REG_WORD(const volatile __le16 __iomem *addr) +{ + return readw(addr); +} + +static inline u32 RD_REG_DWORD(const volatile __le32 __iomem *addr) +{ + return readl(addr); +} + +static inline u8 RD_REG_BYTE_RELAXED(const volatile u8 __iomem *addr) +{ + return readb_relaxed(addr); +} + +static inline u16 RD_REG_WORD_RELAXED(const volatile __le16 __iomem *addr) +{ + return readw_relaxed(addr); +} + +static inline u32 RD_REG_DWORD_RELAXED(const volatile __le32 __iomem *addr) +{ + return readl_relaxed(addr); +} + +static inline void WRT_REG_BYTE(volatile u8 __iomem *addr, u8 data) +{ + return writeb(data, addr); +} + +static inline void WRT_REG_WORD(volatile __le16 __iomem *addr, u16 data) +{ + return writew(data, addr); +} + +static inline void WRT_REG_DWORD(volatile __le32 __iomem *addr, u32 data) +{ + return writel(data, addr); +} /* * ISP83XX specific remote register addresses |