Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 148556
b: refs/heads/master
c: 729a3fa
h: refs/heads/master
v: v3
  • Loading branch information
Mike Frysinger committed Jun 12, 2009
1 parent af9875b commit 46e3229
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a9031028ef70f658daa2151e361aee7b082965ee
refs/heads/master: 729a3fa7333af58d57eecb0aacf7ca3d58237f81
18 changes: 11 additions & 7 deletions trunk/arch/blackfin/mach-common/head.S
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ ENTRY(__init_clear_bss)
rts;
ENDPROC(__init_clear_bss)

#define INITIAL_STACK (L1_SCRATCH_START + L1_SCRATCH_LENGTH - 12)

ENTRY(__start)
/* R0: argument of command line string, passed from uboot, save it */
R7 = R0;
Expand Down Expand Up @@ -148,8 +146,8 @@ ENTRY(__start)
#endif

/* Initialize stack pointer */
sp.l = lo(INITIAL_STACK);
sp.h = hi(INITIAL_STACK);
sp.l = _init_thread_union;
sp.h = _init_thread_union;
fp = sp;
usp = sp;

Expand Down Expand Up @@ -189,7 +187,15 @@ ENTRY(__start)
/* Put The Code for PLL Programming and SDRAM Programming in L1 ISRAM */
call _bfin_relocate_l1_mem;
#ifdef CONFIG_BFIN_KERNEL_CLOCK
/* Only use on-chip scratch space for stack when absolutely required
* to avoid Anomaly 05000227 ... we know the init_clocks() func only
* uses L1 text and stack space and no other memory region.
*/
# define KERNEL_CLOCK_STACK (L1_SCRATCH_START + L1_SCRATCH_LENGTH - 12)
sp.l = lo(KERNEL_CLOCK_STACK);
sp.h = hi(KERNEL_CLOCK_STACK);
call _init_clocks;
sp = usp; /* usp hasnt been touched, so restore from there */
#endif

/* This section keeps the processor in supervisor mode
Expand Down Expand Up @@ -243,9 +249,7 @@ ENTRY(_real_start)
call _cmdline_init;

/* Load the current thread pointer and stack */
sp.l = _init_thread_union;
sp.h = _init_thread_union;
p1 = THREAD_SIZE (z);
p1 = THREAD_SIZE + 4 (z); /* +4 is for reti loading */
sp = sp + p1;
usp = sp;
fp = sp;
Expand Down

0 comments on commit 46e3229

Please sign in to comment.