From patchwork Mon Aug 29 09:29:31 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 74884 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp1536346qga; Mon, 29 Aug 2016 02:29:49 -0700 (PDT) X-Received: by 10.66.233.166 with SMTP id tx6mr26761594pac.120.1472462989362; Mon, 29 Aug 2016 02:29:49 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id zr3si38222853pac.131.2016.08.29.02.29.49; Mon, 29 Aug 2016 02:29:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-fbdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-fbdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-fbdev-owner@vger.kernel.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932779AbcH2J3s (ORCPT + 2 others); Mon, 29 Aug 2016 05:29:48 -0400 Received: from mail-lf0-f45.google.com ([209.85.215.45]:35556 "EHLO mail-lf0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756842AbcH2J3r (ORCPT ); Mon, 29 Aug 2016 05:29:47 -0400 Received: by mail-lf0-f45.google.com with SMTP id f93so96516363lfi.2 for ; Mon, 29 Aug 2016 02:29:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=34sr6wOFnCYz68NUjBt6R87DE3q1BzErTuvg0Glo7vA=; b=FQqoAAweKcjnOUOESwLYSlkHm3EUBVW0rjK7epEyhOwwyF1FpZBPitViko2XROz3b+ 293PeOLXuDgILS0pgQ6fXClOyhiB/d+Ese4IJ5ITUfbU0OwT7BxFxj1fj46znBjN2ezN JXiTJdl0mAHM1mfTMueTwpBasm5LamPZWOfJ8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=34sr6wOFnCYz68NUjBt6R87DE3q1BzErTuvg0Glo7vA=; b=UU+5RkAdalcthH1PjZgmq4EY0E8bFqMB+t4MQwIibmcaapNSnPjHwBNK7AtlzN471c 4n4TWFW1lNwM9QKhNHSzNplQdHKJ0myTDEzYXfnFHgTWc03G5C1juPZj3Hvh09wzE87o 6pRs6Iltp126wQo8JiiUBJQsHGfV5fRirinWLCzhFBKqBxEhwPFPnXS/mmp5gAzVqu6Z D3UEl4wUj4wYGmgUvkqp7+tTjc3pnU1I0aDF/F1S0WyZ6tnbI0Zw22ImTa4FsIFXuas4 vX75ChQ1y7Jx4+4c0DXOyiK+4gG4qJNB0yJ5yNzijYAow3jAAuechytyAdDm99OXAC6Z MRdw== X-Gm-Message-State: AE9vXwNtxyp06O/00Cncp+NzlANph1gb/tpDDEhyAh+OxFRotIbOqKY7Dx1Gry2ibcIXJfJm X-Received: by 10.25.154.19 with SMTP id c19mr5004961lfe.188.1472462986054; Mon, 29 Aug 2016 02:29:46 -0700 (PDT) Received: from linuslaptop.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id 62sm6371513ljj.3.2016.08.29.02.29.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Aug 2016 02:29:44 -0700 (PDT) From: Linus Walleij To: linux-fbdev@vger.kernel.org, Tomi Valkeinen , Jean-Christophe Plagniol-Villard , Pawel Moll , Rob Herring , Russell King Cc: linux-arm-kernel@lists.infradead.org, Arnd Bergmann , Ray Jui , Linus Walleij Subject: [PATCH] video: ARM CLCD: fix up Integrator support Date: Mon, 29 Aug 2016 11:29:31 +0200 Message-Id: <1472462971-8935-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org We need to mask all registers of the Integrator/CP core module control register, and actually write the calculated value to the control register, not the mask. Tested on the Integrator/CP with RGB5551 VGA and works like a charm after this patch. Signed-off-by: Linus Walleij --- drivers/video/fbdev/amba-clcd-versatile.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/video/fbdev/amba-clcd-versatile.c b/drivers/video/fbdev/amba-clcd-versatile.c index 9a90817b1550..5c1e03928d7f 100644 --- a/drivers/video/fbdev/amba-clcd-versatile.c +++ b/drivers/video/fbdev/amba-clcd-versatile.c @@ -262,7 +262,10 @@ static const struct of_device_id versatile_clcd_of_match[] = { /* 0 = 24bit VGA, 1 = 18bit VGA */ #define INTEGRATOR_CLCD_LCD_N24BITEN BIT(19) -#define INTEGRATOR_CLCD_MASK (INTEGRATOR_CLCD_LCDMUX_MASK | \ +#define INTEGRATOR_CLCD_MASK (INTEGRATOR_CLCD_LCDBIASEN | \ + INTEGRATOR_CLCD_LCDBIASUP | \ + INTEGRATOR_CLCD_LCDBIASDN | \ + INTEGRATOR_CLCD_LCDMUX_MASK | \ INTEGRATOR_CLCD_LCD0_EN | \ INTEGRATOR_CLCD_LCD1_EN | \ INTEGRATOR_CLCD_LCD_STATIC1 | \ @@ -277,6 +280,7 @@ static void integrator_clcd_enable(struct clcd_fb *fb) dev_info(&fb->dev->dev, "enable Integrator CLCD connectors\n"); + /* FIXME: really needed? */ val = INTEGRATOR_CLCD_LCD_STATIC1 | INTEGRATOR_CLCD_LCD_STATIC2 | INTEGRATOR_CLCD_LCD0_EN | INTEGRATOR_CLCD_LCD1_EN; if (var->bits_per_pixel <= 8 || @@ -291,8 +295,8 @@ static void integrator_clcd_enable(struct clcd_fb *fb) regmap_update_bits(versatile_syscon_map, INTEGRATOR_HDR_CTRL_OFFSET, - 0, - INTEGRATOR_CLCD_MASK); + INTEGRATOR_CLCD_MASK, + val); } /*