Subversion Repositories Kolibri OS

Rev

Rev 3480 | Rev 4104 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3480 Rev 3746
Line 226... Line 226...
226
	/* Important: The hw handles only the first bit, so set only one! Since
226
	/* Important: The hw handles only the first bit, so set only one! Since
227
	 * we also need to check for NAKs besides the hw ready/idle signal, we
227
	 * we also need to check for NAKs besides the hw ready/idle signal, we
228
	 * need to wake up periodically and check that ourselves. */
228
	 * need to wake up periodically and check that ourselves. */
229
	I915_WRITE(GMBUS4 + reg_offset, gmbus4_irq_en);
229
	I915_WRITE(GMBUS4 + reg_offset, gmbus4_irq_en);
Line 230... Line 230...
230
 
230
 
231
	for (i = 0; i < msecs_to_jiffies(50) + 1; i++) {
231
	for (i = 0; i < msecs_to_jiffies_timeout(50); i++) {
232
		prepare_to_wait(&dev_priv->gmbus_wait_queue, &wait,
232
		prepare_to_wait(&dev_priv->gmbus_wait_queue, &wait,
Line 233... Line 233...
233
				TASK_UNINTERRUPTIBLE);
233
				TASK_UNINTERRUPTIBLE);
234
 
234
 
Line 261... Line 261...
261
		return wait_for(C, 10);
261
		return wait_for(C, 10);
Line 262... Line 262...
262
 
262
 
263
	/* Important: The hw handles only the first bit, so set only one! */
263
	/* Important: The hw handles only the first bit, so set only one! */
Line 264... Line 264...
264
	I915_WRITE(GMBUS4 + reg_offset, GMBUS_IDLE_EN);
264
	I915_WRITE(GMBUS4 + reg_offset, GMBUS_IDLE_EN);
-
 
265
 
Line 265... Line 266...
265
 
266
	ret = wait_event_timeout(dev_priv->gmbus_wait_queue, C,
Line 266... Line 267...
266
	ret = wait_event_timeout(dev_priv->gmbus_wait_queue, C, 10);
267
				 msecs_to_jiffies_timeout(10));
267
 
268
 
Line 520... Line 521...
520
int intel_setup_gmbus(struct drm_device *dev)
521
int intel_setup_gmbus(struct drm_device *dev)
521
{
522
{
522
	struct drm_i915_private *dev_priv = dev->dev_private;
523
	struct drm_i915_private *dev_priv = dev->dev_private;
523
	int ret, i;
524
	int ret, i;
Line -... Line 525...
-
 
525
 
-
 
526
	if (HAS_PCH_NOP(dev))
524
 
527
		return 0;
525
	if (HAS_PCH_SPLIT(dev))
528
	else if (HAS_PCH_SPLIT(dev))
526
		dev_priv->gpio_mmio_base = PCH_GPIOA - GPIOA;
529
		dev_priv->gpio_mmio_base = PCH_GPIOA - GPIOA;
527
	else if (IS_VALLEYVIEW(dev))
530
	else if (IS_VALLEYVIEW(dev))
528
		dev_priv->gpio_mmio_base = VLV_DISPLAY_BASE;
531
		dev_priv->gpio_mmio_base = VLV_DISPLAY_BASE;
529
	else
532
	else