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: 9303327 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C6B00607F0 for ; Mon, 29 Aug 2016 09:29:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B73AE28592 for ; Mon, 29 Aug 2016 09:29:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ABB2C28681; Mon, 29 Aug 2016 09:29:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2A5F328592 for ; Mon, 29 Aug 2016 09:29:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932779AbcH2J3s (ORCPT ); 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 X-Virus-Scanned: ClamAV using ClamSMTP 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(-) 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); } /*