projects
/
ppcskel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
WIP: irq handler
[ppcskel.git]
/
main.c
diff --git
a/main.c
b/main.c
index acd97174cd0e328a07f8d60d821cfb1022430db7..2c1e41ff71a0b63938465d7207815259af95d491 100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-24,6
+24,8
@@
Copyright (C) 2009 John Kelley <wiidev@kelley.ca>
#include "video_low.h"
#include "input.h"
#include "console.h"
#include "video_low.h"
#include "input.h"
#include "console.h"
+#include "ohci.h"
+#include "irq.h"
#define MINIMUM_MINI_VERSION 0x00010001
#define MINIMUM_MINI_VERSION 0x00010001
@@
-82,9
+84,6
@@
int main(void)
exception_init();
dsp_reset();
exception_init();
dsp_reset();
- // clear interrupt mask
- write32(0x0c003004, 0);
-
ipc_initialize();
ipc_slowping();
ipc_initialize();
ipc_slowping();
@@
-96,6
+95,13
@@
int main(void)
VIDEO_SetFrameBuffer(get_xfb());
VISetupEncoder();
VIDEO_SetFrameBuffer(get_xfb());
VISetupEncoder();
+ irq_initialize();
+ irq_bw_enable(BW_PI_IRQ_RESET);
+ irq_bw_enable(BW_PI_IRQ_HW); //hollywood pic
+ irq_hw_enable(IRQ_OHCI0);
+
+ ohci_init();
+
u32 version = ipc_getvers();
u16 mini_version_major = version >> 16 & 0xFFFF;
u16 mini_version_minor = version & 0xFFFF;
u32 version = ipc_getvers();
u16 mini_version_major = version >> 16 & 0xFFFF;
u16 mini_version_minor = version & 0xFFFF;
@@
-109,11
+115,18
@@
int main(void)
; // better ideas welcome!
}
; // better ideas welcome!
}
+ /*
print_str_noscroll(112, 112, "ohai, world!\n");
print_str_noscroll(112, 112, "ohai, world!\n");
-
testOTP();
testOTP();
-
printf("bye, world!\n");
printf("bye, world!\n");
+ */
+
+ while(1) {
+ // just to get sure we are still in this loop
+ //_CPU_ISR_Enable() // don't know why this is needed...
+ //udelay(100000);
+ //printf("x");
+ }
return 0;
}
return 0;
}