diff mbox

sh: LCDC SYS bus access wait fix

Message ID 20090806142812.3947.24083.sendpatchset@rx1.opensource.se (mailing list archive)
State Accepted
Headers show

Commit Message

Magnus Damm Aug. 6, 2009, 2:28 p.m. UTC
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(+)

--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Paul Mundt Aug. 13, 2009, 3:03 a.m. UTC | #1
On Thu, Aug 06, 2009 at 11:28:12PM +0900, Magnus Damm wrote:
> 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.

On Thu, Aug 06, 2009 at 11:34:38PM +0900, Magnus Damm wrote:
> Fix the SuperH Mobile LCDC driver to make use of the full
> 18-bit DRD field in the LDDRDR register. Without this patch
> only 16-bit register access is possible. Needed by 18-bit
> SYS panels such as the one used on kfr2r09.

On Thu, Aug 06, 2009 at 11:51:30PM +0900, Magnus Damm wrote:
> This patch adds support for the WQVGA LCD display used by
> the KFR2R09 board. The LCD module is a TX07D34VM0AAA made
> by Hitachi, and this module is made up by a R61517 chip
> together with a 240x400 pixel display. The screen is
> attached to the SuperH Mobile LCDC using a 18-bit SYS bus.
> 
> The register settings used by the SYS panel setup code are
> based on an out-of-tree driver which apart from duplicating
> all LCDC driver code and writing to non-existing hardware
> registers also never was posted for upstream merge.

On Thu, Aug 06, 2009 at 11:58:43PM +0900, Magnus Damm wrote:
> This patch adds support for the NAND flash chip
> attached to CS4 on the KFR2R09 board. The device is
> driven by the platform device driver "onenand-flash".

On Fri, Aug 07, 2009 at 12:03:43AM +0900, Magnus Damm wrote:
> This patch adds support for LED9, LED10 and LED11 on
> the Solution Engine 7724 board. If CONFIG_PM is enabled
> then these LEDs are used to show the hardware sleep
> mode used by the processor. Useful to debug cpuidle.

On Fri, Aug 07, 2009 at 12:12:27AM +0900, Magnus Damm wrote:
> This patch moves all the romImage related header files into
> the mach/ directory.

On Fri, Aug 07, 2009 at 12:16:29AM +0900, Magnus Damm wrote:
> This patch moves the Migo-R specific header file from
> mach-common/ into mach-migor/ and removes unused cruft.

All applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

--- 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;
 }