aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/sh_mobile_lcdcfb.c
diff options
context:
space:
mode:
authorMagnus Damm <damm@igel.co.jp>2009-08-06 10:28:12 -0400
committerPaul Mundt <lethal@linux-sh.org>2009-08-06 14:54:52 -0400
commit909f10de5de81668e4d0a401f3cb5ca6b8a3d20d (patch)
tree829643f3adbc6d927e15fa55fc7afdfd83001942 /drivers/video/sh_mobile_lcdcfb.c
parentc1155e34998bc07937cdf0c9db16b6902633a255 (diff)
sh: LCDC SYS bus access wait fix
Update the SuperH Mobile LCDC driver to wait for SYS bus to become idle after reading or writing. This is needed by the kfr2r09 board, but also fixes potential problems on other boards making use of the LCDC in a SYS configuration. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'drivers/video/sh_mobile_lcdcfb.c')
-rw-r--r--drivers/video/sh_mobile_lcdcfb.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c
index 98fb82f11611..d1eb9656ca55 100644
--- a/drivers/video/sh_mobile_lcdcfb.c
+++ b/drivers/video/sh_mobile_lcdcfb.c
@@ -154,6 +154,7 @@ static void lcdc_sys_write_index(void *handle, unsigned long data)
154 lcdc_write(ch->lcdc, _LDDWD0R, data | 0x10000000); 154 lcdc_write(ch->lcdc, _LDDWD0R, data | 0x10000000);
155 lcdc_wait_bit(ch->lcdc, _LDSR, 2, 0); 155 lcdc_wait_bit(ch->lcdc, _LDSR, 2, 0);
156 lcdc_write(ch->lcdc, _LDDWAR, 1 | (lcdc_chan_is_sublcd(ch) ? 2 : 0)); 156 lcdc_write(ch->lcdc, _LDDWAR, 1 | (lcdc_chan_is_sublcd(ch) ? 2 : 0));
157 lcdc_wait_bit(ch->lcdc, _LDSR, 2, 0);
157} 158}
158 159
159static void lcdc_sys_write_data(void *handle, unsigned long data) 160static void lcdc_sys_write_data(void *handle, unsigned long data)
@@ -163,6 +164,7 @@ static void lcdc_sys_write_data(void *handle, unsigned long data)
163 lcdc_write(ch->lcdc, _LDDWD0R, data | 0x11000000); 164 lcdc_write(ch->lcdc, _LDDWD0R, data | 0x11000000);
164 lcdc_wait_bit(ch->lcdc, _LDSR, 2, 0); 165 lcdc_wait_bit(ch->lcdc, _LDSR, 2, 0);
165 lcdc_write(ch->lcdc, _LDDWAR, 1 | (lcdc_chan_is_sublcd(ch) ? 2 : 0)); 166 lcdc_write(ch->lcdc, _LDDWAR, 1 | (lcdc_chan_is_sublcd(ch) ? 2 : 0));
167 lcdc_wait_bit(ch->lcdc, _LDSR, 2, 0);
166} 168}
167 169
168static unsigned long lcdc_sys_read_data(void *handle) 170static unsigned long lcdc_sys_read_data(void *handle)
@@ -173,6 +175,7 @@ static unsigned long lcdc_sys_read_data(void *handle)
173 lcdc_wait_bit(ch->lcdc, _LDSR, 2, 0); 175 lcdc_wait_bit(ch->lcdc, _LDSR, 2, 0);
174 lcdc_write(ch->lcdc, _LDDRAR, 1 | (lcdc_chan_is_sublcd(ch) ? 2 : 0)); 176 lcdc_write(ch->lcdc, _LDDRAR, 1 | (lcdc_chan_is_sublcd(ch) ? 2 : 0));
175 udelay(1); 177 udelay(1);
178 lcdc_wait_bit(ch->lcdc, _LDSR, 2, 0);
176 179
177 return lcdc_read(ch->lcdc, _LDDRDR) & 0xffff; 180 return lcdc_read(ch->lcdc, _LDDRDR) & 0xffff;
178} 181}