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_iba6110.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_iba6110.c')
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_iba6110.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_iba6110.c b/drivers/infiniband/hw/ipath/ipath_iba6110.c index ddbebe4bdb27..c272a7392e22 100644 --- a/drivers/infiniband/hw/ipath/ipath_iba6110.c +++ b/drivers/infiniband/hw/ipath/ipath_iba6110.c | |||
@@ -296,6 +296,12 @@ static const struct ipath_cregs ipath_ht_cregs = { | |||
296 | #define INFINIPATH_RT_BUFSIZE_MASK 0x3FFFULL | 296 | #define INFINIPATH_RT_BUFSIZE_MASK 0x3FFFULL |
297 | #define INFINIPATH_RT_BUFSIZE_SHIFT 48 | 297 | #define INFINIPATH_RT_BUFSIZE_SHIFT 48 |
298 | 298 | ||
299 | #define INFINIPATH_R_INTRAVAIL_SHIFT 16 | ||
300 | #define INFINIPATH_R_TAILUPD_SHIFT 31 | ||
301 | |||
302 | /* kr_xgxsconfig bits */ | ||
303 | #define INFINIPATH_XGXS_RESET 0x7ULL | ||
304 | |||
299 | /* | 305 | /* |
300 | * masks and bits that are different in different chips, or present only | 306 | * masks and bits that are different in different chips, or present only |
301 | * in one | 307 | * in one |
@@ -1079,6 +1085,12 @@ static void ipath_init_ht_variables(struct ipath_devdata *dd) | |||
1079 | dd->ipath_gpio_sda = IPATH_GPIO_SDA; | 1085 | dd->ipath_gpio_sda = IPATH_GPIO_SDA; |
1080 | dd->ipath_gpio_scl = IPATH_GPIO_SCL; | 1086 | dd->ipath_gpio_scl = IPATH_GPIO_SCL; |
1081 | 1087 | ||
1088 | /* Fill in shifts for RcvCtrl. */ | ||
1089 | dd->ipath_r_portenable_shift = INFINIPATH_R_PORTENABLE_SHIFT; | ||
1090 | dd->ipath_r_intravail_shift = INFINIPATH_R_INTRAVAIL_SHIFT; | ||
1091 | dd->ipath_r_tailupd_shift = INFINIPATH_R_TAILUPD_SHIFT; | ||
1092 | dd->ipath_r_portcfg_shift = 0; /* Not on IBA6110 */ | ||
1093 | |||
1082 | dd->ipath_i_bitsextant = | 1094 | dd->ipath_i_bitsextant = |
1083 | (INFINIPATH_I_RCVURG_MASK << INFINIPATH_I_RCVURG_SHIFT) | | 1095 | (INFINIPATH_I_RCVURG_MASK << INFINIPATH_I_RCVURG_SHIFT) | |
1084 | (INFINIPATH_I_RCVAVAIL_MASK << | 1096 | (INFINIPATH_I_RCVAVAIL_MASK << |