diff options
| author | qiuyiuestc <[email protected]> | 2010-09-13 01:18:05 +0000 |
|---|---|---|
| committer | qiuyiuestc <[email protected]> | 2010-09-13 01:18:05 +0000 |
| commit | 160474c9972649533a71625fa33a61052a231376 (patch) | |
| tree | cad43957f2f916d220ecc84bb625a1c23b670f08 /libcpu | |
| parent | b1357bd0dbd7c9c23de73fa4512bf4d0be2401a7 (diff) | |
clean up code
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@909 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'libcpu')
| -rw-r--r-- | libcpu/arm/s3c24x0/mmu.c | 2 | ||||
| -rw-r--r-- | libcpu/arm/s3c24x0/system_clock.c | 4 | ||||
| -rw-r--r-- | libcpu/arm/s3c24x0/trap.c | 18 |
3 files changed, 18 insertions, 6 deletions
diff --git a/libcpu/arm/s3c24x0/mmu.c b/libcpu/arm/s3c24x0/mmu.c index 0cbac7f934..36b3eb3c9a 100644 --- a/libcpu/arm/s3c24x0/mmu.c +++ b/libcpu/arm/s3c24x0/mmu.c @@ -17,7 +17,7 @@ #include "s3c24x0.h"
// #define _MMUTT_STARTADDRESS 0x30080000
-#define _MMUTT_STARTADDRESS 0x30200000
+#define _MMUTT_STARTADDRESS 0x30400000
#define DESC_SEC (0x2|(1<<4))
#define CB (3<<2) //cache_on, write_back
diff --git a/libcpu/arm/s3c24x0/system_clock.c b/libcpu/arm/s3c24x0/system_clock.c index 38ffa5d233..bd2a6690db 100644 --- a/libcpu/arm/s3c24x0/system_clock.c +++ b/libcpu/arm/s3c24x0/system_clock.c @@ -101,8 +101,8 @@ void rt_hw_set_divider(rt_uint8_t hdivn, rt_uint8_t pdivn) void rt_hw_clock_init(void)
{
LOCKTIME = 0xFFFFFFFF;
- rt_hw_set_divider(HDIVN, PDIVN);
- rt_hw_set_upll_clock(UPL_SDIV, UPL_PDIV, UPL_MDIV);
rt_hw_set_mpll_clock(MPL_SDIV, MPL_PDIV, MPL_MIDV);
+ rt_hw_set_upll_clock(UPL_SDIV, UPL_PDIV, UPL_MDIV);
+ rt_hw_set_divider(HDIVN, PDIVN);
}
diff --git a/libcpu/arm/s3c24x0/trap.c b/libcpu/arm/s3c24x0/trap.c index 65f47af242..a8876a54e9 100644 --- a/libcpu/arm/s3c24x0/trap.c +++ b/libcpu/arm/s3c24x0/trap.c @@ -57,8 +57,12 @@ void rt_hw_trap_udef(struct rt_hw_register *regs) rt_kprintf("undefined instruction\n"); rt_kprintf("thread - %s stack:\n", rt_current_thread->name); - rt_hw_backtrace((rt_uint32_t *)regs->fp, (rt_uint32_t)rt_current_thread->entry); +#ifdef RT_USING_FINSH + list_thread(); +#endif + while (1); + rt_hw_cpu_shutdown(); } @@ -93,8 +97,12 @@ void rt_hw_trap_pabt(struct rt_hw_register *regs) rt_kprintf("prefetch abort\n"); rt_kprintf("thread - %s stack:\n", rt_current_thread->name); - rt_hw_backtrace((rt_uint32_t *)regs->fp, (rt_uint32_t)rt_current_thread->entry); +#ifdef RT_USING_FINSH + list_thread(); +#endif + while (1); + rt_hw_cpu_shutdown(); } @@ -112,8 +120,12 @@ void rt_hw_trap_dabt(struct rt_hw_register *regs) rt_kprintf("data abort\n"); rt_kprintf("thread - %s stack:\n", rt_current_thread->name); - rt_hw_backtrace((rt_uint32_t *)regs->fp, (rt_uint32_t)rt_current_thread->entry); +#ifdef RT_USING_FINSH + list_thread(); +#endif + while (1); + rt_hw_cpu_shutdown(); } |
