From patchwork Fri May 13 15:54:46 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anatolij Gustschin X-Patchwork-Id: 783452 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p4DFswPY015420 for ; Fri, 13 May 2011 15:54:59 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932829Ab1EMPyu (ORCPT ); Fri, 13 May 2011 11:54:50 -0400 Received: from mail-out.m-online.net ([212.18.0.10]:38178 "EHLO mail-out.m-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932753Ab1EMPys (ORCPT ); Fri, 13 May 2011 11:54:48 -0400 Received: from frontend1.mail.m-online.net (frontend1.mail.intern.m-online.net [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 197AF188A19E; Fri, 13 May 2011 17:54:47 +0200 (CEST) X-Auth-Info: my+Cn+0yh7s3rcIvXbqH4kPaFXc/DjGSGT3x4cyuECE= Received: from localhost (p4FDE7278.dip.t-dialin.net [79.222.114.120]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA id 1F7671C0009D; Fri, 13 May 2011 17:54:47 +0200 (CEST) From: Anatolij Gustschin To: linux-fbdev@vger.kernel.org Cc: Paul Mundt , Detlev Zundel Subject: [PATCH 2/5] video: mb862xxfb: use pre-initialized configuration for PCI GDCs Date: Fri, 13 May 2011 17:54:46 +0200 Message-Id: <1305302089-7666-3-git-send-email-agust@denx.de> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1305302089-7666-1-git-send-email-agust@denx.de> References: <1305302089-7666-1-git-send-email-agust@denx.de> Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Fri, 13 May 2011 15:54:59 +0000 (UTC) If the bootloader has already initialized the display controller, do not re-initialize it in the driver. Take over the bootloader's configuration instead. This is already supported for non PCI GDCs Lime and Mint. Add this functionality for PCI GDCs Coral-P and Coral-PA. It is useful to avoid flicker and also avoids unneeded init delays while booting. Signed-off-by: Anatolij Gustschin --- drivers/video/mb862xx/mb862xxfb.c | 16 ++++++++++++---- 1 files changed, 12 insertions(+), 4 deletions(-) diff --git a/drivers/video/mb862xx/mb862xxfb.c b/drivers/video/mb862xx/mb862xxfb.c index 8257958..a1b81e7 100644 --- a/drivers/video/mb862xx/mb862xxfb.c +++ b/drivers/video/mb862xx/mb862xxfb.c @@ -746,13 +746,21 @@ static int coralp_init(struct mb862xxfb_par *par) cn = (ver & GC_CID_CNAME_MSK) >> 8; ver = ver & GC_CID_VERSION_MSK; if (cn == 3) { + unsigned long reg; + dev_info(par->dev, "Fujitsu Coral-%s GDC Rev.%d found\n",\ (ver == 6) ? "P" : (ver == 8) ? "PA" : "?", par->pdev->revision); - outreg(host, GC_CCF, GC_CCF_CGE_166 | GC_CCF_COT_133); - udelay(200); - outreg(host, GC_MMR, GC_MMR_CORALP_EVB_VAL); - udelay(10); + reg = inreg(disp, GC_DCM1); + if (reg & GC_DCM01_DEN && reg & GC_DCM01_L0E) + par->pre_init = 1; + + if (!par->pre_init) { + outreg(host, GC_CCF, GC_CCF_CGE_166 | GC_CCF_COT_133); + udelay(200); + outreg(host, GC_MMR, GC_MMR_CORALP_EVB_VAL); + udelay(10); + } /* Clear interrupt status */ outreg(host, GC_IST, 0); } else {