X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=ppcskel.git;a=blobdiff_plain;f=irq.c;h=1217ee2adecf7ec606e1bdd16ea595e2fd09c918;hp=1c5902b6de6f34af6700e3254f4452e7188b94b9;hb=HEAD;hpb=cbb2f30692a3d5cb7817aaa95dc14f8db24f5adb diff --git a/irq.c b/irq.c index 1c5902b..1217ee2 100644 --- a/irq.c +++ b/irq.c @@ -2,9 +2,8 @@ ppcskel - a Free Software replacement for the Nintendo/BroadOn IOS. IRQ support -Copyright (C) 2008, 2009 Hector Martin "marcan" -Copyright (C) 2008, 2009 Sven Peter -Copyright (C) 2009 Andre Heider "dhewg" +Copyright (C) 2009 Bernhard Urban +Copyright (C) 2009 Sebastian Falbesoner # This code is licensed to you under the terms of the GNU GPL, version 2; # see file COPYING or http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt @@ -14,24 +13,34 @@ 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" +#include "mini_ipc.h" + +void show_frame_no(void); 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 +56,23 @@ 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<