From patchwork Tue Feb 23 10:01:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 62682 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp1742388lbl; Tue, 23 Feb 2016 02:02:07 -0800 (PST) X-Received: by 10.67.6.226 with SMTP id cx2mr44770868pad.93.1456221727146; Tue, 23 Feb 2016 02:02:07 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id wk6si46210806pac.91.2016.02.23.02.02.06; Tue, 23 Feb 2016 02:02:07 -0800 (PST) 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; 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; dkim=neutral (body hash did not verify) header.i=@linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751143AbcBWKCG (ORCPT + 2 others); Tue, 23 Feb 2016 05:02:06 -0500 Received: from mail-lb0-f169.google.com ([209.85.217.169]:32844 "EHLO mail-lb0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751077AbcBWKCE (ORCPT ); Tue, 23 Feb 2016 05:02:04 -0500 Received: by mail-lb0-f169.google.com with SMTP id x4so98598093lbm.0 for ; Tue, 23 Feb 2016 02:02:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=2bLzAXNSy9gUz+J1BZ+w2qFsNxuFRyLuhRtc0yR+6u4=; b=g17LTtBzd9fHv8bqD/En1zVfe9M8WMm6w3hQBWZUDPl1B+jJXZsz8AoVBxPBEGp3Ij Ft8lWOaFETrVMVGnCGzhg4epdJylngV+Im2vpdw+Q7UC1YNJzNoiYH4K1/uW6SVWaZW5 HeGWfrX65Y8rG/o1u29xzsEVCZ1XfB2FiByMQ= 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:in-reply-to :references; bh=2bLzAXNSy9gUz+J1BZ+w2qFsNxuFRyLuhRtc0yR+6u4=; b=kZ4mirhPb3b2NG0Gik7liG+Lcv/JtUZDpgfJd1WuYY2VIHkHZXZPbj2eu8RG945gyC 60ZaUTIUn/D8wmypRqkFp0wfcjw1IQf6iVYFPJgHLBPrQduUaONljEyi7pRZ2gH+6Oeu HJHuh4cBU/NfzmH8Btx5BUe34L0edYWf8SHCXzyrIUIb7vi/Znnyz/XVnT15y9Wvzp3N kQdg4jM8WLLwAEvnF2sR61cO6EZCFKFItrjZjGc7/qMkydf618+vVwq24VaeVKnSe7l7 mLWAulx8D+6v24EtrRM8TxbEcinM1RxIR8byBN2gRqiQaqbfHgBKNgBvPvjUc8KxWEa4 VTYA== X-Gm-Message-State: AG10YORlPXLznGYrU2u35llcnDfyo+3FmbtfC24qEo6SyUPE57jwbQFGfCIKiZxSWN76QyXy X-Received: by 10.112.166.2 with SMTP id zc2mr11790803lbb.34.1456221722417; Tue, 23 Feb 2016 02:02:02 -0800 (PST) Received: from localhost.localdomain ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id k70sm3926525lfg.5.2016.02.23.02.02.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Feb 2016 02:02:01 -0800 (PST) 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 , stable@vger.kernel.org Subject: [PATCH 1/7 RESEND] video: ARM CLCD: runtime check for Versatile Date: Tue, 23 Feb 2016 11:01:38 +0100 Message-Id: <1456221704-5792-2-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 2.4.3 In-Reply-To: <1456221704-5792-1-git-send-email-linus.walleij@linaro.org> References: <1456221704-5792-1-git-send-email-linus.walleij@linaro.org> Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org The current compile-time check for inversed IENB/CNTL does not work in multiplatform boots: as soon as versatile is included in the build, the IENB/CNTL is switched and breaks graphics. Convert this to a runtime switch. Cc: stable@vger.kernel.org Cc: Rob Herring Cc: Russell King Fixes: a29da136de34 ("ARM: versatile: convert to multi-platform") Signed-off-by: Linus Walleij --- drivers/video/fbdev/amba-clcd.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) -- 2.4.3 -- 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.c b/drivers/video/fbdev/amba-clcd.c index 9362424c2340..f9ef06d0cd48 100644 --- a/drivers/video/fbdev/amba-clcd.c +++ b/drivers/video/fbdev/amba-clcd.c @@ -440,13 +440,14 @@ static int clcdfb_register(struct clcd_fb *fb) fb->off_ienb = CLCD_PL111_IENB; fb->off_cntl = CLCD_PL111_CNTL; } else { -#ifdef CONFIG_ARCH_VERSATILE - fb->off_ienb = CLCD_PL111_IENB; - fb->off_cntl = CLCD_PL111_CNTL; -#else - fb->off_ienb = CLCD_PL110_IENB; - fb->off_cntl = CLCD_PL110_CNTL; -#endif + if (of_machine_is_compatible("arm,versatile-ab") || + of_machine_is_compatible("arm,versatile-pb")) { + fb->off_ienb = CLCD_PL111_IENB; + fb->off_cntl = CLCD_PL111_CNTL; + } else { + fb->off_ienb = CLCD_PL110_IENB; + fb->off_cntl = CLCD_PL110_CNTL; + } } fb->clk = clk_get(&fb->dev->dev, NULL);