aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_i2c.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/i915/intel_i2c.c')
-rw-r--r--drivers/gpu/drm/i915/intel_i2c.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/drivers/gpu/drm/i915/intel_i2c.c b/drivers/gpu/drm/i915/intel_i2c.c
index 3dba086e7eea..58040f68ed7a 100644
--- a/drivers/gpu/drm/i915/intel_i2c.c
+++ b/drivers/gpu/drm/i915/intel_i2c.c
@@ -85,8 +85,9 @@ static u32 get_reserved(struct intel_gpio *gpio)
85 85
86 /* On most chips, these bits must be preserved in software. */ 86 /* On most chips, these bits must be preserved in software. */
87 if (!IS_I830(dev) && !IS_845G(dev)) 87 if (!IS_I830(dev) && !IS_845G(dev))
88 reserved = I915_READ(gpio->reg) & (GPIO_DATA_PULLUP_DISABLE | 88 reserved = I915_READ_NOTRACE(gpio->reg) &
89 GPIO_CLOCK_PULLUP_DISABLE); 89 (GPIO_DATA_PULLUP_DISABLE |
90 GPIO_CLOCK_PULLUP_DISABLE);
90 91
91 return reserved; 92 return reserved;
92} 93}
@@ -96,9 +97,9 @@ static int get_clock(void *data)
96 struct intel_gpio *gpio = data; 97 struct intel_gpio *gpio = data;
97 struct drm_i915_private *dev_priv = gpio->dev_priv; 98 struct drm_i915_private *dev_priv = gpio->dev_priv;
98 u32 reserved = get_reserved(gpio); 99 u32 reserved = get_reserved(gpio);
99 I915_WRITE(gpio->reg, reserved | GPIO_CLOCK_DIR_MASK); 100 I915_WRITE_NOTRACE(gpio->reg, reserved | GPIO_CLOCK_DIR_MASK);
100 I915_WRITE(gpio->reg, reserved); 101 I915_WRITE_NOTRACE(gpio->reg, reserved);
101 return (I915_READ(gpio->reg) & GPIO_CLOCK_VAL_IN) != 0; 102 return (I915_READ_NOTRACE(gpio->reg) & GPIO_CLOCK_VAL_IN) != 0;
102} 103}
103 104
104static int get_data(void *data) 105static int get_data(void *data)
@@ -106,9 +107,9 @@ static int get_data(void *data)
106 struct intel_gpio *gpio = data; 107 struct intel_gpio *gpio = data;
107 struct drm_i915_private *dev_priv = gpio->dev_priv; 108 struct drm_i915_private *dev_priv = gpio->dev_priv;
108 u32 reserved = get_reserved(gpio); 109 u32 reserved = get_reserved(gpio);
109 I915_WRITE(gpio->reg, reserved | GPIO_DATA_DIR_MASK); 110 I915_WRITE_NOTRACE(gpio->reg, reserved | GPIO_DATA_DIR_MASK);
110 I915_WRITE(gpio->reg, reserved); 111 I915_WRITE_NOTRACE(gpio->reg, reserved);
111 return (I915_READ(gpio->reg) & GPIO_DATA_VAL_IN) != 0; 112 return (I915_READ_NOTRACE(gpio->reg) & GPIO_DATA_VAL_IN) != 0;
112} 113}
113 114
114static void set_clock(void *data, int state_high) 115static void set_clock(void *data, int state_high)
@@ -124,7 +125,7 @@ static void set_clock(void *data, int state_high)
124 clock_bits = GPIO_CLOCK_DIR_OUT | GPIO_CLOCK_DIR_MASK | 125 clock_bits = GPIO_CLOCK_DIR_OUT | GPIO_CLOCK_DIR_MASK |
125 GPIO_CLOCK_VAL_MASK; 126 GPIO_CLOCK_VAL_MASK;
126 127
127 I915_WRITE(gpio->reg, reserved | clock_bits); 128 I915_WRITE_NOTRACE(gpio->reg, reserved | clock_bits);
128 POSTING_READ(gpio->reg); 129 POSTING_READ(gpio->reg);
129} 130}
130 131
@@ -141,7 +142,7 @@ static void set_data(void *data, int state_high)
141 data_bits = GPIO_DATA_DIR_OUT | GPIO_DATA_DIR_MASK | 142 data_bits = GPIO_DATA_DIR_OUT | GPIO_DATA_DIR_MASK |
142 GPIO_DATA_VAL_MASK; 143 GPIO_DATA_VAL_MASK;
143 144
144 I915_WRITE(gpio->reg, reserved | data_bits); 145 I915_WRITE_NOTRACE(gpio->reg, reserved | data_bits);
145 POSTING_READ(gpio->reg); 146 POSTING_READ(gpio->reg);
146} 147}
147 148