X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=main.c;h=18cc42220e94461b00249626e61743d4e607d6ea;hb=b89d4dcf5ed30bc7aca7cf7dd30b098592afd2f1;hp=4303241a7430baad434e3d21f297ed5b464043ab;hpb=38dbff99968d2f1c8d7ae818b275e80335805aad;p=ppcskel.git diff --git a/main.c b/main.c index 4303241..18cc422 100644 --- a/main.c +++ b/main.c @@ -24,6 +24,8 @@ Copyright (C) 2009 John Kelley #include "video_low.h" #include "input.h" #include "console.h" +#include "irq.h" +#include "usb/core/core.h" #define MINIMUM_MINI_VERSION 0x00010001 @@ -82,8 +84,10 @@ int main(void) exception_init(); dsp_reset(); - // clear interrupt mask - write32(0x0c003004, 0); + irq_initialize(); + irq_bw_enable(BW_PI_IRQ_RESET); + irq_bw_enable(BW_PI_IRQ_HW); //hollywood pic + irq_hw_enable(IRQ_OHCI0); ipc_initialize(); ipc_slowping(); @@ -109,26 +113,13 @@ int main(void) ; // better ideas welcome! } - print_str_noscroll(112, 112, "ohai, world!\n"); + usb_init(); + /* + print_str_noscroll(112, 112, "ohai, world!\n"); testOTP(); - printf("bye, world!\n"); - - // enable RESET interrupt - write32(0x0c003004, 1<<1); -#define _CPU_ISR_Enable() \ - { register u32 _val = 0; \ - __asm__ __volatile__ ( \ - "mfmsr %0\n" \ - "ori %0,%0,0x8000\n" \ - "mtmsr %0" \ - : "=&r" ((_val)) : "0" ((_val)) \ - ); \ - } - _CPU_ISR_Enable() - - while(1) {} + */ return 0; }