Fix Atmel LCD controller endianess for AVR32 processors
authorMark Jackson <mpfj@mimc.co.uk>
Thu, 31 Jul 2008 14:56:48 +0000 (15:56 +0100)
committerWolfgang Denk <wd@denx.de>
Thu, 31 Jul 2008 15:47:37 +0000 (17:47 +0200)
The Atmel lcd controller is used on Atmel's AT91 (little endian) and
AVR32 (big endian) platforms.

As such, the controller can handle both big and little endian memory.

This patch fixes the driver for the AVR32 platform.

Signed-off-by: Mark Jackson <mpfj@mimc.co.uk>
drivers/video/atmel_lcdfb.c

index 27df449660c675c8d3d637cf054f228e7004f0f8..b332a825e30f573c8e707430957268c6a665ab1a 100644 (file)
@@ -100,7 +100,11 @@ void lcd_ctrl_init(void *lcdbase)
                            value << ATMEL_LCDC_CLKVAL_OFFSET);
 
        /* Initialize control register 2 */
+#ifdef CONFIG_AVR32
+       value = ATMEL_LCDC_MEMOR_BIG | ATMEL_LCDC_CLKMOD_ALWAYSACTIVE;
+#else
        value = ATMEL_LCDC_MEMOR_LITTLE | ATMEL_LCDC_CLKMOD_ALWAYSACTIVE;
+#endif
        if (panel_info.vl_tft)
                value |= ATMEL_LCDC_DISTYPE_TFT;