diff options
author | Dave Olson <dave.olson@qlogic.com> | 2007-12-21 04:50:59 -0500 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2008-01-25 17:15:36 -0500 |
commit | d8274869d742c3d8082e1428de47e54d12104928 (patch) | |
tree | 128d36e05d5facbff15652eb24faf03cbec3da8e /drivers/infiniband/hw/ipath/ipath_iba6120.c | |
parent | c59a80aca0bfc491d90534ed5606d5493eca24a3 (diff) |
IB/ipath: Generalize some xxx_SHIFT macros
In preparation for upcoming chips that have different values for
INFINIPATH_R_PORTENABLE_SHIFT, INFINIPATH_R_INTRAVAIL_SHIFT,
INFINIPATH_R_TAILUPD_SHIFT, and portcfg_shift, remove the shared
#defines and use device-specific variables instead.
Signed-off-by: Dave Olson <dave.olson@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_iba6120.c')
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_iba6120.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_iba6120.c b/drivers/infiniband/hw/ipath/ipath_iba6120.c index 0103d6f4847b..e6893ebc59d4 100644 --- a/drivers/infiniband/hw/ipath/ipath_iba6120.c +++ b/drivers/infiniband/hw/ipath/ipath_iba6120.c | |||
@@ -296,6 +296,9 @@ static const struct ipath_cregs ipath_pe_cregs = { | |||
296 | #define IPATH_GPIO_SCL (1ULL << \ | 296 | #define IPATH_GPIO_SCL (1ULL << \ |
297 | (_IPATH_GPIO_SCL_NUM+INFINIPATH_EXTC_GPIOOE_SHIFT)) | 297 | (_IPATH_GPIO_SCL_NUM+INFINIPATH_EXTC_GPIOOE_SHIFT)) |
298 | 298 | ||
299 | #define INFINIPATH_R_INTRAVAIL_SHIFT 16 | ||
300 | #define INFINIPATH_R_TAILUPD_SHIFT 31 | ||
301 | |||
299 | /* 6120 specific hardware errors... */ | 302 | /* 6120 specific hardware errors... */ |
300 | static const struct ipath_hwerror_msgs ipath_6120_hwerror_msgs[] = { | 303 | static const struct ipath_hwerror_msgs ipath_6120_hwerror_msgs[] = { |
301 | INFINIPATH_HWE_MSG(PCIEPOISONEDTLP, "PCIe Poisoned TLP"), | 304 | INFINIPATH_HWE_MSG(PCIEPOISONEDTLP, "PCIe Poisoned TLP"), |
@@ -916,6 +919,12 @@ static void ipath_init_pe_variables(struct ipath_devdata *dd) | |||
916 | dd->ipath_gpio_sda = IPATH_GPIO_SDA; | 919 | dd->ipath_gpio_sda = IPATH_GPIO_SDA; |
917 | dd->ipath_gpio_scl = IPATH_GPIO_SCL; | 920 | dd->ipath_gpio_scl = IPATH_GPIO_SCL; |
918 | 921 | ||
922 | /* Fill in shifts for RcvCtrl. */ | ||
923 | dd->ipath_r_portenable_shift = INFINIPATH_R_PORTENABLE_SHIFT; | ||
924 | dd->ipath_r_intravail_shift = INFINIPATH_R_INTRAVAIL_SHIFT; | ||
925 | dd->ipath_r_tailupd_shift = INFINIPATH_R_TAILUPD_SHIFT; | ||
926 | dd->ipath_r_portcfg_shift = 0; /* Not on IBA6120 */ | ||
927 | |||
919 | /* variables for sanity checking interrupt and errors */ | 928 | /* variables for sanity checking interrupt and errors */ |
920 | dd->ipath_hwe_bitsextant = | 929 | dd->ipath_hwe_bitsextant = |
921 | (INFINIPATH_HWE_RXEMEMPARITYERR_MASK << | 930 | (INFINIPATH_HWE_RXEMEMPARITYERR_MASK << |