1
0
Fork 0
forked from len0rd/rockbox

Move system specific reboot

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11903 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Greg White 2007-01-04 11:33:13 +00:00
parent 6c62f2f32a
commit 0b4f3d9cfa
2 changed files with 33 additions and 23 deletions

View file

@ -81,23 +81,6 @@ void cpu_idle_mode(bool on_off)
} }
#endif /* HAVE_ADJUSTABLE_CPU_FREQ */ #endif /* HAVE_ADJUSTABLE_CPU_FREQ */
#if CONFIG_CPU == S3C2440
void system_reboot(void) {
}
void system_init(void)
{
/* Turn off un-needed devices */
/* Turn off all of the UARTS */
CLKCON &= ~( (1<<10) | (1<<11) |(1<<12) );
/* Turn off AC97 and Camera */
CLKCON &= ~( (1<<19) | (1<<20) );
}
#endif
bool detect_flashed_rockbox(void) bool detect_flashed_rockbox(void)
{ {

View file

@ -5,17 +5,25 @@
#include "lcd.h" #include "lcd.h"
#include <stdio.h> #include <stdio.h>
const int TIMER4_MASK = 1 << 14; const int TIMER4_MASK = (1 << 14);
const int LCD_MASK = (1 << 16);
const int DMA0_MASK = (1 << 17);
const int DMA1_MASK = (1 << 18);
const int DMA2_MASK = (1 << 19);
const int DMA3_MASK = (1 << 20);
int system_memory_guard(int newmode) int system_memory_guard(int newmode)
{ {
(void)newmode; (void)newmode;
return 0; return 0;
} }
extern void timer4(void); extern void timer4(void);
extern void dma0(void);
extern void dma1(void);
extern void dma3(void);
void irq(void) void irq(void)
{ {
int intpending = INTPND; int intpending = INTPND;
@ -24,12 +32,31 @@ void irq(void)
/* Timer 4 */ /* Timer 4 */
if ((intpending & TIMER4_MASK) != 0) if ((intpending & TIMER4_MASK) != 0)
{
timer4(); timer4();
} else
else
{ {
/* unexpected interrupt */ /* unexpected interrupt */
} }
} }
void system_reboot(void)
{
WTCON = 0;
WTCNT = WTDAT = 1 ;
WTCON = 0x21;
for(;;)
;
}
void system_init(void)
{
/* Turn off un-needed devices */
/* Turn off all of the UARTS */
CLKCON &= ~( (1<<10) | (1<<11) |(1<<12) );
/* Turn off AC97 and Camera */
CLKCON &= ~( (1<<19) | (1<<20) );
}