diff options
Diffstat (limited to 'firmware/target/arm/s3c2440/gigabeat-fx/system-meg-fx.c')
-rw-r--r-- | firmware/target/arm/s3c2440/gigabeat-fx/system-meg-fx.c | 84 |
1 files changed, 41 insertions, 43 deletions
diff --git a/firmware/target/arm/s3c2440/gigabeat-fx/system-meg-fx.c b/firmware/target/arm/s3c2440/gigabeat-fx/system-meg-fx.c index 8b83a4f343..8065926e28 100644 --- a/firmware/target/arm/s3c2440/gigabeat-fx/system-meg-fx.c +++ b/firmware/target/arm/s3c2440/gigabeat-fx/system-meg-fx.c | |||
@@ -144,51 +144,49 @@ void s3c_regclr(volatile int *reg, unsigned int mask) | |||
144 | 144 | ||
145 | void system_init(void) | 145 | void system_init(void) |
146 | { | 146 | { |
147 | /* Disable interrupts and set all to IRQ mode */ | 147 | INTMSK = 0xFFFFFFFF; |
148 | INTMSK = -1; | 148 | INTMOD = 0; |
149 | INTMOD = 0; | 149 | SRCPND = 0xFFFFFFFF; |
150 | SRCPND = -1; | 150 | INTPND = 0xFFFFFFFF; |
151 | INTPND = -1; | 151 | INTSUBMSK = 0xFFFFFFFF; |
152 | INTSUBMSK = -1; | 152 | SUBSRCPND = 0xFFFFFFFF; |
153 | SUBSRCPND = -1; | 153 | |
154 | GPBCON |= 0x85; | ||
155 | GPBDAT |= 0x07; | ||
156 | GPBUP |= 0x20F; | ||
157 | |||
158 | /* Take care of flash related pins */ | ||
159 | GPCCON |= 0x1000; | ||
160 | GPCDAT &= ~0x40; | ||
161 | GPCUP |= 0x51; | ||
162 | |||
163 | GPDCON |= 0x05; | ||
164 | GPDUP |= 0x03; | ||
165 | GPDDAT &= ~0x03; | ||
166 | |||
167 | GPFCON |= 0x00000AAA; | ||
168 | GPFUP |= 0xFF; | ||
169 | |||
170 | GPGCON |= 0x01001000; | ||
171 | GPGUP |= 0x70; | ||
172 | |||
173 | GPHCON |= 0x4005; | ||
174 | GPHDAT |= 0x03; | ||
154 | 175 | ||
155 | /* TODO: do something with PRIORITY */ | 176 | /* TODO: do something with PRIORITY */ |
156 | 177 | ||
157 | 178 | /* Turn off currently-not or never-needed devices. | |
158 | /* Turn off currently-not or never-needed devices */ | 179 | * Be careful here, it is possible to freeze the device by disabling |
159 | 180 | * clocks at the wrong time. | |
160 | CLKCON &= ~( | 181 | * |
161 | /* Turn off AC97 and Camera */ | 182 | * Turn off AC97, Camera, SPI, IIS, I2C, UARTS, MMC/SD/SDIO Controller |
162 | (1<<19) | (1<<20) | 183 | * USB device, USB host, NAND flash controller. |
163 | 184 | * | |
164 | /* Turn off SPI */ | 185 | * IDLE, Sleep, LCDC, PWM timer, GPIO, RTC, and ADC are untouched (on) |
165 | | (1 << 18) | 186 | */ |
166 | 187 | CLKCON &= ~0xFF1ED0; | |
167 | /* Turn off IIS */ | 188 | |
168 | | (1 << 17) | 189 | CLKSLOW |= 0x80; |
169 | |||
170 | /* Turn off I2C */ | ||
171 | | (1 << 16) | ||
172 | |||
173 | /* Turn off all of the UARTS */ | ||
174 | | ( (1<<10) | (1<<11) |(1<<12) ) | ||
175 | |||
176 | /* Turn off MMC/SD/SDIO Controller (SDI) */ | ||
177 | | (1 << 9) | ||
178 | |||
179 | /* Turn off USB device */ | ||
180 | | (1 << 7) | ||
181 | |||
182 | /* Turn off USB host */ | ||
183 | | (1 << 6) | ||
184 | |||
185 | /* Turn off NAND flash controller */ | ||
186 | | (1 << 4) | ||
187 | |||
188 | ); | ||
189 | |||
190 | /* Turn off the USB PLL */ | ||
191 | CLKSLOW |= (1 << 7); | ||
192 | } | 190 | } |
193 | 191 | ||
194 | int system_memory_guard(int newmode) | 192 | int system_memory_guard(int newmode) |