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: a29da136de
("ARM: versatile: convert to multi-platform")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
This commit is contained in:
parent
c3b46c7326
commit
f36fdacc5f
|
@ -440,13 +440,14 @@ static int clcdfb_register(struct clcd_fb *fb)
|
||||||
fb->off_ienb = CLCD_PL111_IENB;
|
fb->off_ienb = CLCD_PL111_IENB;
|
||||||
fb->off_cntl = CLCD_PL111_CNTL;
|
fb->off_cntl = CLCD_PL111_CNTL;
|
||||||
} else {
|
} else {
|
||||||
#ifdef CONFIG_ARCH_VERSATILE
|
if (of_machine_is_compatible("arm,versatile-ab") ||
|
||||||
fb->off_ienb = CLCD_PL111_IENB;
|
of_machine_is_compatible("arm,versatile-pb")) {
|
||||||
fb->off_cntl = CLCD_PL111_CNTL;
|
fb->off_ienb = CLCD_PL111_IENB;
|
||||||
#else
|
fb->off_cntl = CLCD_PL111_CNTL;
|
||||||
fb->off_ienb = CLCD_PL110_IENB;
|
} else {
|
||||||
fb->off_cntl = CLCD_PL110_CNTL;
|
fb->off_ienb = CLCD_PL110_IENB;
|
||||||
#endif
|
fb->off_cntl = CLCD_PL110_CNTL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fb->clk = clk_get(&fb->dev->dev, NULL);
|
fb->clk = clk_get(&fb->dev->dev, NULL);
|
||||||
|
|
Loading…
Reference in New Issue