diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2016-02-23 05:01:38 -0500 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2016-04-18 05:08:43 -0400 |
commit | f36fdacc5fcdca7b0c0d89f031fcdc89717e0be3 (patch) | |
tree | 4644f1897b79f3e06c8ddb059bb6ee5c15036b1f /drivers/video | |
parent | c3b46c73264b03000d1e18b22f5caf63332547c9 (diff) |
video: ARM CLCD: runtime check for Versatile
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>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/fbdev/amba-clcd.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/video/fbdev/amba-clcd.c b/drivers/video/fbdev/amba-clcd.c index fe274b5851c7..93e66a9148b9 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) | |||
440 | fb->off_ienb = CLCD_PL111_IENB; | 440 | fb->off_ienb = CLCD_PL111_IENB; |
441 | fb->off_cntl = CLCD_PL111_CNTL; | 441 | fb->off_cntl = CLCD_PL111_CNTL; |
442 | } else { | 442 | } else { |
443 | #ifdef CONFIG_ARCH_VERSATILE | 443 | if (of_machine_is_compatible("arm,versatile-ab") || |
444 | fb->off_ienb = CLCD_PL111_IENB; | 444 | of_machine_is_compatible("arm,versatile-pb")) { |
445 | fb->off_cntl = CLCD_PL111_CNTL; | 445 | fb->off_ienb = CLCD_PL111_IENB; |
446 | #else | 446 | fb->off_cntl = CLCD_PL111_CNTL; |
447 | fb->off_ienb = CLCD_PL110_IENB; | 447 | } else { |
448 | fb->off_cntl = CLCD_PL110_CNTL; | 448 | fb->off_ienb = CLCD_PL110_IENB; |
449 | #endif | 449 | fb->off_cntl = CLCD_PL110_CNTL; |
450 | } | ||
450 | } | 451 | } |
451 | 452 | ||
452 | fb->clk = clk_get(&fb->dev->dev, NULL); | 453 | fb->clk = clk_get(&fb->dev->dev, NULL); |