Skip to content

Commit

Permalink
Blackfin arch: unify the duplicated _real_start functions
Browse files Browse the repository at this point in the history
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
  • Loading branch information
Mike Frysinger authored and Bryan Wu committed Aug 6, 2008
1 parent 778307d commit 09e1f70
Show file tree
Hide file tree
Showing 7 changed files with 77 additions and 354 deletions.
70 changes: 0 additions & 70 deletions arch/blackfin/mach-bf527/head.S
Original file line number Diff line number Diff line change
Expand Up @@ -226,76 +226,6 @@ ENTRY(__start)
jump .LWAIT_HERE;
ENDPROC(__start)

ENTRY(_real_start)
[ -- sp ] = reti;
p0.l = lo(WDOG_CTL);
p0.h = hi(WDOG_CTL);
r0 = 0xAD6(z);
w[p0] = r0; /* watchdog off for now */
ssync;

/* Code update for BSS size == 0
* Zero out the bss region.
*/

p1.l = ___bss_start;
p1.h = ___bss_start;
p2.l = ___bss_stop;
p2.h = ___bss_stop;
r0 = 0;
p2 -= p1;
lsetup (.L_clear_bss, .L_clear_bss) lc0 = p2;
.L_clear_bss:
B[p1++] = r0;

/* In case there is a NULL pointer reference
* Zero out region before stext
*/

p1.l = 0x0;
p1.h = 0x0;
r0.l = __stext;
r0.h = __stext;
r0 = r0 >> 1;
p2 = r0;
r0 = 0;
lsetup (.L_clear_zero, .L_clear_zero) lc0 = p2;
.L_clear_zero:
W[p1++] = r0;

/* pass the uboot arguments to the global value command line */
R0 = R7;
call _cmdline_init;

p1.l = __rambase;
p1.h = __rambase;
r0.l = __sdata;
r0.h = __sdata;
[p1] = r0;

p1.l = __ramstart;
p1.h = __ramstart;
p3.l = ___bss_stop;
p3.h = ___bss_stop;

r1 = p3;
[p1] = r1;

/*
* load the current thread pointer and stack
*/
r1.l = _init_thread_union;
r1.h = _init_thread_union;

r2.l = 0x2000;
r2.h = 0x0000;
r1 = r1 + r2;
sp = r1;
usp = sp;
fp = sp;
jump.l _start_kernel;
ENDPROC(_real_start)

__FINIT

.section .l1.text
Expand Down
70 changes: 0 additions & 70 deletions arch/blackfin/mach-bf533/head.S
Original file line number Diff line number Diff line change
Expand Up @@ -228,76 +228,6 @@ ENTRY(__start)
jump .LWAIT_HERE;
ENDPROC(__start)

ENTRY(_real_start)
[ -- sp ] = reti;
p0.l = lo(WDOG_CTL);
p0.h = hi(WDOG_CTL);
r0 = 0xAD6(z);
w[p0] = r0; /* watchdog off for now */
ssync;

/* Code update for BSS size == 0
* Zero out the bss region.
*/

p1.l = ___bss_start;
p1.h = ___bss_start;
p2.l = ___bss_stop;
p2.h = ___bss_stop;
r0 = 0;
p2 -= p1;
lsetup (.L_clear_bss, .L_clear_bss) lc0 = p2;
.L_clear_bss:
B[p1++] = r0;

/* In case there is a NULL pointer reference
* Zero out region before stext
*/

p1.l = 0x0;
p1.h = 0x0;
r0.l = __stext;
r0.h = __stext;
r0 = r0 >> 1;
p2 = r0;
r0 = 0;
lsetup (.L_clear_zero, .L_clear_zero) lc0 = p2;
.L_clear_zero:
W[p1++] = r0;

/* pass the uboot arguments to the global value command line */
R0 = R7;
call _cmdline_init;

p1.l = __rambase;
p1.h = __rambase;
r0.l = __sdata;
r0.h = __sdata;
[p1] = r0;

p1.l = __ramstart;
p1.h = __ramstart;
p3.l = ___bss_stop;
p3.h = ___bss_stop;

r1 = p3;
[p1] = r1;

/*
* load the current thread pointer and stack
*/
r1.l = _init_thread_union;
r1.h = _init_thread_union;

r2.l = 0x2000;
r2.h = 0x0000;
r1 = r1 + r2;
sp = r1;
usp = sp;
fp = sp;
jump.l _start_kernel;
ENDPROC(_real_start)

__FINIT

.section .l1.text
Expand Down
70 changes: 0 additions & 70 deletions arch/blackfin/mach-bf537/head.S
Original file line number Diff line number Diff line change
Expand Up @@ -240,76 +240,6 @@ ENTRY(__start)
jump .LWAIT_HERE;
ENDPROC(__start)

ENTRY(_real_start)
[ -- sp ] = reti;
p0.l = lo(WDOG_CTL);
p0.h = hi(WDOG_CTL);
r0 = 0xAD6(z);
w[p0] = r0; /* watchdog off for now */
ssync;

/* Code update for BSS size == 0
* Zero out the bss region.
*/

p1.l = ___bss_start;
p1.h = ___bss_start;
p2.l = ___bss_stop;
p2.h = ___bss_stop;
r0 = 0;
p2 -= p1;
lsetup (.L_clear_bss, .L_clear_bss) lc0 = p2;
.L_clear_bss:
B[p1++] = r0;

/* In case there is a NULL pointer reference
* Zero out region before stext
*/

p1.l = 0x0;
p1.h = 0x0;
r0.l = __stext;
r0.h = __stext;
r0 = r0 >> 1;
p2 = r0;
r0 = 0;
lsetup (.L_clear_zero, .L_clear_zero) lc0 = p2;
.L_clear_zero:
W[p1++] = r0;

/* pass the uboot arguments to the global value command line */
R0 = R7;
call _cmdline_init;

p1.l = __rambase;
p1.h = __rambase;
r0.l = __sdata;
r0.h = __sdata;
[p1] = r0;

p1.l = __ramstart;
p1.h = __ramstart;
p3.l = ___bss_stop;
p3.h = ___bss_stop;

r1 = p3;
[p1] = r1;

/*
* load the current thread pointer and stack
*/
r1.l = _init_thread_union;
r1.h = _init_thread_union;

r2.l = 0x2000;
r2.h = 0x0000;
r1 = r1 + r2;
sp = r1;
usp = sp;
fp = sp;
jump.l _start_kernel;
ENDPROC(_real_start)

__FINIT

.section .l1.text
Expand Down
73 changes: 0 additions & 73 deletions arch/blackfin/mach-bf548/head.S
Original file line number Diff line number Diff line change
Expand Up @@ -212,79 +212,6 @@ ENTRY(__start)
jump .LWAIT_HERE;
ENDPROC(__start)

ENTRY(_real_start)
[ -- sp ] = reti;
p0.l = lo(WDOG_CTL);
p0.h = hi(WDOG_CTL);
r0 = 0xAD6(z);
w[p0] = r0; /* watchdog off for now */
ssync;

/* Code update for BSS size == 0
* Zero out the bss region.
*/

p1.l = ___bss_start;
p1.h = ___bss_start;
p2.l = ___bss_stop;
p2.h = ___bss_stop;
r0 = 0;
p2 -= p1;
lsetup (.L_clear_bss, .L_clear_bss ) lc0 = p2;
.L_clear_bss:
B[p1++] = r0;

/* In case there is a NULL pointer reference
* Zero out region before stext
*/

p1.l = 0x0;
p1.h = 0x0;
r0.l = __stext;
r0.h = __stext;
r0 = r0 >> 1;
p2 = r0;
r0 = 0;
lsetup (.L_clear_zero, .L_clear_zero ) lc0 = p2;
.L_clear_zero:
W[p1++] = r0;

/* pass the uboot arguments to the global value command line */
R0 = R7;
call _cmdline_init;

p1.l = __rambase;
p1.h = __rambase;
r0.l = __sdata;
r0.h = __sdata;
[p1] = r0;

p1.l = __ramstart;
p1.h = __ramstart;
p3.l = ___bss_stop;
p3.h = ___bss_stop;

r1 = p3;
[p1] = r1;


/*
* load the current thread pointer and stack
*/
r1.l = _init_thread_union;
r1.h = _init_thread_union;

r2.l = 0x2000;
r2.h = 0x0000;
r1 = r1 + r2;
sp = r1;
usp = sp;
fp = sp;
call _start_kernel;
.L_exit:
jump.s .L_exit;
ENDPROC(_real_start)

__FINIT

.section .l1.text
Expand Down
70 changes: 0 additions & 70 deletions arch/blackfin/mach-bf561/head.S
Original file line number Diff line number Diff line change
Expand Up @@ -217,76 +217,6 @@ ENTRY(__start)
jump .LWAIT_HERE;
ENDPROC(__start)

ENTRY(_real_start)
[ -- sp ] = reti;
p0.l = lo(WDOGA_CTL);
p0.h = hi(WDOGA_CTL);
r0 = 0xAD6(z);
w[p0] = r0; /* watchdog off for now */
ssync;

/* Code update for BSS size == 0
* Zero out the bss region.
*/

p1.l = ___bss_start;
p1.h = ___bss_start;
p2.l = ___bss_stop;
p2.h = ___bss_stop;
r0 = 0;
p2 -= p1;
lsetup (.L_clear_bss, .L_clear_bss) lc0 = p2;
.L_clear_bss:
B[p1++] = r0;

/* In case there is a NULL pointer reference
* Zero out region before stext
*/

p1.l = 0x0;
p1.h = 0x0;
r0.l = __stext;
r0.h = __stext;
r0 = r0 >> 1;
p2 = r0;
r0 = 0;
lsetup (.L_clear_zero, .L_clear_zero) lc0 = p2;
.L_clear_zero:
W[p1++] = r0;

/* pass the uboot arguments to the global value command line */
R0 = R7;
call _cmdline_init;

p1.l = __rambase;
p1.h = __rambase;
r0.l = __sdata;
r0.h = __sdata;
[p1] = r0;

p1.l = __ramstart;
p1.h = __ramstart;
p3.l = ___bss_stop;
p3.h = ___bss_stop;

r1 = p3;
[p1] = r1;

/*
* load the current thread pointer and stack
*/
r1.l = _init_thread_union;
r1.h = _init_thread_union;

r2.l = 0x2000;
r2.h = 0x0000;
r1 = r1 + r2;
sp = r1;
usp = sp;
fp = sp;
jump.l _start_kernel;
ENDPROC(_real_start)

__FINIT

.section .l1.text
Expand Down
2 changes: 1 addition & 1 deletion arch/blackfin/mach-common/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#

obj-y := \
cache.o entry.o \
cache.o entry.o head.o \
interrupt.o lock.o irqpanic.o arch_checks.o ints-priority.o

obj-$(CONFIG_PM) += pm.o dpmc_modes.o
Expand Down
Loading

0 comments on commit 09e1f70

Please sign in to comment.