X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=irq.c;h=4f15bb8b9f4e63e5f8114954125f3f043bf1c5f7;hb=251726c276ab844095583d4c8d7607a30c0a802c;hp=1c5902b6de6f34af6700e3254f4452e7188b94b9;hpb=cbb2f30692a3d5cb7817aaa95dc14f8db24f5adb;p=ppcskel.git diff --git a/irq.c b/irq.c index 1c5902b..4f15bb8 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 "usb/host/host.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<