freemyipod r796 - Code Review

Jump to: navigation, search
Repository:freemyipod
Revision:r795‎ | r796 | r797 >
Date:15:24, 19 November 2011
Author:theseven
Status:new
Tags:
Comment:
emCORE: Reset ATA core before enabling its interrupt
Modified paths:
  • /emcore/trunk/target/ipodnano3g/interrupt.c (modified) (history)

Diff [purge]

Index: emcore/trunk/target/ipodnano3g/interrupt.c
@@ -237,6 +237,12 @@
238238 VIC0INTENABLE = 1 << IRQ_DMAC0;
239239 VIC0INTENABLE = 1 << IRQ_DMAC1;
240240 #ifdef TARGET_ipodclassic
 241+ clockgate_enable(5, true);
 242+ ATA_IRQ_MASK = 0;
 243+ ATA_IRQ = ATA_IRQ;
 244+ ATA_CONTROL = 0;
 245+ while (!(ATA_CONTROL & BIT(1))) yield();
 246+ clockgate_enable(5, false);
241247 VIC0INTENABLE = 1 << IRQ_ATA;
242248 VIC1INTENABLE = 1 << (IRQ_MMC - 32);
243249 #endif