freemyipod r563 - Code Review

Jump to: navigation, search
Repository:freemyipod
Revision:r562‎ | r563 | r564 >
Date:21:11, 7 February 2011
Author:theseven
Status:new
Tags:
Comment:
emCORE: Fix iPod Nano 2G disk mode and OF
Modified paths:
  • /emcore/trunk/arm/contextswitch.S (modified) (history)
  • /emcore/trunk/target/ipodnano2g/target.h (modified) (history)
  • /emcore/trunk/target/ipodnano2g/targetinit.c (modified) (history)

Diff [purge]

Index: emcore/trunk/target/ipodnano2g/targetinit.c
@@ -23,6 +23,7 @@
2424
2525 #include "global.h"
2626 #include "clickwheel.h"
 27+#include "s5l8701.h"
2728
2829
2930 #define nor ((uint8_t*)0x24000000)
@@ -122,3 +123,9 @@
123124 sysiword[0x4b] = 0x2202bdf0;
124125 }
125126 }
 127+
 128+void targetinit_execfirmware()
 129+{
 130+ PWRCON(0) &= ~(1 << 5);
 131+ IICSTAT = (1 << 4);
 132+}
Index: emcore/trunk/target/ipodnano2g/target.h
@@ -72,6 +72,7 @@
7373 #define SECTOR_SIZE 2048
7474
7575 #define HAVE_TARGETINIT_LATE
 76+#define HAVE_TARGETINIT_EXECFIRMWARE
7677
7778
7879 #endif
Index: emcore/trunk/arm/contextswitch.S
@@ -20,6 +20,8 @@
2121 @
2222 @
2323
 24+#define ASM_FILE
 25+#include "global.h"
2426
2527 .section .icode.contextswitch, "ax", %progbits
2628 .align 2
@@ -157,6 +159,9 @@
158160 ldmfd sp, {r0-r2}
159161 bl memmove
160162 bl clean_dcache
 163+#ifdef HAVE_TARGETINIT_EXECFIRMWARE
 164+ bl targetinit_execfirmware
 165+#endif
161166 ldr r1, [sp]
162167 mrc p15, 0, r0,c1,c0
163168 bic r0, r0, #5