From e9c1588c44daa953240f7fedbf8100cf840414f5 Mon Sep 17 00:00:00 2001
From: Andy Green <andy@openmoko.com>
Date: Sun, 13 Apr 2008 07:25:56 +0100
Subject: [PATCH] fix-glamofb-cmdqueue-timeout.patch

loglevl=9 can cause failure to init glamo-fb
problem seems to be too low timeout when text scrolling can
delay commandqueue going empty

Signed-off-by: Andy Green <andy@openmoko.com>
---
 drivers/mfd/glamo/glamo-fb.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/mfd/glamo/glamo-fb.c b/drivers/mfd/glamo/glamo-fb.c
index f0d7600..87c7420 100644
--- a/drivers/mfd/glamo/glamo-fb.c
+++ b/drivers/mfd/glamo/glamo-fb.c
@@ -548,12 +548,13 @@ static int glamofb_cursor(struct fb_info *info, struct fb_cursor *cursor)
 
 static inline int glamofb_cmdq_empty(struct glamofb_handle *gfb)
 {
+	/* DGCMdQempty -- 1 == command queue is empty */
 	return reg_read(gfb, GLAMO_REG_LCD_STATUS1) & (1 << 15);
 }
 
 void glamofb_cmd_mode(struct glamofb_handle *gfb, int on)
 {
-	int timeout = 2000;
+	int timeout = 20000;
 
 	dev_dbg(gfb->dev, "glamofb_cmd_mode(gfb=%p, on=%d)\n", gfb, on);
 	if (on) {
@@ -605,7 +606,7 @@ EXPORT_SYMBOL_GPL(glamofb_cmd_mode);
 
 int glamofb_cmd_write(struct glamofb_handle *gfb, u_int16_t val)
 {
-	int timeout = 2000;
+	int timeout = 20000;
 
 	dev_dbg(gfb->dev, "%s: waiting for cmdq empty\n",
 		__FUNCTION__);
-- 
1.5.6.5

ctive' href='/cgit.cgi/avr/qmk/firmware/tree/keyboards/jnao/rules.mk?id=044b4aaf018522ae326bae71ae5a899930fbdf1b'>tree</a><a href='/cgit.cgi/avr/qmk/firmware/commit/keyboards/jnao/rules.mk?id=044b4aaf018522ae326bae71ae5a899930fbdf1b'>commit</a><a href='/cgit.cgi/avr/qmk/firmware/diff/keyboards/jnao/rules.mk?id=044b4aaf018522ae326bae71ae5a899930fbdf1b'>diff</a><a href='/cgit.cgi/avr/qmk/firmware/stats/keyboards/jnao/rules.mk'>stats</a></td><td class='form'><form class='right' method='get' action='/cgit.cgi/avr/qmk/firmware/log/keyboards/jnao/rules.mk'>
<input type='hidden' name='id' value='044b4aaf018522ae326bae71ae5a899930fbdf1b'/><select name='qt'>
<option value='grep'>log msg</option>
<option value='author'>author</option>
<option value='committer'>committer</option>
<option value='range'>range</option>
</select>
<input class='txt' type='search' size='10' name='q' value=''/>
<input type='submit' value='search'/>
</form>
</td></tr></table>
<div class='path'>path: <a href='/cgit.cgi/avr/qmk/firmware/tree/?id=044b4aaf018522ae326bae71ae5a899930fbdf1b'>root</a>/<a href='/cgit.cgi/avr/qmk/firmware/tree/keyboards?id=044b4aaf018522ae326bae71ae5a899930fbdf1b'>keyboards</a>/<a href='/cgit.cgi/avr/qmk/firmware/tree/keyboards/jnao?id=044b4aaf018522ae326bae71ae5a899930fbdf1b'>jnao</a>/<a href='/cgit.cgi/avr/qmk/firmware/tree/keyboards/jnao/rules.mk?id=044b4aaf018522ae326bae71ae5a899930fbdf1b'>rules.mk</a></div><div class='content'>blob: 0dcd21146ced80d5f269ab4232a2b729e9716f62 (<a href='/cgit.cgi/avr/qmk/firmware/plain/keyboards/jnao/rules.mk?id=044b4aaf018522ae326bae71ae5a899930fbdf1b'>plain</a>)
<table summary='blob content' class='blob'>
<tr><td class='linenumbers'><pre><a id='n1' href='#n1'>1</a>
<a id='n2' href='#n2'>2</a>
<a id='n3' href='#n3'>3</a>
<a id='n4' href='#n4'>4</a>
<a id='n5' href='#n5'>5</a>
<a id='n6' href='#n6'>6</a>
<a id='n7' href='#n7'>7</a>
<a id='n8' href='#n8'>8</a>
<a id='n9' href='#n9'>9</a>
<a id='n10' href='#n10'>10</a>
<a id='n11' href='#n11'>11</a>
<a id='n12' href='#n12'>12</a>
<a id='n13' href='#n13'>13</a>
<a id='n14' href='#n14'>14</a>
<a id='n15' href='#n15'>15</a>
<a id='n16' href='#n16'>16</a>
<a id='n17' href='#n17'>17</a>
<a id='n18' href='#n18'>18</a>
<a id='n19' href='#n19'>19</a>
<a id='n20' href='#n20'>20</a>
<a id='n21' href='#n21'>21</a>
<a id='n22' href='#n22'>22</a>
<a id='n23' href='#n23'>23</a>
<a id='n24' href='#n24'>24</a>
<a id='n25' href='#n25'>25</a>
<a id='n26' href='#n26'>26</a>
<a id='n27' href='#n27'>27</a>
<a id='n28' href='#n28'>28</a>
<a id='n29' href='#n29'>29</a>
<a id='n30' href='#n30'>30</a>
<a id='n31' href='#n31'>31</a>
<a id='n32' href='#n32'>32</a>
<a id='n33' href='#n33'>33</a>
<a id='n34' href='#n34'>34</a>
<a id='n35' href='#n35'>35</a>
<a id='n36' href='#n36'>36</a>
</pre></td>
<td class='lines'><pre><code>