freemyipod r388 - Code Review

Jump to: navigation, search
Repository:freemyipod
Revision:r387‎ | r388 | r389 >
Date:19:05, 27 December 2010
Author:theseven
Status:new
Tags:
Comment:
emBIOS: Move LCD to a lower-priority DMA channel on s5l8702
Modified paths:
  • /embios/trunk/target/ipodnano3g/lcd.c (modified) (history)

Diff [purge]

Index: embios/trunk/target/ipodnano3g/lcd.c
@@ -71,12 +71,12 @@
7272
7373 bool displaylcd_busy()
7474 {
75 - return DMAC0C0CONFIG & 1;
 75+ return DMAC0C4CONFIG & 1;
7676 }
7777
7878 bool displaylcd_safe()
7979 {
80 - return !(DMAC0C0CONFIG & 1);
 80+ return !(DMAC0C4CONFIG & 1);
8181 }
8282
8383 void displaylcd_sync()
@@ -126,7 +126,7 @@
127127 for (i = -1; i < (int)ARRAYLEN(lcd_lli) && pixels > 0; i++, pixels -= 0xfff)
128128 {
129129 bool last = i + 1 >= ARRAYLEN(lcd_lli) || pixels <= 0xfff;
130 - struct dma_lli* lli = i < 0 ? (struct dma_lli*)((int)&DMAC0C0LLI) : &lcd_lli[i];
 130+ struct dma_lli* lli = i < 0 ? (struct dma_lli*)((int)&DMAC0C4LLI) : &lcd_lli[i];
131131 lli->srcaddr = solid ? &lcd_color : data;
132132 lli->dstaddr = (void*)((int)&LCDWDATA);
133133 lli->nextlli = last ? NULL : &lcd_lli[i + 1];
@@ -135,7 +135,7 @@
136136 data = (void*)(((uint32_t)data) + 0x1ffe);
137137 }
138138 clean_dcache();
139 - DMAC0C0CONFIG = 0x88c1;
 139+ DMAC0C4CONFIG = 0x88c1;
140140 }
141141
142142 void lcd_shutdown()
@@ -182,9 +182,9 @@
183183 }
184184 }
185185
186 -void INT_DMAC0C0()
 186+void INT_DMAC0C4()
187187 {
188 - DMAC0INTTCCLR = 1;
 188+ DMAC0INTTCCLR = 0x10;
189189 lcdconsole_callback();
190190 }
191191