summaryrefslogtreecommitdiff
path: root/packages/linux/linux-openmoko-2.6.28/0006-Subject-fix_glamo_xrandr_bug.patch.patch
blob: b65e3513c2c0121a627de04d66e0382d5725aa3d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
From d0bc6c5baae3a711f5039ea5440bafb37ebdfc24 Mon Sep 17 00:00:00 2001
From: Balaji Rao <balajirrao@openmoko.org>
Date: Wed, 28 Jan 2009 19:30:45 +0000
Subject: [PATCH 6/8] Subject: fix_glamo_xrandr_bug.patch

fix_glamo_xrandr_bug.patch

This patch reintroduces the 2-cycle delay used when accessing glamo-fb
registers. This seems to be required even when the corresponding
registers in HOST_BUS are off.

Signed-off-by: Balaji Rao <balajirrao@openmoko.org>
---
 drivers/mfd/glamo/glamo-fb.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/drivers/mfd/glamo/glamo-fb.c b/drivers/mfd/glamo/glamo-fb.c
index 64fe464..91cf75b 100644
--- a/drivers/mfd/glamo/glamo-fb.c
+++ b/drivers/mfd/glamo/glamo-fb.c
@@ -86,12 +86,22 @@ static struct platform_device glamo_spi_dev = {
 static int reg_read(struct glamofb_handle *glamo,
 			   u_int16_t reg)
 {
+	int i = 0;
+
+	for (i = 0; i != 2; i ++)
+		nop();
+
 	return readw(glamo->base + reg);
 }
 
 static void reg_write(struct glamofb_handle *glamo,
 			     u_int16_t reg, u_int16_t val)
 {
+	int i = 0;
+
+	for (i = 0; i != 2; i ++)
+		nop();
+
 	writew(val, glamo->base + reg);
 }
 
-- 
1.5.2.2