diff options
Diffstat (limited to 'firmware/system.c')
-rw-r--r-- | firmware/system.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/firmware/system.c b/firmware/system.c index 9d3e2a0dbd..05f5f49034 100644 --- a/firmware/system.c +++ b/firmware/system.c | |||
@@ -34,13 +34,13 @@ void ddma_wait_idle(void) | |||
34 | } while ((DDMACOM & 3) != 0); | 34 | } while ((DDMACOM & 3) != 0); |
35 | } | 35 | } |
36 | 36 | ||
37 | void ddma_transfer(int dir, int mem, long intAddr, long extAddr, int num) | 37 | void ddma_transfer(int dir, int mem, void* intAddr, long extAddr, int num) |
38 | __attribute__ ((section (".icode"))); | 38 | __attribute__ ((section (".icode"))); |
39 | void ddma_transfer(int dir, int mem, long intAddr, long extAddr, int num) { | 39 | void ddma_transfer(int dir, int mem, void* intAddr, long extAddr, int num) { |
40 | int irq = set_irq_level(1); | 40 | int irq = set_irq_level(1); |
41 | ddma_wait_idle(); | 41 | ddma_wait_idle(); |
42 | long externalAddress = (long) extAddr; | 42 | long externalAddress = (long) extAddr; |
43 | long internalAddress = (long) intAddr; | 43 | long internalAddress = ((long) intAddr) & 0xFFFF; |
44 | /* HW wants those two in word units. */ | 44 | /* HW wants those two in word units. */ |
45 | num /= 2; | 45 | num /= 2; |
46 | externalAddress /= 2; | 46 | externalAddress /= 2; |
@@ -130,10 +130,9 @@ void smsc_delay() { | |||
130 | } | 130 | } |
131 | 131 | ||
132 | static void extra_init(void) { | 132 | static void extra_init(void) { |
133 | /* Power on | 133 | /* Power on stuff */ |
134 | P1 |= 0x01; | 134 | P1 |= 0x07; |
135 | P1CON |= 0x01; | 135 | P1CON |= 0x1f; |
136 | */ | ||
137 | 136 | ||
138 | /* SMSC chip config (?) */ | 137 | /* SMSC chip config (?) */ |
139 | P6CON |= 0x08; | 138 | P6CON |= 0x08; |
@@ -147,7 +146,7 @@ static void extra_init(void) { | |||
147 | } | 146 | } |
148 | 147 | ||
149 | /* P5 conf | 148 | /* P5 conf |
150 | * line 2 & 4 are digital, other analog. : P5CON = 0xec; | 149 | * lines 0, 1 & 4 are digital, other analog. : P5CON = 0xec; |
151 | */ | 150 | */ |
152 | 151 | ||
153 | /* P7 conf | 152 | /* P7 conf |