aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ipath/ipath_eeprom.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_eeprom.c')
-rw-r--r--drivers/infiniband/hw/ipath/ipath_eeprom.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_eeprom.c b/drivers/infiniband/hw/ipath/ipath_eeprom.c
index 3313356ab93a..c8cfda89cb36 100644
--- a/drivers/infiniband/hw/ipath/ipath_eeprom.c
+++ b/drivers/infiniband/hw/ipath/ipath_eeprom.c
@@ -100,9 +100,9 @@ static int i2c_gpio_set(struct ipath_devdata *dd,
100 gpioval = &dd->ipath_gpio_out; 100 gpioval = &dd->ipath_gpio_out;
101 read_val = ipath_read_kreg64(dd, dd->ipath_kregs->kr_extctrl); 101 read_val = ipath_read_kreg64(dd, dd->ipath_kregs->kr_extctrl);
102 if (line == i2c_line_scl) 102 if (line == i2c_line_scl)
103 mask = ipath_gpio_scl; 103 mask = dd->ipath_gpio_scl;
104 else 104 else
105 mask = ipath_gpio_sda; 105 mask = dd->ipath_gpio_sda;
106 106
107 if (new_line_state == i2c_line_high) 107 if (new_line_state == i2c_line_high)
108 /* tri-state the output rather than force high */ 108 /* tri-state the output rather than force high */
@@ -119,12 +119,12 @@ static int i2c_gpio_set(struct ipath_devdata *dd,
119 write_val = 0x0UL; 119 write_val = 0x0UL;
120 120
121 if (line == i2c_line_scl) { 121 if (line == i2c_line_scl) {
122 write_val <<= ipath_gpio_scl_num; 122 write_val <<= dd->ipath_gpio_scl_num;
123 *gpioval = *gpioval & ~(1UL << ipath_gpio_scl_num); 123 *gpioval = *gpioval & ~(1UL << dd->ipath_gpio_scl_num);
124 *gpioval |= write_val; 124 *gpioval |= write_val;
125 } else { 125 } else {
126 write_val <<= ipath_gpio_sda_num; 126 write_val <<= dd->ipath_gpio_sda_num;
127 *gpioval = *gpioval & ~(1UL << ipath_gpio_sda_num); 127 *gpioval = *gpioval & ~(1UL << dd->ipath_gpio_sda_num);
128 *gpioval |= write_val; 128 *gpioval |= write_val;
129 } 129 }
130 ipath_write_kreg(dd, dd->ipath_kregs->kr_gpio_out, *gpioval); 130 ipath_write_kreg(dd, dd->ipath_kregs->kr_gpio_out, *gpioval);
@@ -157,9 +157,9 @@ static int i2c_gpio_get(struct ipath_devdata *dd,
157 read_val = ipath_read_kreg64(dd, dd->ipath_kregs->kr_extctrl); 157 read_val = ipath_read_kreg64(dd, dd->ipath_kregs->kr_extctrl);
158 /* config line to be an input */ 158 /* config line to be an input */
159 if (line == i2c_line_scl) 159 if (line == i2c_line_scl)
160 mask = ipath_gpio_scl; 160 mask = dd->ipath_gpio_scl;
161 else 161 else
162 mask = ipath_gpio_sda; 162 mask = dd->ipath_gpio_sda;
163 write_val = read_val & ~mask; 163 write_val = read_val & ~mask;
164 ipath_write_kreg(dd, dd->ipath_kregs->kr_extctrl, write_val); 164 ipath_write_kreg(dd, dd->ipath_kregs->kr_extctrl, write_val);
165 read_val = ipath_read_kreg64(dd, dd->ipath_kregs->kr_extstatus); 165 read_val = ipath_read_kreg64(dd, dd->ipath_kregs->kr_extstatus);