X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=irq.c;h=c37240c1fa401107ef5717fa021056b0cca0527a;hb=4f2380bcdb96509a0b45e8f36939fab9dd88bee5;hp=1c5902b6de6f34af6700e3254f4452e7188b94b9;hpb=cbb2f30692a3d5cb7817aaa95dc14f8db24f5adb;p=ppcskel.git diff --git a/irq.c b/irq.c index 1c5902b..c37240c 100644 --- a/irq.c +++ b/irq.c @@ -14,24 +14,31 @@ Copyright (C) 2009 Andre Heider "dhewg" #include "hollywood.h" #include "ipc.h" #include "bootmii_ppc.h" -//debug only -#include "printf.h" +#include "ohci.h" void irq_initialize(void) { - // enable hollywood-pic for ppc - write32(HW_PPCIRQMASK, 0); - write32(HW_PPCIRQFLAG, 0xffffffff); - - // enable RESET and PIC (#14) interrupts on processor interface + // clear flipper-pic (processor interface) write32(BW_PI_IRQMASK, 0); write32(BW_PI_IRQFLAG, 0xffffffff); - //??? -- needed?! - /* - write32(HW_PPCIRQMASK+0x04, 0); - write32(HW_PPCIRQMASK+0x20, 0); - */ + // clear hollywood-pic + write32(HW_PPCIRQMASK, 0); + write32(HW_PPCIRQFLAG, 0xffffffff); + + /* ??? -- needed?! + * in mini they do + * + * write32(HW_ARMIRQMASK+0x04, 0); + * write32(HW_ARMIRQMASK+0x20, 0); + * + * + * may it's here following; on the other + * hand it's already done by mini... + * + * write32(HW_PPCIRQMASK+0x04+0x08, 0); + * write32(HW_PPCIRQMASK+0x20+0x08, 0); + */ _CPU_ISR_Enable() } @@ -47,31 +54,22 @@ void irq_handler(void) { u32 enabled = read32(BW_PI_IRQMASK); u32 flags = read32(BW_PI_IRQFLAG); - printf("flags1: 0x%08X\n", flags); flags = flags & enabled; - if (flags & (1<<1)) { //RESET + if (flags & (1<