summaryrefslogtreecommitdiff
path: root/drivers/video/atmel_lcdfb.c
diff options
context:
space:
mode:
authorMark Jackson <mpfj@mimc.co.uk>2008-07-31 14:56:48 (GMT)
committerWolfgang Denk <wd@denx.de>2008-07-31 15:47:37 (GMT)
commita5bcb01fbde6b1f1c9863cd86e5c4c369f0121ac (patch)
tree2d631a492f826caa075eafe4d8eef0596a29876c /drivers/video/atmel_lcdfb.c
parentcdb8bd2fd3bcbe65d8e4334a55f5a667845426a1 (diff)
downloadu-boot-a5bcb01fbde6b1f1c9863cd86e5c4c369f0121ac.tar.xz
Fix Atmel LCD controller endianess for AVR32 processors
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>
Diffstat (limited to 'drivers/video/atmel_lcdfb.c')
-rw-r--r--drivers/video/atmel_lcdfb.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c
index 27df449..b332a82 100644
--- a/drivers/video/atmel_lcdfb.c
+++ b/drivers/video/atmel_lcdfb.c
@@ -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;