From 4d3a020f274d49c2b8f10cfdad8c67aaa153bebe Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Sat, 7 Feb 2009 10:09:13 +0000 Subject: Gigabeat S: Move the LCD framebuffer address so that DRAM can be mapped flat between physical and virtual addresses. NO BOOTLOADER UPDATE SHOULD BE NEEDED. The firmware image now handles low-level system setup as well. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19935 a1c6a512-1295-4272-9138-f99709370657 --- firmware/target/arm/imx31/gigabeat-s/lcd-imx31.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'firmware/target/arm/imx31/gigabeat-s/lcd-imx31.c') diff --git a/firmware/target/arm/imx31/gigabeat-s/lcd-imx31.c b/firmware/target/arm/imx31/gigabeat-s/lcd-imx31.c index eb14152775..c353380221 100644 --- a/firmware/target/arm/imx31/gigabeat-s/lcd-imx31.c +++ b/firmware/target/arm/imx31/gigabeat-s/lcd-imx31.c @@ -27,6 +27,7 @@ #include "lcd-target.h" #include "backlight-target.h" +#define MAIN_LCD_IDMAC_CHANNEL 14 #define LCDADDR(x, y) (&lcd_framebuffer[(y)][(x)]) static volatile bool lcd_on = true; @@ -46,6 +47,15 @@ extern void lcd_copy_buffer_rect(fb_data *dst, const fb_data *src, /* LCD init */ void lcd_init_device(void) { + /* Move the framebuffer */ +#ifdef BOOTLOADER + /* Only do this once to avoid flicker */ + memset(FRAME, 0x00, FRAME_SIZE); +#endif + IPU_IDMAC_CHA_EN &= ~(1ul << MAIN_LCD_IDMAC_CHANNEL); + IPU_IMA_ADDR = ((0x1 << 16) | (MAIN_LCD_IDMAC_CHANNEL << 4)) + (1 << 3); + IPU_IMA_DATA = FRAME_PHYS_ADDR; + IPU_IDMAC_CHA_EN |= (1ul << MAIN_LCD_IDMAC_CHANNEL); } /* Update a fraction of the display. */ -- cgit v1.2.3