diff options
author | Max Filippov <jcmvbkbc@gmail.com> | 2016-09-07 20:33:47 (GMT) |
---|---|---|
committer | Max Filippov <jcmvbkbc@gmail.com> | 2016-09-12 06:53:22 (GMT) |
commit | 4f2056873ff0748d413c0dc3577186f78fafa7c9 (patch) | |
tree | 2c33b1f2f9a2beb5e8b1cdd0c62a7319da3bfee4 /arch/xtensa/platforms/xtfpga | |
parent | 23c2b9321b30f947b4f908e40379eed50f48508c (diff) | |
download | linux-4f2056873ff0748d413c0dc3577186f78fafa7c9.tar.xz |
xtensa: extract common CPU reset code into separate function
platform_restart implementatations do the same thing to reset CPU.
Don't duplicate that code, move it to a function and call it from
platform_restart.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'arch/xtensa/platforms/xtfpga')
-rw-r--r-- | arch/xtensa/platforms/xtfpga/setup.c | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/arch/xtensa/platforms/xtfpga/setup.c b/arch/xtensa/platforms/xtfpga/setup.c index b509d1f..f0b753f 100644 --- a/arch/xtensa/platforms/xtfpga/setup.c +++ b/arch/xtensa/platforms/xtfpga/setup.c @@ -54,27 +54,7 @@ void platform_restart(void) { /* Flush and reset the mmu, simulate a processor reset, and * jump to the reset vector. */ - - - __asm__ __volatile__ ("movi a2, 15\n\t" - "wsr a2, icountlevel\n\t" - "movi a2, 0\n\t" - "wsr a2, icount\n\t" -#if XCHAL_NUM_IBREAK > 0 - "wsr a2, ibreakenable\n\t" -#endif -#if XCHAL_HAVE_LOOPS - "wsr a2, lcount\n\t" -#endif - "movi a2, 0x1f\n\t" - "wsr a2, ps\n\t" - "isync\n\t" - "jx %0\n\t" - : - : "a" (XCHAL_RESET_VECTOR_VADDR) - : "a2" - ); - + cpu_reset(); /* control never gets here */ } |