From: Linus Walleij <linus.walleij@linaro.org>
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/7 RESEND] video: ARM CLCD: runtime check for Versatile
Date: Tue, 23 Feb 2016 10:01:38 +0000 [thread overview]
Message-ID: <1456221704-5792-2-git-send-email-linus.walleij@linaro.org> (raw)
In-Reply-To: <1456221704-5792-1-git-send-email-linus.walleij@linaro.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 <robh@kernel.org>
Cc: Russell King <linux@arm.linux.org.uk>
Fixes: a29da136de34 ("ARM: versatile: convert to multi-platform")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
drivers/video/fbdev/amba-clcd.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
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);
--
2.4.3
next prev parent reply other threads:[~2016-02-23 10:01 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-23 10:01 [PATCH 0/7] video: ARM CLCD: non-controversial parts Linus Walleij
2016-02-23 10:01 ` Linus Walleij [this message]
2016-04-15 11:47 ` [PATCH 1/7 RESEND] video: ARM CLCD: runtime check for Versatile Linus Walleij
2016-04-18 9:10 ` Tomi Valkeinen
2016-02-23 10:01 ` [PATCH 2/7 v2] video: ARM CLCD: backlight support for OF Linus Walleij
2016-02-23 10:01 ` [PATCH 3/7 v2] video: ARM CLCD: support DT signal inversion flags Linus Walleij
2016-02-26 10:34 ` Tomi Valkeinen
2016-03-07 4:45 ` Linus Walleij
2016-02-23 10:01 ` [PATCH 4/7 v2] video: ARM CLCD: support pads connected in reverse order Linus Walleij
2016-02-23 10:35 ` Russell King - ARM Linux
2016-02-25 19:34 ` Linus Walleij
2016-02-23 10:01 ` [PATCH 5/7 v2] video: ARM CLCD: support Nomadik variant Linus Walleij
2016-02-23 10:01 ` [PATCH 6/7 v2] video: ARM CLCD: add special board and panel hooks for Nomadik Linus Walleij
2016-02-23 10:01 ` [PATCH 7/7 v2] video: ARM CLCD: add special panel hook for Versatiles Linus Walleij
2016-02-25 19:35 ` [PATCH 0/7] video: ARM CLCD: non-controversial parts Linus Walleij
2016-02-26 10:20 ` Tomi Valkeinen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1456221704-5792-2-git-send-email-linus.walleij@linaro.org \
--to=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).