From: Magnus Damm <magnus.damm@gmail.com>
To: linux-sh@vger.kernel.org
Subject: [PATCH] sh: LCDC SYS bus access wait fix
Date: Thu, 06 Aug 2009 14:28:12 +0000 [thread overview]
Message-ID: <20090806142812.3947.24083.sendpatchset@rx1.opensource.se> (raw)
From: Magnus Damm <damm@igel.co.jp>
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>
---
Tested on Migo-R and kfr2r09.
drivers/video/sh_mobile_lcdcfb.c | 3 +++
1 file changed, 3 insertions(+)
--- 0001/drivers/video/sh_mobile_lcdcfb.c
+++ work/drivers/video/sh_mobile_lcdcfb.c 2009-08-06 21:34:30.000000000 +0900
@@ -154,6 +154,7 @@ static void lcdc_sys_write_index(void *h
lcdc_write(ch->lcdc, _LDDWD0R, data | 0x10000000);
lcdc_wait_bit(ch->lcdc, _LDSR, 2, 0);
lcdc_write(ch->lcdc, _LDDWAR, 1 | (lcdc_chan_is_sublcd(ch) ? 2 : 0));
+ lcdc_wait_bit(ch->lcdc, _LDSR, 2, 0);
}
static void lcdc_sys_write_data(void *handle, unsigned long data)
@@ -163,6 +164,7 @@ static void lcdc_sys_write_data(void *ha
lcdc_write(ch->lcdc, _LDDWD0R, data | 0x11000000);
lcdc_wait_bit(ch->lcdc, _LDSR, 2, 0);
lcdc_write(ch->lcdc, _LDDWAR, 1 | (lcdc_chan_is_sublcd(ch) ? 2 : 0));
+ lcdc_wait_bit(ch->lcdc, _LDSR, 2, 0);
}
static unsigned long lcdc_sys_read_data(void *handle)
@@ -173,6 +175,7 @@ static unsigned long lcdc_sys_read_data(
lcdc_wait_bit(ch->lcdc, _LDSR, 2, 0);
lcdc_write(ch->lcdc, _LDDRAR, 1 | (lcdc_chan_is_sublcd(ch) ? 2 : 0));
udelay(1);
+ lcdc_wait_bit(ch->lcdc, _LDSR, 2, 0);
return lcdc_read(ch->lcdc, _LDDRDR) & 0xffff;
}
next prev reply other threads:[~2009-08-06 14:28 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-06 15:16 [PATCH] sh: clean up Migo-R header file Magnus Damm
2009-08-06 15:12 ` [PATCH] sh: fix romImage mach dir usage Magnus Damm
2009-08-06 15:03 ` [PATCH] sh: LED9, LED10 and LED11 support for Solution Engine 7724 Magnus Damm
2009-08-06 14:58 ` [PATCH] sh: kfr2r09 board support - NAND flash Magnus Damm
2009-08-06 14:51 ` [PATCH] sh: kfr2r09 board support - LCDC panel Magnus Damm
2009-08-06 14:34 ` [PATCH] sh: 18-bit SYS panel fix for SuperH Mobile LCDC Magnus Damm
2009-08-06 14:28 ` Magnus Damm [this message]
2009-08-13 3:03 ` [PATCH] sh: LCDC SYS bus access wait fix Paul Mundt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090806142812.3947.24083.sendpatchset@rx1.opensource.se \
--to=magnus.damm@gmail.com \
--cc=linux-sh@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox