OSDN Git Service

ARM: clcd: use amba_part() to determine if we have a PL110 primecell
authorRussell King <rmk+kernel@arm.linux.org.uk>
Wed, 19 Jan 2011 21:13:33 +0000 (21:13 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Sat, 19 Feb 2011 11:08:59 +0000 (11:08 +0000)
Instead of matching the entire peripheral ID, match against
just the part number using the amba_xxx() macros.

Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
include/linux/amba/clcd.h

index be33b3a..2e51121 100644 (file)
@@ -212,12 +212,12 @@ static inline void clcdfb_decode(struct clcd_fb *fb, struct clcd_regs *regs)
                break;
        case 16:
                /*
-                * PL110 cannot choose between 5551 and 565 modes in
-                * its control register
+                * PL110 cannot choose between 5551 and 565 modes in its
+                * control register.  It is possible to use 565 with
+                * custom external wiring.
                 */
-               if ((fb->dev->periphid & 0x000fffff) == 0x00041110)
-                       val |= CNTL_LCDBPP16;
-               else if (fb->fb.var.green.length == 5)
+               if (amba_part(fb->dev) == 0x110 ||
+                   fb->fb.var.green.length == 5)
                        val |= CNTL_LCDBPP16;
                else
                        val |= CNTL_LCDBPP16_565;