aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-common
diff options
context:
space:
mode:
authorBarry Song <barry.song@analog.com>2010-01-06 23:11:17 -0500
committerMike Frysinger <vapier@gentoo.org>2010-03-09 00:30:48 -0500
commitd86bfb1600db38e8387beee0aaab4263cfd728a2 (patch)
tree95e6f3d77d6dede480d74a7a4b87f2794a5b31fe /arch/blackfin/mach-common
parentaad16f32284030907b4f105e92e5fb534fd272bc (diff)
Blackfin: initial XIP support
Signed-off-by: Barry Song <barry.song@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch/blackfin/mach-common')
-rw-r--r--arch/blackfin/mach-common/entry.S17
-rw-r--r--arch/blackfin/mach-common/head.S5
-rw-r--r--arch/blackfin/mach-common/interrupt.S10
3 files changed, 19 insertions, 13 deletions
diff --git a/arch/blackfin/mach-common/entry.S b/arch/blackfin/mach-common/entry.S
index 0df7ef200f9d..ccfa7c490ff9 100644
--- a/arch/blackfin/mach-common/entry.S
+++ b/arch/blackfin/mach-common/entry.S
@@ -405,7 +405,7 @@ ENTRY(_double_fault)
405 405
406 r0 = sp; /* stack frame pt_regs pointer argument ==> r0 */ 406 r0 = sp; /* stack frame pt_regs pointer argument ==> r0 */
407 SP += -12; 407 SP += -12;
408 call _double_fault_c; 408 pseudo_long_call _double_fault_c, p5;
409 SP += 12; 409 SP += 12;
410.L_double_fault_panic: 410.L_double_fault_panic:
411 JUMP .L_double_fault_panic 411 JUMP .L_double_fault_panic
@@ -447,7 +447,7 @@ ENTRY(_exception_to_level5)
447 447
448 r0 = sp; /* stack frame pt_regs pointer argument ==> r0 */ 448 r0 = sp; /* stack frame pt_regs pointer argument ==> r0 */
449 SP += -12; 449 SP += -12;
450 call _trap_c; 450 pseudo_long_call _trap_c, p4;
451 SP += 12; 451 SP += 12;
452 452
453 /* If interrupts were off during the exception (IPEND[4] = 1), turn them off 453 /* If interrupts were off during the exception (IPEND[4] = 1), turn them off
@@ -551,7 +551,7 @@ ENTRY(_kernel_execve)
551 p0 = sp; 551 p0 = sp;
552 sp += -16; 552 sp += -16;
553 [sp + 12] = p0; 553 [sp + 12] = p0;
554 call _do_execve; 554 pseudo_long_call _do_execve, p5;
555 SP += 16; 555 SP += 16;
556 cc = r0 == 0; 556 cc = r0 == 0;
557 if ! cc jump .Lexecve_failed; 557 if ! cc jump .Lexecve_failed;
@@ -704,7 +704,7 @@ ENTRY(_system_call)
704 sp += 4; 704 sp += 4;
705 705
706 SP += -12; 706 SP += -12;
707 call _schedule; 707 pseudo_long_call _schedule, p4;
708 SP += 12; 708 SP += 12;
709 709
710 jump .Lresume_userspace_1; 710 jump .Lresume_userspace_1;
@@ -723,7 +723,7 @@ ENTRY(_system_call)
723 723
724 r0 = sp; 724 r0 = sp;
725 SP += -12; 725 SP += -12;
726 call _do_notify_resume; 726 pseudo_long_call _do_notify_resume, p5;
727 SP += 12; 727 SP += 12;
728 728
729.Lsyscall_really_exit: 729.Lsyscall_really_exit:
@@ -736,7 +736,7 @@ ENDPROC(_system_call)
736 * this symbol need not be global anyways, so ... 736 * this symbol need not be global anyways, so ...
737 */ 737 */
738_sys_trace: 738_sys_trace:
739 call _syscall_trace; 739 pseudo_long_call _syscall_trace, p5;
740 740
741 /* Execute the appropriate system call */ 741 /* Execute the appropriate system call */
742 742
@@ -760,7 +760,7 @@ _sys_trace:
760 SP += 24; 760 SP += 24;
761 [sp + PT_R0] = r0; 761 [sp + PT_R0] = r0;
762 762
763 call _syscall_trace; 763 pseudo_long_call _syscall_trace, p5;
764 jump .Lresume_userspace; 764 jump .Lresume_userspace;
765ENDPROC(_sys_trace) 765ENDPROC(_sys_trace)
766 766
@@ -1007,7 +1007,8 @@ ENTRY(_schedule_and_signal_from_int)
1007 1007
1008 r0 = sp; 1008 r0 = sp;
1009 sp += -12; 1009 sp += -12;
1010 call _finish_atomic_sections; 1010
1011 pseudo_long_call _finish_atomic_sections, p5;
1011 sp += 12; 1012 sp += 12;
1012 jump.s .Lresume_userspace; 1013 jump.s .Lresume_userspace;
1013ENDPROC(_schedule_and_signal_from_int) 1014ENDPROC(_schedule_and_signal_from_int)
diff --git a/arch/blackfin/mach-common/head.S b/arch/blackfin/mach-common/head.S
index cf037782c8ad..4391621d9048 100644
--- a/arch/blackfin/mach-common/head.S
+++ b/arch/blackfin/mach-common/head.S
@@ -186,6 +186,11 @@ ENTRY(__start)
186 186
187 /* Put The Code for PLL Programming and SDRAM Programming in L1 ISRAM */ 187 /* Put The Code for PLL Programming and SDRAM Programming in L1 ISRAM */
188 call _bfin_relocate_l1_mem; 188 call _bfin_relocate_l1_mem;
189
190#ifdef CONFIG_ROMKERNEL
191 call _bfin_relocate_xip_data;
192#endif
193
189#ifdef CONFIG_BFIN_KERNEL_CLOCK 194#ifdef CONFIG_BFIN_KERNEL_CLOCK
190 /* Only use on-chip scratch space for stack when absolutely required 195 /* Only use on-chip scratch space for stack when absolutely required
191 * to avoid Anomaly 05000227 ... we know the init_clocks() func only 196 * to avoid Anomaly 05000227 ... we know the init_clocks() func only
diff --git a/arch/blackfin/mach-common/interrupt.S b/arch/blackfin/mach-common/interrupt.S
index 8085ff1cce00..df984960cf90 100644
--- a/arch/blackfin/mach-common/interrupt.S
+++ b/arch/blackfin/mach-common/interrupt.S
@@ -109,10 +109,10 @@ __common_int_entry:
109 cc = r0 == 0; 109 cc = r0 == 0;
110 if cc jump .Lcommon_restore_context; 110 if cc jump .Lcommon_restore_context;
111#else /* CONFIG_IPIPE */ 111#else /* CONFIG_IPIPE */
112 call _do_irq; 112 pseudo_long_call _do_irq, p2;
113 SP += 12; 113 SP += 12;
114#endif /* CONFIG_IPIPE */ 114#endif /* CONFIG_IPIPE */
115 call _return_from_int; 115 pseudo_long_call _return_from_int, p2;
116.Lcommon_restore_context: 116.Lcommon_restore_context:
117 RESTORE_CONTEXT 117 RESTORE_CONTEXT
118 rti; 118 rti;
@@ -168,7 +168,7 @@ ENTRY(_evt_ivhw)
168 168
169 r0 = sp; /* stack frame pt_regs pointer argument ==> r0 */ 169 r0 = sp; /* stack frame pt_regs pointer argument ==> r0 */
170 SP += -12; 170 SP += -12;
171 call _trap_c; 171 pseudo_long_call _trap_c, p5;
172 SP += 12; 172 SP += 12;
173 173
174#ifdef EBIU_ERRMST 174#ifdef EBIU_ERRMST
@@ -179,7 +179,7 @@ ENTRY(_evt_ivhw)
179 w[p0] = r0.l; 179 w[p0] = r0.l;
180#endif 180#endif
181 181
182 call _ret_from_exception; 182 pseudo_long_call _ret_from_exception, p2;
183 183
184.Lcommon_restore_all_sys: 184.Lcommon_restore_all_sys:
185 RESTORE_ALL_SYS 185 RESTORE_ALL_SYS
@@ -223,7 +223,7 @@ ENTRY(_evt_system_call)
223#ifdef CONFIG_FRAME_POINTER 223#ifdef CONFIG_FRAME_POINTER
224 fp = 0; 224 fp = 0;
225#endif 225#endif
226 call _system_call; 226 pseudo_long_call _system_call, p2;
227 jump .Lcommon_restore_context; 227 jump .Lcommon_restore_context;
228ENDPROC(_evt_system_call) 228ENDPROC(_evt_system_call)
229 229