diff options
Diffstat (limited to 'drivers/gpu/drm/i915/intel_i2c.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_i2c.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/gpu/drm/i915/intel_i2c.c b/drivers/gpu/drm/i915/intel_i2c.c index 99a04f8bcb1f..f02e52aca746 100644 --- a/drivers/gpu/drm/i915/intel_i2c.c +++ b/drivers/gpu/drm/i915/intel_i2c.c | |||
@@ -262,13 +262,6 @@ gmbus_xfer_write(struct drm_i915_private *dev_priv, struct i2c_msg *msg, | |||
262 | GMBUS_SLAVE_WRITE | GMBUS_SW_RDY); | 262 | GMBUS_SLAVE_WRITE | GMBUS_SW_RDY); |
263 | POSTING_READ(GMBUS2 + reg_offset); | 263 | POSTING_READ(GMBUS2 + reg_offset); |
264 | while (len) { | 264 | while (len) { |
265 | if (wait_for(I915_READ(GMBUS2 + reg_offset) & | ||
266 | (GMBUS_SATOER | GMBUS_HW_RDY), | ||
267 | 50)) | ||
268 | return -ETIMEDOUT; | ||
269 | if (I915_READ(GMBUS2 + reg_offset) & GMBUS_SATOER) | ||
270 | return -ENXIO; | ||
271 | |||
272 | val = loop = 0; | 265 | val = loop = 0; |
273 | do { | 266 | do { |
274 | val |= *buf++ << (8 * loop); | 267 | val |= *buf++ << (8 * loop); |
@@ -276,6 +269,13 @@ gmbus_xfer_write(struct drm_i915_private *dev_priv, struct i2c_msg *msg, | |||
276 | 269 | ||
277 | I915_WRITE(GMBUS3 + reg_offset, val); | 270 | I915_WRITE(GMBUS3 + reg_offset, val); |
278 | POSTING_READ(GMBUS2 + reg_offset); | 271 | POSTING_READ(GMBUS2 + reg_offset); |
272 | |||
273 | if (wait_for(I915_READ(GMBUS2 + reg_offset) & | ||
274 | (GMBUS_SATOER | GMBUS_HW_RDY), | ||
275 | 50)) | ||
276 | return -ETIMEDOUT; | ||
277 | if (I915_READ(GMBUS2 + reg_offset) & GMBUS_SATOER) | ||
278 | return -ENXIO; | ||
279 | } | 279 | } |
280 | return 0; | 280 | return 0; |
281 | } | 281 | } |