diff options
author | Arthur Jones <arthur.jones@qlogic.com> | 2008-01-06 21:12:38 -0800 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2008-01-25 14:15:40 -0800 |
commit | 7da0498e7f0eb022107811b9d41697298329f6b4 (patch) | |
tree | 935cd0b8069561de4bb12b0a10eb254b0b9cf7f8 /drivers/infiniband/hw/ipath/ipath_kernel.h | |
parent | 4ea61b548bc93fb87cec6f52059851076e2ff54d (diff) | |
download | blackbird-obmc-linux-7da0498e7f0eb022107811b9d41697298329f6b4.tar.gz blackbird-obmc-linux-7da0498e7f0eb022107811b9d41697298329f6b4.zip |
IB/ipath: Add ipath_read_ireg() abstraction
Different chips have different width interrupt status registers, so add
a flag and accessor function to decide which width register read to use.
Signed-off-by: Arthur Jones <arthur.jones@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_kernel.h')
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_kernel.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_kernel.h b/drivers/infiniband/hw/ipath/ipath_kernel.h index e07df0068312..c47290422457 100644 --- a/drivers/infiniband/hw/ipath/ipath_kernel.h +++ b/drivers/infiniband/hw/ipath/ipath_kernel.h @@ -753,6 +753,8 @@ int ipath_set_rx_pol_inv(struct ipath_devdata *dd, u8 new_pol_inv); * are 64bit */ #define IPATH_32BITCOUNTERS 0x20000 /* can miss port0 rx interrupts */ + /* Interrupt register is 64 bits */ +#define IPATH_INTREG_64 0x40000 #define IPATH_DISABLED 0x80000 /* administratively disabled */ /* Use GPIO interrupts for new counters */ #define IPATH_GPIO_ERRINTRS 0x100000 @@ -958,6 +960,12 @@ static inline u32 ipath_get_rcvhdrtail(const struct ipath_portdata *pd) pd->port_rcvhdrtail_kvaddr)); } +static inline u64 ipath_read_ireg(const struct ipath_devdata *dd, ipath_kreg r) +{ + return (dd->ipath_flags & IPATH_INTREG_64) ? + ipath_read_kreg64(dd, r) : ipath_read_kreg32(dd, r); +} + /* * sysfs interface. */ |