1 From ca4d24f7954f3746742ba350c2276ff777f21173 Mon Sep 17 00:00:00 2001
2 From: Markos Chandras <markos.chandras@imgtec.com>
3 Date: Mon, 21 Jul 2014 14:35:55 +0100
4 Subject: MIPS: Malta: EVA: Rename 'eva_entry' to 'platform_eva_init'
6 From: Markos Chandras <markos.chandras@imgtec.com>
8 commit ca4d24f7954f3746742ba350c2276ff777f21173 upstream.
10 Rename 'eva_entry' to 'platform_eva_init' as required by the new
11 'eva_init' macro in the eva.h header. Since this macro is now used
12 in a platform dependent way, it must not depend on its caller so move
13 the t1 register initialization inside this macro. Also set the .reorder
14 assembler option in case the caller may have previously set .noreorder.
15 This may allow a few assembler optimizations. Finally include missing
16 headers and document the register usage for this macro.
18 Reviewed-by: Paul Burton <paul.burton@imgtec.com>
19 Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
20 Patchwork: http://patchwork.linux-mips.org/patch/7423/
21 Signed-off-by: James Hogan <james.hogan@imgtec.com>
22 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
25 arch/mips/include/asm/mach-malta/kernel-entry-init.h | 22 +++++++++++++------
26 1 file changed, 16 insertions(+), 6 deletions(-)
28 --- a/arch/mips/include/asm/mach-malta/kernel-entry-init.h
29 +++ b/arch/mips/include/asm/mach-malta/kernel-entry-init.h
31 #ifndef __ASM_MACH_MIPS_KERNEL_ENTRY_INIT_H
32 #define __ASM_MACH_MIPS_KERNEL_ENTRY_INIT_H
34 +#include <asm/regdef.h>
35 +#include <asm/mipsregs.h>
38 * Prepare segments for EVA boot:
40 * This is in case the processor boots in legacy configuration
41 * (SI_EVAReset is de-asserted and CONFIG5.K == 0)
43 - * On entry, t1 is loaded with CP0_CONFIG
45 * ========================= Mappings =============================
46 * Virtual memory Physical memory Mapping
47 * 0x00000000 - 0x7fffffff 0x80000000 - 0xfffffffff MUSUK (kuseg)
51 * Lowmem is expanded to 2GB
53 + * The following code uses the t0, t1, t2 and ra registers without
54 + * previously preserving them.
58 + .macro platform_eva_init
63 * Get Config.K0 value and use it to program
64 * the segmentation registers
67 andi t1, 0x7 /* CCA */
78 .macro kernel_entry_setup
80 sll t0, t0, 6 /* SC bit */
87 /* Assume we came from YAMON... */
88 @@ -127,8 +138,7 @@ nonsc_processor: