diff options
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/system.c | 17 | ||||
-rw-r--r-- | firmware/target/arm/gigabeat/meg-fx/system-meg-fx.c | 41 |
2 files changed, 34 insertions, 24 deletions
diff --git a/firmware/system.c b/firmware/system.c index 2bbcd06378..4ab47fac1f 100644 --- a/firmware/system.c +++ b/firmware/system.c | |||
@@ -81,23 +81,6 @@ void cpu_idle_mode(bool on_off) | |||
81 | } | 81 | } |
82 | #endif /* HAVE_ADJUSTABLE_CPU_FREQ */ | 82 | #endif /* HAVE_ADJUSTABLE_CPU_FREQ */ |
83 | 83 | ||
84 | #if CONFIG_CPU == S3C2440 | ||
85 | |||
86 | void system_reboot(void) { | ||
87 | } | ||
88 | |||
89 | void system_init(void) | ||
90 | { | ||
91 | /* Turn off un-needed devices */ | ||
92 | |||
93 | /* Turn off all of the UARTS */ | ||
94 | CLKCON &= ~( (1<<10) | (1<<11) |(1<<12) ); | ||
95 | |||
96 | /* Turn off AC97 and Camera */ | ||
97 | CLKCON &= ~( (1<<19) | (1<<20) ); | ||
98 | } | ||
99 | |||
100 | #endif | ||
101 | 84 | ||
102 | bool detect_flashed_rockbox(void) | 85 | bool detect_flashed_rockbox(void) |
103 | { | 86 | { |
diff --git a/firmware/target/arm/gigabeat/meg-fx/system-meg-fx.c b/firmware/target/arm/gigabeat/meg-fx/system-meg-fx.c index d1c736e91f..b8bcda3c95 100644 --- a/firmware/target/arm/gigabeat/meg-fx/system-meg-fx.c +++ b/firmware/target/arm/gigabeat/meg-fx/system-meg-fx.c | |||
@@ -5,17 +5,25 @@ | |||
5 | #include "lcd.h" | 5 | #include "lcd.h" |
6 | #include <stdio.h> | 6 | #include <stdio.h> |
7 | 7 | ||
8 | const int TIMER4_MASK = 1 << 14; | 8 | const int TIMER4_MASK = (1 << 14); |
9 | 9 | const int LCD_MASK = (1 << 16); | |
10 | int system_memory_guard(int newmode) | 10 | const int DMA0_MASK = (1 << 17); |
11 | const int DMA1_MASK = (1 << 18); | ||
12 | const int DMA2_MASK = (1 << 19); | ||
13 | const int DMA3_MASK = (1 << 20); | ||
14 | |||
15 | int system_memory_guard(int newmode) | ||
11 | { | 16 | { |
12 | (void)newmode; | 17 | (void)newmode; |
13 | return 0; | 18 | return 0; |
14 | } | 19 | } |
15 | 20 | ||
16 | extern void timer4(void); | 21 | extern void timer4(void); |
22 | extern void dma0(void); | ||
23 | extern void dma1(void); | ||
24 | extern void dma3(void); | ||
17 | 25 | ||
18 | void irq(void) | 26 | void irq(void) |
19 | { | 27 | { |
20 | int intpending = INTPND; | 28 | int intpending = INTPND; |
21 | 29 | ||
@@ -24,12 +32,31 @@ void irq(void) | |||
24 | 32 | ||
25 | /* Timer 4 */ | 33 | /* Timer 4 */ |
26 | if ((intpending & TIMER4_MASK) != 0) | 34 | if ((intpending & TIMER4_MASK) != 0) |
27 | { | ||
28 | timer4(); | 35 | timer4(); |
29 | } | 36 | else |
30 | else | ||
31 | { | 37 | { |
32 | /* unexpected interrupt */ | 38 | /* unexpected interrupt */ |
33 | } | 39 | } |
34 | } | 40 | } |
35 | 41 | ||
42 | void system_reboot(void) | ||
43 | { | ||
44 | WTCON = 0; | ||
45 | WTCNT = WTDAT = 1 ; | ||
46 | WTCON = 0x21; | ||
47 | for(;;) | ||
48 | ; | ||
49 | } | ||
50 | |||
51 | void system_init(void) | ||
52 | { | ||
53 | /* Turn off un-needed devices */ | ||
54 | |||
55 | /* Turn off all of the UARTS */ | ||
56 | CLKCON &= ~( (1<<10) | (1<<11) |(1<<12) ); | ||
57 | |||
58 | /* Turn off AC97 and Camera */ | ||
59 | CLKCON &= ~( (1<<19) | (1<<20) ); | ||
60 | } | ||
61 | |||
62 | |||