freemyipod r270 - Code Review

Jump to: navigation, search
Repository:freemyipod
Revision:r269‎ | r270 | r271 >
Date:18:23, 22 November 2010
Author:theseven
Status:new
Tags:
Comment:
emBIOS: Fix USB on iPod Nano 4G (get rid of leftover DMA IRQs from the OF)
Modified paths:
  • /embios/trunk/panic.c (modified) (history)
  • /embios/trunk/target/ipodnano4g/interrupt.c (modified) (history)

Diff [purge]

Index: embios/trunk/panic.c
@@ -84,7 +84,6 @@
8585 if (severity == PANIC_FATAL)
8686 {
8787 enter_critical_section();
88 - while(1);
8988 while (!displaylcd_safe());
9089 lcdconsole_puts_noblit("\n*PANIC*\n", LCDCONSOLE_FGCOLOR, LCDCONSOLE_BGCOLOR);
9190 va_start(ap, string);
Index: embios/trunk/target/ipodnano4g/interrupt.c
@@ -229,7 +229,16 @@
230230
231231 void interrupt_init(void)
232232 {
233 - VIC0INTENABLE = (1 << IRQ_TIMER) || (1 << IRQ_DMAC0) || (1 << IRQ_DMAC1);
 233+ int i;
 234+ for (i = 0; i < 8; i++) DMAC0CCONTROL(i) = 0;
 235+ for (i = 0; i < 8; i++) DMAC1CCONTROL(i) = 0;
 236+ DMAC0INTTCCLR = 0xff;
 237+ DMAC0INTERRCLR = 0xff;
 238+ DMAC1INTTCCLR = 0xff;
 239+ DMAC1INTERRCLR = 0xff;
 240+ VIC0INTENABLE = 1 << IRQ_TIMER;
 241+ VIC0INTENABLE = 1 << IRQ_DMAC0;
 242+ VIC0INTENABLE = 1 << IRQ_DMAC1;
234243 }
235244
236245 void interrupt_shutdown(void)