summaryrefslogtreecommitdiff
path: root/target/linux/s3c24xx/patches-2.6.24/1073-glamo-cmdqueue-bandaid.patch.patch
diff options
context:
space:
mode:
authorMirko Vogt <mirko@openwrt.org>2008-12-12 11:58:53 +0000
committerMirko Vogt <mirko@openwrt.org>2008-12-12 11:58:53 +0000
commit614683faf8029100802db06a825648d0b6490285 (patch)
tree7401b135dc7ce24ff0175e67e0f2ce7f96296ff0 /target/linux/s3c24xx/patches-2.6.24/1073-glamo-cmdqueue-bandaid.patch.patch
parent4a018d2445c5f249179ff82c8fffb0e3b717f738 (diff)
downloadmtk-20170518-614683faf8029100802db06a825648d0b6490285.zip
mtk-20170518-614683faf8029100802db06a825648d0b6490285.tar.gz
mtk-20170518-614683faf8029100802db06a825648d0b6490285.tar.bz2
changed Makefile and profiles, added patches for kernel 2.6.24 (stable-branch of Openmoko)
SVN-Revision: 13613
Diffstat (limited to 'target/linux/s3c24xx/patches-2.6.24/1073-glamo-cmdqueue-bandaid.patch.patch')
-rw-r--r--target/linux/s3c24xx/patches-2.6.24/1073-glamo-cmdqueue-bandaid.patch.patch81
1 files changed, 81 insertions, 0 deletions
diff --git a/target/linux/s3c24xx/patches-2.6.24/1073-glamo-cmdqueue-bandaid.patch.patch b/target/linux/s3c24xx/patches-2.6.24/1073-glamo-cmdqueue-bandaid.patch.patch
new file mode 100644
index 0000000..ff11714
--- /dev/null
+++ b/target/linux/s3c24xx/patches-2.6.24/1073-glamo-cmdqueue-bandaid.patch.patch
@@ -0,0 +1,81 @@
+From ce8eaeee7875e668be4c2888fa05a61a5af0dd98 Mon Sep 17 00:00:00 2001
+From: mokopatches <mokopatches@openmoko.org>
+Date: Sun, 13 Apr 2008 07:23:59 +0100
+Subject: [PATCH] glamo-cmdqueue-bandaid.patch
+ [ Stop kernel from hanging every once in a while during Glamo
+ initialization. ]
+
+debug-glamo-fb-cmdqueue-wait-timeout.patch
+
+From: warmcat <andy@warmcat.com>
+---
+ drivers/mfd/glamo/glamo-fb.c | 30 +++++++++++++++++++++++++++---
+ 1 files changed, 27 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/mfd/glamo/glamo-fb.c b/drivers/mfd/glamo/glamo-fb.c
+index 394a0ad..f0d7600 100644
+--- a/drivers/mfd/glamo/glamo-fb.c
++++ b/drivers/mfd/glamo/glamo-fb.c
+@@ -553,12 +553,20 @@ static inline int glamofb_cmdq_empty(struct glamofb_handle *gfb)
+
+ void glamofb_cmd_mode(struct glamofb_handle *gfb, int on)
+ {
++ int timeout = 2000;
++
+ dev_dbg(gfb->dev, "glamofb_cmd_mode(gfb=%p, on=%d)\n", gfb, on);
+ if (on) {
+ dev_dbg(gfb->dev, "%s: waiting for cmdq empty: ",
+ __FUNCTION__);
+- while (!glamofb_cmdq_empty(gfb))
++ while ((!glamofb_cmdq_empty(gfb)) && (timeout--))
+ yield();
++ if (timeout < 0) {
++ printk(KERN_ERR"*************"
++ "glamofb cmd_queue never got empty"
++ "*************\n");
++ return;
++ }
+ dev_dbg(gfb->dev, "empty!\n");
+
+ /* display the entire frame then switch to command */
+@@ -568,8 +576,16 @@ void glamofb_cmd_mode(struct glamofb_handle *gfb, int on)
+
+ /* wait until LCD is idle */
+ dev_dbg(gfb->dev, "waiting for LCD idle: ");
+- while (!reg_read(gfb, GLAMO_REG_LCD_STATUS2) & (1 << 12))
++ timeout = 2000;
++ while ((!reg_read(gfb, GLAMO_REG_LCD_STATUS2) & (1 << 12)) &&
++ (timeout--))
+ yield();
++ if (timeout < 0) {
++ printk(KERN_ERR"*************"
++ "glamofb lcd never idle"
++ "*************\n");
++ return;
++ }
+ dev_dbg(gfb->dev, "idle!\n");
+
+ msleep(90);
+@@ -589,10 +605,18 @@ EXPORT_SYMBOL_GPL(glamofb_cmd_mode);
+
+ int glamofb_cmd_write(struct glamofb_handle *gfb, u_int16_t val)
+ {
++ int timeout = 2000;
++
+ dev_dbg(gfb->dev, "%s: waiting for cmdq empty\n",
+ __FUNCTION__);
+- while (!glamofb_cmdq_empty(gfb))
++ while ((!glamofb_cmdq_empty(gfb)) && (timeout--))
+ yield();
++ if (timeout < 0) {
++ printk(KERN_ERR"*************"
++ "glamofb cmd_queue never got empty"
++ "*************\n");
++ return 1;
++ }
+ dev_dbg(gfb->dev, "idle, writing 0x%04x\n", val);
+
+ reg_write(gfb, GLAMO_REG_LCD_COMMAND1, val);
+--
+1.5.6.5
+