summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/target/coldfire/mpio/hd300/lcd-hd300.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/firmware/target/coldfire/mpio/hd300/lcd-hd300.c b/firmware/target/coldfire/mpio/hd300/lcd-hd300.c
index 31087a5d43..d66210db22 100644
--- a/firmware/target/coldfire/mpio/hd300/lcd-hd300.c
+++ b/firmware/target/coldfire/mpio/hd300/lcd-hd300.c
@@ -210,8 +210,22 @@ void lcd_update(void)
lcd_write_command_ex(LCD_CNTL_COLUMN, 0, -1);
lcd_write_command(LCD_CNTL_DATA_WRITE);
- /* Copy display bitmap to hardware */
- lcd_write_data (&lcd_framebuffer[0][0], LCD_WIDTH*LCD_FBHEIGHT);
+ /* lcd can't handle the speed of DMA transfer when boosted */
+ if ( cpu_frequency > 60000000 )
+ {
+ /* Copy display bitmap to hardware */
+ lcd_write_data (&lcd_framebuffer[0][0], LCD_WIDTH*LCD_FBHEIGHT);
+ }
+ else
+ {
+ /* Copy display bitmap to hardware using DMA */
+ DSR3 = 1;
+ DAR3 = 0xf0000002;
+ SAR3 = (unsigned long)lcd_framebuffer;
+ BCR3 = LCD_WIDTH*LCD_FBHEIGHT;
+ DCR3 = DMA_BWC(1) | DMA_SINC | DMA_SSIZE(DMA_SIZE_BYTE) |
+ DMA_DSIZE(DMA_SIZE_BYTE) | DMA_START;
+ }
}
/* Update a fraction of the display. */