From patchwork Thu Aug 6 14:28:12 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 39620 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n76EUQfF031285 for ; Thu, 6 Aug 2009 14:32:27 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753373AbZHFOcZ (ORCPT ); Thu, 6 Aug 2009 10:32:25 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753402AbZHFOcZ (ORCPT ); Thu, 6 Aug 2009 10:32:25 -0400 Received: from rv-out-0506.google.com ([209.85.198.230]:5470 "EHLO rv-out-0506.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753373AbZHFOcY (ORCPT ); Thu, 6 Aug 2009 10:32:24 -0400 Received: by rv-out-0506.google.com with SMTP id f6so163394rvb.1 for ; Thu, 06 Aug 2009 07:32:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:date:message-id :subject; bh=79l/IYaU9bFZk5U0uoFWdfUnmQP3C4pSxnK2EnCxsnk=; b=mcDydz/ectUfhxywEdyjHj2UdYh9Q919CBD/eE23Yugej2YCw6Efy8FfxfDjwzQBLo xf7QHm3/JYB1sM4tnnPRvIJa3tfrAmoKhoi0YU91257FmSu4BZq1FCsmWW6mNVtkimcu boOVgIuc+ZWgQfuRcy7mgihxrQ0Sy0Aeex7KY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:date:message-id:subject; b=Wbv5MsphHJ6k2djQVME9rm3Xw3dHNqTWc+j8McAMK9WOlcDExfKaD33c8QzLn9lrLB Db7zUGsl0tTIM95njFG2uSS5RU0bsx/yO9ts4p/BTTDH3yHZF4knGC+obXCduYIu7Ss8 9C+Z/9SNjvfNWY43Op0+i+E02BlTyIL94ZZSE= Received: by 10.140.193.15 with SMTP id q15mr6090421rvf.157.1249569144807; Thu, 06 Aug 2009 07:32:24 -0700 (PDT) Received: from rx1.opensource.se (210.5.32.202.bf.2iij.net [202.32.5.210]) by mx.google.com with ESMTPS id k37sm222889rvb.52.2009.08.06.07.32.22 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 06 Aug 2009 07:32:24 -0700 (PDT) From: Magnus Damm To: linux-sh@vger.kernel.org Cc: Magnus Damm , lethal@linux-sh.org Date: Thu, 06 Aug 2009 23:28:12 +0900 Message-Id: <20090806142812.3947.24083.sendpatchset@rx1.opensource.se> Subject: [PATCH] sh: LCDC SYS bus access wait fix Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org From: Magnus Damm 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 --- 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 --- 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; }